flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
<pippijn> many years ago
zRecursive has joined #ocaml
ben_zen has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
avsm has quit [Quit: Leaving.]
mort___ has quit [Ping timeout: 276 seconds]
mort___ has joined #ocaml
travisbrady has joined #ocaml
mfp has quit [Ping timeout: 264 seconds]
Drup has quit [Quit: Leaving.]
q66 has quit [Quit: Leaving]
chambart has joined #ocaml
travisbrady has quit [Quit: travisbrady]
csakatoku has joined #ocaml
<dsheets> building ocaml requires in excess of 768M ram?>
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
gautamc has joined #ocaml
<zRecursive> dsheets: no, i built ocaml-4.0.1 in a 512M box
<dsheets> zRecursive, any special options? i get a malloc error in the camlp4 build around 768M
<zRecursive> i just did `opam switch install ocaml-4.0.1`, IIRC
<dsheets> hmmm this is what i am doing as well
<dsheets> now fiddling with /proc/sys/vm :-(
<zRecursive> oh, it is a freebsd 9.1 box though
<dsheets> ah, that is probably why
<dsheets> stupid ubuntu
<dsheets> no place being a server vm :-(
csakatoku has quit [Remote host closed the connection]
madroach has quit [Ping timeout: 264 seconds]
csakatoku has joined #ocaml
madroach has joined #ocaml
avsm has joined #ocaml
Myk267 has quit [Quit: Myk267]
avsm has quit [Ping timeout: 246 seconds]
introom has joined #ocaml
walter has quit [Quit: This computer has gone to sleep]
shinnya has quit [Ping timeout: 276 seconds]
chrisdotcode has joined #ocaml
tobiasBora has quit [Quit: Konversation terminated!]
darkf has joined #ocaml
avsm has joined #ocaml
foo303 has joined #ocaml
avsm has quit [Ping timeout: 256 seconds]
foo303 has quit [Changing host]
foo303 has joined #ocaml
pkrnj has joined #ocaml
walter|r has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
walter|r has quit [Quit: This computer has gone to sleep]
mcclurmc has quit [Read error: Operation timed out]
foo303 has quit [Ping timeout: 240 seconds]
foo303 has joined #ocaml
foo303 has quit [Changing host]
foo303 has joined #ocaml
foo303 has left #ocaml []
avsm has joined #ocaml
avsm has quit [Ping timeout: 276 seconds]
wormphlegm has quit [Ping timeout: 246 seconds]
wormphlegm has joined #ocaml
mort___ has quit [Ping timeout: 276 seconds]
wormphlegm has quit [Ping timeout: 260 seconds]
wormphlegm has joined #ocaml
gnuvince- has quit [Ping timeout: 260 seconds]
avsm has joined #ocaml
avsm has quit [Ping timeout: 264 seconds]
ggole has joined #ocaml
gnuvince- has joined #ocaml
csakatok_ has joined #ocaml
csakatoku has quit [Ping timeout: 256 seconds]
Simn has joined #ocaml
introom has quit [Remote host closed the connection]
yezariaely has joined #ocaml
structuralist has joined #ocaml
Myk267 has joined #ocaml
manud has quit [Quit: manud]
dtg has joined #ocaml
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
gautamc has quit [Ping timeout: 240 seconds]
djcoin has joined #ocaml
ollehar has joined #ocaml
gautamc has joined #ocaml
dsheets has quit [Ping timeout: 260 seconds]
hyperboreean has joined #ocaml
chrisdotcode has quit [Remote host closed the connection]
ChristopheT has joined #ocaml
hkBst has joined #ocaml
<yezariaely> has ocaml a mechanism that allows me to define a variable that never conflicts with others? e.g. a prefix/postifx that is unique?
<yezariaely> I want to include a module and want to define a var that cannot conflict.
<yezariaely> at the moment I use: _logger2348dnsfhk234234hj = ...
<yezariaely> something like let _logger$ = ... would be nice
<yezariaely> hmm, maybe hidding this value is a better approach. Never mind...
speredenn has joined #ocaml
Snark has joined #ocaml
zRecursive has left #ocaml []
<rixed> yezariaely: lookup gensym+ocaml maybe?
introom has joined #ocaml
<yezariaely> rixed: thanks for the hint: but I think the normal approach to deal with my problem is hidding of names via mli, anything else seems to be much more complicated now. ;-)
Neros has joined #ocaml
introom has quit [Remote host closed the connection]
ben_zen has quit [Quit: leaving]
introom has joined #ocaml
avsm has joined #ocaml
zpe has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
Kakadu has joined #ocaml
yacks has quit [Ping timeout: 276 seconds]
thomasga has joined #ocaml
weie_ has joined #ocaml
weie has quit [Ping timeout: 240 seconds]
weie has joined #ocaml
olasd has quit [Quit: brb]
weie_ has quit [Ping timeout: 260 seconds]
olasd has joined #ocaml
wwilly has joined #ocaml
<wwilly> Bonjour
<companion_cube> hi
weie_ has joined #ocaml
weie has quit [Ping timeout: 264 seconds]
osa1 has joined #ocaml
weie has joined #ocaml
mfp has joined #ocaml
weie_ has quit [Ping timeout: 240 seconds]
<Kakadu> Guys
<Kakadu> If I get a Stack_overflow is it possible to print stack to see what function/functions have issues?
<kerneis> Kakadu: have you tried OCAMLRUNPARAM=b ./yourprogram ?
<kerneis> I'm not sure it works with stack overflow, though; maybe in bytecode but not native
<Kakadu> I have native code and I can't catch this exception
<flux> did you try that nevertheles?
weie_ has joined #ocaml
<kerneis> Kakadu: otherwise, compile with ocamlopt -g, set ulimit -c 10000, and look and the trace in gdb
<kerneis> s/trace/coredump
<kerneis> your function will have funny names
<kerneis> but it gives you a hint
weie has quit [Ping timeout: 264 seconds]
<Kakadu> It seems I was trying to catch it in a wrong place
osa1 has quit [Read error: No route to host]
osa1 has joined #ocaml
<Kakadu> heh
<Kakadu> gdb says that pervasives.ml:211 is my problem
<Kakadu> and it is .... (@)
<kerneis> Kakadu: if it's a stack overflow, what you are interested in is one of the first functions
<kerneis> hmm, last I mean
<kerneis> hmm, I don't know
<kerneis> depends on how you look at your stack ;-)
<Kakadu> My problem is a little bit complex
<Kakadu> I'm experimenting with parser-combinatorrs
<Kakadu> and I'm parsing matematical expressions
<Kakadu> using two parsers: left-factorized (expr: factor (op factor)? ) and not: expr: factor op factor| factor
<Kakadu> and also I use memoization
<Kakadu> Some times memoizations gives a big speeed up
<Kakadu> but for a long tests it gives stackoverflow
<Kakadu> for two parsers which are not left factorized
q66 has joined #ocaml
<kerneis> well, you need to make everything tail recursive then
<kerneis> using continuations where necessary
<kerneis> but I'm not familiar enough with parser-combinators to know if it's practical
osa1 has quit [Ping timeout: 264 seconds]
<Kakadu> hm, I'm at depth 50k in gdb's thrace. Interesting, how big OCaml stack is?
<Kakadu> 200k. nathing cahnged
watermind has joined #ocaml
<Kakadu> probably it is not a backtrace
<watermind> quick question, is there some sort of "lazy let"? that binds a variable to an expression but is only evaluated when/if needed?
<watermind> I know I can simulate it by lifting the desired value (to unit -> t )
<watermind> but was wondering if that's how it is usually done, or if there is some native construct
<companion_cube> there is a "lazy" construct in the language
<companion_cube> plus a Lazy module to handle lazy values
<kerneis> Kakadu: http://blog.incubaid.com/2011/12/04/on-segmentation-faults-stack-overflows-gdb-and-ocaml/ might help (but it's full of gorry details)
<companion_cube> (also, in pattern matching iirc)
<watermind> companion_cube: nice let me check that
<kerneis> watermind: http://caml.inria.fr/pub/docs/manual-ocaml/libref/Lazy.html and let x = lazy ...
<watermind> kerneis: cool thank you
<watermind> I'm a bit confused about jane street core vs inria documentation
<watermind> I installed Jane Street's core so I try whenever possible to follow their docs, but I'm still not sure how to browse them
<kerneis> core is just an alternative standard library
osnr has quit [Ping timeout: 264 seconds]
<watermind> is there some relatively easy way to find out (if there exists) a jane street Lazy module
<kerneis> lazy is a keyword provided directly by the compiler
<watermind> I'm trying to find it searching from here https://ocaml.janestreet.com/ocaml-core/latest/doc/
<kerneis> no idea, I don't use it
<watermind> but it's kind of a maze
<kerneis> yeah, I've heard the doc is awful
osnr has joined #ocaml
<kerneis> watermind: google "site:ocaml.janestreet.com lazy"
<kerneis> but now it has changed
<watermind> kerneis: I've done that before and it kind of works, but sometimes it leads me to outdated versions
<watermind> and substituting the ver number by latest doesn't always work
<watermind> thanks it did work for lazy
osnr has quit [Ping timeout: 240 seconds]
speredenn has quit [Ping timeout: 246 seconds]
osa1 has joined #ocaml
osnr has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Read error: Connection reset by peer]
francis has joined #ocaml
<francis> I believe that there's no official documentation for Camlp4 version 4, but are there any documents that you can recommend for me to start working with it?
osa1 has quit [Remote host closed the connection]
osa1 has joined #ocaml
osa1 has quit [Ping timeout: 260 seconds]
osa1 has joined #ocaml
osa1 has quit [Remote host closed the connection]
osa1 has joined #ocaml
mort___ has joined #ocaml
hyperboreean has quit [Read error: Connection reset by peer]
osa1_ has joined #ocaml
osa1 has quit [Ping timeout: 276 seconds]
osa1_ is now known as osa1
ollehar has quit [Ping timeout: 264 seconds]
Sim_n has joined #ocaml
csakatoku has joined #ocaml
csakatok_ has quit [Ping timeout: 246 seconds]
Simn has quit [Ping timeout: 270 seconds]
Sim_n is now known as Simn
osa1 has quit [Quit: Konversation terminated!]
osa1 has joined #ocaml
osa1 has quit [Client Quit]
bondar has joined #ocaml
osa1 has joined #ocaml
hyperboreean has joined #ocaml
yacks has joined #ocaml
clog has quit [Ping timeout: 240 seconds]
clog has joined #ocaml
Drup has joined #ocaml
milosn_ has quit [Read error: Operation timed out]
speredenn has joined #ocaml
milosn has joined #ocaml
_andre has joined #ocaml
amirmc has joined #ocaml
amirmc has quit [Read error: Connection reset by peer]
amirmc has joined #ocaml
structuralist has quit []
walter has joined #ocaml
speredenn_ has joined #ocaml
speredenn has quit [Quit: Leaving]
speredenn_ has quit [Client Quit]
introom has quit [Remote host closed the connection]
csakatoku has quit [Remote host closed the connection]
introom has joined #ocaml
yacks has quit [Ping timeout: 264 seconds]
yacks has joined #ocaml
bondar has quit [Ping timeout: 240 seconds]
amirmc has quit [Quit: Leaving.]
amirmc has joined #ocaml
osa1 has quit [Read error: Operation timed out]
osa1 has joined #ocaml
yacks has quit [Ping timeout: 240 seconds]
yacks has joined #ocaml
hkBst has quit [Quit: Konversation terminated!]
mort___ has quit [Quit: Leaving.]
chambart has joined #ocaml
<kerneis> francis: what do you mean version 4? the current one?
metasyntax has joined #ocaml
beckerb has joined #ocaml
smondet has joined #ocaml
<watermind> when trying to use corebuild (not ocamlbuild) I'm getting "ocamlbuild: unknown option `-syntax'."
<watermind> tried to search around for ocamlbuild errors but no luck
<watermind> any idea what may be happening here?
* Kakadu have never heard about corebuild
<watermind> it's part of Jane Street's core
<watermind> "corebuild script is installed along with Core, and its purpose is to pass in the flags required for building a program with Core"
<watermind> but apparently one of the flags (-syntax) is not recognized by ocamlbuild
tobiasBora has joined #ocaml
<watermind> my version anyway
<watermind> 4.00.1
<Kakadu> Guys
<Kakadu> If my program spents half time in memory allocation than I should enlarge minor_heap_size and major_heap_increment?
<companion_cube> not necessarily
<companion_cube> first, try to reduce the number of allocations :p
<thomasga> watermind: try '-tag "syntax(camlp4o)"'
<Kakadu> companion_cube: :)
<Kakadu> hm, inline 5 doesn't help
amirmc has quit [Quit: Leaving.]
<Kakadu> moreover, it doesn't change executable's size
<ggole> I think the number is the size in bytes of the inline threshold
<ggole> So it would need to be quite a bit bigger.
<Kakadu> manual says that it is aggressivness
<Kakadu> default is 1
<ggole> There's some profiler for allocations iirc
travisbrady has joined #ocaml
Neros has quit [Read error: Connection reset by peer]
<ggole> Ah, it's a patch to the compiler :(
<Kakadu> ggole: are u talking about http://alan.petitepomme.net/cwn/2013.07.16.html#5 ?
<ggole> No, I was thinking of something called ocaml-memprof
<ggole> (Unless those are the same thing.)
smondet` has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
Simn has joined #ocaml
gereedy has quit [Ping timeout: 240 seconds]
smondet has quit [Remote host closed the connection]
Sim_n has joined #ocaml
gereedy has joined #ocaml
Simn has quit [Ping timeout: 276 seconds]
shinnya has joined #ocaml
<fds> kerneis: Yes, the one that returns "Camlp4 version 4.00.1" when type "camlp4 -v".
<fds> kerneis: (Erm, I'm also francis)
bondar has joined #ocaml
<fds> Anyway, I've found a tutorial for an older version, so I'll follow it and see how far I can get...
bondar has quit [Client Quit]
<watermind> thomasga: ocamlbuild recognises that option, problem is I am trying corebuild and it calls ocamlbuild with the -syntax option
<watermind> which ocamlbuild doesn't recognise
contempt has quit [Ping timeout: 264 seconds]
<thomasga> edit corebuild then, or upgrade to 4.01 :-)
gnuvince- has quit [Changing host]
gnuvince- has joined #ocaml
<watermind> I see outdated corebuild version
contempt has joined #ocaml
bondar has joined #ocaml
tchell has quit [Remote host closed the connection]
tchell has joined #ocaml
travisbrady has quit [Quit: travisbrady]
yacks has quit [Ping timeout: 248 seconds]
yacks has joined #ocaml
<kerneis> but it might be the wrong time to learn about it
<kerneis> (if by "old" version you mean what is now called camlp5, then it's very different - but also better documented)
<kerneis> there is a lot of discussion for a new extension mechanism
<kerneis> much simpler, although slightly less powerful
<fds> kerneis: Ah ha, thanks! Hopefully what I'm doing won't be too tricky.
yezariaely has quit [Ping timeout: 246 seconds]
travisbrady has joined #ocaml
Neros has joined #ocaml
ollehar has joined #ocaml
whitequark has quit [Ping timeout: 240 seconds]
<gasche> watermind: -syntax foo is not supported in 4.00.1, it was added in the development version by Wojciech Meyer
<gasche> it will be supported by the next release, 4.01.0
<gasche> in the meantime you can use the exactly equivalent -tag "syntax(foo)" command
<gasche> (or syntax(foo) somewher in your _tags file of course)
tane has joined #ocaml
k3VB6u4d has quit [Max SendQ exceeded]
k3VB6u4d has joined #ocaml
bondar has quit []
introom has quit [Remote host closed the connection]
thomasga has quit [Ping timeout: 276 seconds]
travisbrady has quit [Quit: travisbrady]
AltGr has joined #ocaml
walter has quit [Quit: This computer has gone to sleep]
osa1 has quit [Ping timeout: 240 seconds]
tobiasBora has quit [Quit: Konversation terminated!]
AltGr has quit [Quit: Konversation terminated!]
travisbrady has joined #ocaml
osa1 has joined #ocaml
osa1 has quit [Ping timeout: 260 seconds]
thomasga has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
mort___ has joined #ocaml
beckerb has quit [Ping timeout: 245 seconds]
malo has joined #ocaml
<kerneis> gasche: if ocamlbuild has several rules to build a target, is it guaranteed that it tries them in order (even in case of parallel build)?
Sim_n is now known as Simn
ygrek has joined #ocaml
<kerneis> gasche: the answer is yes
<kerneis> similarly to what happens with the "build" parameter of a rule function
<kerneis> you have a conjuction of disjuctions, the disjunction being the various rules
<kerneis> for a given target
<kerneis> and they are tried one by one
<kerneis> (the targets are built in parallel)
<jpdeplaix> is there a way to get the filename of files which will be compiled
<jpdeplaix> (in ocamlbuild)
<kerneis> jpdeplaix: no
<kerneis> but you can get the filename of files which have been compiled (not easily though)
<kerneis> the fundamental reason is that ocamlbuild discovers dependencies dynamically
<jpdeplaix> yes but we can have a callback function for that ?
<kerneis> hmm, I'm afraid not
<kerneis> but I might be wrong
<kerneis> what you can do is check if a filename exists in _build
<kerneis> it's sometimes helpful (to derive the list of files to install from a mllib for instance), but quite limited
ygrek has quit [Ping timeout: 240 seconds]
<kerneis> once again, this shows that "ocamlbuild should be a library" (and it's API vastly improved)
<jpdeplaix> I agree
<kerneis> see for install this comment by meyer: http://caml.inria.fr/mantis/view.php?id=6094#c9902
<kerneis> instance*
osa1 has joined #ocaml
<kerneis> gasche: in case you wonder, this is self_first in solver.ml which does the iteration (calling self on each rule in turn)
osa1 has quit [Ping timeout: 264 seconds]
tianon has quit [Quit: "I'm a very important man. I've got a tower!"]
<jpdeplaix> When using the String module in ocamlbuild I obtain this:
<jpdeplaix> INTERNAL ERROR: Invalid argument String.sub
<jpdeplaix> This is likely to be a bug, please report this to the ocamlbuild
<jpdeplaix> developers.
<kerneis> in myocamlbuild.ml you mean?
<jpdeplaix> yes
<kerneis> I guess you got your bounds wrong
<jpdeplaix> ah probably ! Thanks
<kerneis> the warning is because the internal ocamlbuild String module is (mainly) used by ocamlbuild developer
<kerneis> so users report bugs
djcoin has quit [Quit: WeeChat 0.4.0]
Drup has quit [Ping timeout: 260 seconds]
darkf has quit [Quit: Leaving]
wormphlegm has quit [Quit: leaving]
wormphlegm has joined #ocaml
osa1 has joined #ocaml
wwilly has quit [Remote host closed the connection]
Simn has quit [Quit: Leaving]
osa1 has quit [Ping timeout: 264 seconds]
osa1 has joined #ocaml
pkrnj has joined #ocaml
osa1 has quit [Ping timeout: 264 seconds]
<watermind> why is it that == (physical equality) is not defined for function types?
<flux> what do you mean is not defined?
<flux> I thought it is..
<watermind> well I tried let f = fun x -> x ;; f == f ;;
<watermind> and got Error: This expression has type 'a -> 'a
<flux> Works For Me(TM)
<flux> are you certain that's what you wrote?
<mrvn> - : bool = true
<watermind> :-/
<watermind> I don't understand ... I just double checked
<watermind> obviously I'm doing something wrong... let me restart the interpreter
<watermind> nope
<watermind> I'm using jane street's core, could that be it?
<mrvn> try it without
<watermind> oh it was
<watermind> I wonder why the decided to redefine it
<smondet`> watermind: 'core' redefines '==' to completely avoid its usage
<smondet`> # (==);;
<smondet`> - : [ `Consider_using_phys_equal ] -> [ `Consider_using_phys_equal ] -> [ `Consider_using_phys_equal ] = <fun>
<technomancy> hah; nice
<watermind> isn't == physical equality?
ollehar has quit [Ping timeout: 240 seconds]
<smondet`> y `phys_equal` they mean the function
<watermind> oh
<watermind> I see
<smondet`> *s/y/by/
<watermind> I thought they meant use the other kind of equality
<watermind> right, they just don't want people to accidently mistake == for =
<smondet`> putting tricky semantics into infix operators makes code unreadable
<watermind> or the other way around
<technomancy> is that because genuine need for physical equality is very rare, and they want it to be called out as special in a "pay attention; this is weird" kind of way?
<watermind> it makes sense, I can understand that
<smondet`> so when you read code using `phys_equal` you know you have to pay attention
<companion_cube> could use (=====)
<mrvn> they could have made it ('a -> 'a) -> ('a -> 'a) -> bool
<watermind> :)
<companion_cube> or maybe ==/!\==
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
ygrek has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
chambart has quit [Ping timeout: 246 seconds]
mort___ has quit [Ping timeout: 276 seconds]
osa1 has joined #ocaml
Drup has joined #ocaml
whitequark has joined #ocaml
ygrek has quit [Ping timeout: 264 seconds]
amirmc has joined #ocaml
tane has quit [Quit: Verlassend]
ggole has quit []
chambart has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
zpe has joined #ocaml
gautamc has quit [Read error: Connection reset by peer]
gautamc has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
<jpdeplaix> kerneis: the trick with the _build works a little but it doesn't work if I clean first. How to add tags after that the files were copied in the _build dir ?
_andre has quit [Quit: leaving]
ollehar has joined #ocaml
morolin has quit [Ping timeout: 264 seconds]
<orbitz> Any suggested reading for lookingat FRP? I see Froc and React but looking also for theoratical reads
<companion_cube> there are probably seminal papers
<orbitz> thanks
<smondet`> you can also look for Adaptive Functional Programming
morolin has joined #ocaml
amirmc has quit [Quit: Leaving.]
Snark has quit [Quit: leaving]
speredenn has joined #ocaml
malo has quit [Quit: Leaving]
<orbitz> Whee, signed up for CUFP
manud has joined #ocaml
<watermind> howcome is the need for the "rec" annotation for type checking a consequence of non-purity?
<watermind> I'm not seeing how both are connected
<orbitz> watermind: in function defintions?
<watermind> orbitz: yes
<orbitz> what's your question?
amirmc has joined #ocaml
amirmc has quit [Ping timeout: 262 seconds]
speredenn has quit [Quit: Leaving]
dsheets has joined #ocaml
weie_ has quit [Ping timeout: 264 seconds]
<watermind> orbitz: I read the keyword "rec" is needed in ocaml for the typechecking algorithm to work, because ocaml is non-pure
<watermind> but I don't see the connection between both
<watermind> why would the typechecking algorithm not work without rec?
<watermind> in particular what do side effects have to do with it
smondet` has quit [Quit: music!]
<levi> rec is not about purity, it's about recursiveness.
<levi> The 'let' form introduces a lexical binding, i.e. a name is bound to a value. The question is, does the binding take effect *inside* the expression that's being bound to the name?
Simn has joined #ocaml
<watermind> levi: I know it is about recursion, but some languages (e.g. haskell) do not need the rec lable
<levi> That is because in haskell, the recursive let is the only kind.
<companion_cube> also because haskell is lazy
<companion_cube> a recursive definition does not need to trigger immediately an infinite loop
<companion_cube> (only during evaluation)
<watermind> this is what I read in real world ocaml: "the type-inference algorithm needs to know when a set of function definitions are mutually recursive, and for reasons that don't apply to a pure language like Haskell, these have to be marked explicitly by the programmer"
<levi> Laziness doesn't have anything to do with definitions. Expressions aren't evaluated when they're bound in a definition.
<companion_cube> levi: let () = printf "hello" ?
<levi> Oops, you're right.
<companion_cube> in OCaml, non-recursive definitions are evaluated in order
<companion_cube> in Haskell, they are evaluated on demand
<companion_cube> that's also what makes the "where" block usable
<watermind> right
<levi> Hmmm.
<watermind> hmm... so, even though it is not idiomatic, could I be using let rec to define lazy bidings?
<levi> Let rec doesn't make things lazy, though.
<levi> I think the recursive case is just doesn't take the extra work in a lazy language that it does in a strict one. But I have not thought that through fully yet either.
<companion_cube> no, but you cannot write any kind of expression in a let rec
<watermind> let rec x = x ;; ?
<watermind> yeap that seems ruled out
<companion_cube> if you define recursive functions that's ok, because the recursion only occurs at call time
<companion_cube> let rec x = y and y = x+1;;
<companion_cube> ↑ not accepted
<watermind> right
<watermind> but why not accept it and have it result in infinite recursion when evaluated?
<companion_cube> I'm not sure there is a proper evaluation model for this
<companion_cube> recursive functions are ok, but recursive primitive values...
<companion_cube> non-functional values*
<watermind> right... fair point, Y in call by value has type ((a->b)->(a->b))->a->b
mort___ has joined #ocaml
<watermind> but in any case, that could be ruled out in (all) let's
<watermind> rather than just the rec's
amirmc has joined #ocaml
<watermind> the only extra you seem to get is to refer to a previous definition of x when defining a new x
<companion_cube> the usual let allows shadowing, for instance
<companion_cube> exactly
<companion_cube> and evaluation is sequential
ollehar has quit [Ping timeout: 264 seconds]
tianon has joined #ocaml
<watermind> you could still have arguments shadowing previous other definitions
<watermind> not all kinds of shadowing would be gone
<watermind> just not the kind where you use a previous definition, in a newer one with the same name... but that looks awfully confusing to be honest
<watermind> as in a nice source for subtle bugs
amirmc has quit [Ping timeout: 256 seconds]
ChristopheT has left #ocaml []
Sim_n has joined #ocaml
Simn has quit [Ping timeout: 276 seconds]
amirmc has joined #ocaml
amirmc has quit [Ping timeout: 248 seconds]
osa1 has quit [Quit: Konversation terminated!]
pkrnj has quit [Quit: Computer has gone to sleep.]
Sim_n has quit [Quit: Leaving]
tobiasBora has joined #ocaml
<tobiasBora> Hello,
amirmc has joined #ocaml
<tobiasBora> I'm using the Arg module and I'd like to remove the "-help" option added by default. I tried to override it with empty Unit function and doc, but it still appear in the usage message...
Neros has quit [Remote host closed the connection]
chambart has quit [Ping timeout: 246 seconds]
thomasga has quit [Quit: Leaving.]
amirmc has quit [Ping timeout: 240 seconds]
travisbrady has quit [Quit: travisbrady]
dsheets has quit [Ping timeout: 246 seconds]
pkrnj has joined #ocaml
amirmc has joined #ocaml
testcocoon has quit [Ping timeout: 264 seconds]
amirmc has quit [Ping timeout: 264 seconds]
testcocoon has joined #ocaml
structuralist has joined #ocaml
hinayana has joined #ocaml
amirmc has joined #ocaml