flux__ 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/
wimp has joined #ocaml
hikozaemon has joined #ocaml
cyyoung has joined #ocaml
CosmicRay has quit ["Client exiting"]
wimp has left #ocaml []
mikeX has quit ["zz"]
szlo has quit [Read error: 104 (Connection reset by peer)]
szlo has joined #ocaml
fab_ has joined #ocaml
_fab has quit [Read error: 110 (Connection timed out)]
ski has quit [Read error: 110 (Connection timed out)]
ski has joined #ocaml
wimp has joined #ocaml
goltrpoat has joined #ocaml
<goltrpoat> quick question.. i have four functions where the last one ends up calling the first one (so it's basically a recursive function split into four smaller ones). defining them as normal results in at least one undefined symbol
<goltrpoat> defining all four with the 'and' syntax gives error: FS0031: This value will be eventually evaluated as part of its own definition. You may need to make the value lazy or a function. Value 'factor' will evaluate 'expr' will evaluate 'term' will evaluate 'expterm' will evaluate 'factor'
<goltrpoat> there's no reason to make the functions lazy makes no sense
<goltrpoat> any suggestions?
<goltrpoat> er. -"makes no sense"
<goltrpoat> or whatever would turn that into a real sentence.
<goltrpoat> there are no forward declarations in ocaml, right
<Smerdyakov> Mutually recursive definitions subsume some of the functionality.
palomer has joined #ocaml
palomer has left #ocaml []
<goltrpoat> smerdyakov: hmm?
<Smerdyakov> Look for the 'and' keyword in the language grammar.
<goltrpoat> [21:59] <goltrpoat> defining all four with the 'and' syntax gives .. etc
<goltrpoat> (this is F#, not ocaml, but it's supposed to be core compatible)
chessguy has joined #ocaml
<Smerdyakov> I guess I should read backlogs more often.
<Smerdyakov> Right.. 'and' only works with function definitions and type definitions in standard OCaml.
<Smerdyakov> My guess is that you may be thinking Haskell-like and not making something a function by adding an extra 'unit' argument.
<goltrpoat> i guess the question is.. should this compile? let rec f = g and g = h and h = i and i = f
<Smerdyakov> No.
<Smerdyakov> Ah, I see.
<Smerdyakov> Not only must you be defining functions, but each definition must begin with 'fun' or 'function.'
<Smerdyakov> Or use the special 'let' syntax for functions where you list arguments before the '='.
<goltrpoat> well.. there are no arguments in the definition, they're supposed to curry
<dylan> wow, someone wrote a song about the mandelbrot set.
<Smerdyakov> Then you can't use it in a recursive definition.
<goltrpoat> lemme paste the whole thing somewhere, sec
<Smerdyakov> goltrpoat, you probably see that general recursive definitions have no easy compilation model, right?
<Smerdyakov> (In an eager language)
chessguy2 has joined #ocaml
<goltrpoat> yeah i keep forgetting that ocaml is eager
<Smerdyakov> You won't be able to use recursive definitions for this points-free style.
<goltrpoat> so parametrizing it should help?
<Smerdyakov> The standard trick is to enrich each parser type with an extra unit argument and include it explicitly for each case.
<goltrpoat> ah makes sense
<goltrpoat> thanks
chessguy has quit [Connection timed out]
chessguy2 has quit [Success]
Thorn has quit ["Leaving"]
delamarche has joined #ocaml
wimp_ has joined #ocaml
wimp_ has quit ["Leaving"]
wimp has left #ocaml []
Smerdyakov has quit ["Leaving"]
Snark has joined #ocaml
vincenz has quit ["leaving"]
Cenobit has joined #ocaml
smimou has joined #ocaml
revision17_ has joined #ocaml
Cenobit has quit ["BitchX-1.1-final -- just do it."]
Revision17 has quit [Read error: 110 (Connection timed out)]
hikozaemon has quit ["Leaving..."]
Schmurtz has joined #ocaml
cyyoung has quit ["Leaving"]
bzzbzz has quit ["leaving"]
slipstream-- has joined #ocaml
Bigb[a]ng has quit [Read error: 110 (Connection timed out)]
slipstream has quit [Read error: 110 (Connection timed out)]
goltrpoat has quit []
vincenz has joined #ocaml
_jol_ has joined #ocaml
vincenz has quit ["Changing server"]
vincenz has joined #ocaml
delamarche has quit []
Smerdyakov has joined #ocaml
_jol_ has quit [Read error: 110 (Connection timed out)]
jcreigh has joined #ocaml
wimp has joined #ocaml
jcreigh has quit ["Do androids dream of electric sheep?"]
love-pingoo has joined #ocaml
jcreigh has joined #ocaml
jcreigh has quit ["Do androids dream of electric sheep?"]
finelemon has joined #ocaml
finelemo1 has joined #ocaml
Bigb[a]ng has joined #ocaml
mikeX has joined #ocaml
finelemo2 has quit [Read error: 110 (Connection timed out)]
finelemon has quit [Read error: 110 (Connection timed out)]
shawn has quit ["This computer has gone to sleep"]
<vincenz> ping
<smimou> pong
<mikeX> pang
<zmdkrbou> pung
ski has quit [Read error: 110 (Connection timed out)]
<dylan> peng
ski has joined #ocaml
chessguy has joined #ocaml
shawn has joined #ocaml
CosmicRay has joined #ocaml
CosmicRay has quit ["Client exiting"]
mikeX has quit [Read error: 110 (Connection timed out)]
Snark has quit ["Leaving"]
khaladan has joined #ocaml
khaladan_ has joined #ocaml
ski has quit [kornbluth.freenode.net irc.freenode.net]
Smerdyakov has quit [kornbluth.freenode.net irc.freenode.net]
revision17_ has quit [kornbluth.freenode.net irc.freenode.net]
fab_ has quit [kornbluth.freenode.net irc.freenode.net]
szlo has quit [kornbluth.freenode.net irc.freenode.net]
ketty has quit [kornbluth.freenode.net irc.freenode.net]
piggybox has quit [kornbluth.freenode.net irc.freenode.net]
szloto has quit [kornbluth.freenode.net irc.freenode.net]
Demitar has quit [kornbluth.freenode.net irc.freenode.net]
zmdkrbou has quit [kornbluth.freenode.net irc.freenode.net]
wimp has quit [kornbluth.freenode.net irc.freenode.net]
cmeme has quit [kornbluth.freenode.net irc.freenode.net]
dvorak has quit [kornbluth.freenode.net irc.freenode.net]
jer has quit [kornbluth.freenode.net irc.freenode.net]
mellum has quit [kornbluth.freenode.net irc.freenode.net]
TaXules has quit [kornbluth.freenode.net irc.freenode.net]
Lob-Sogular has quit [kornbluth.freenode.net irc.freenode.net]
creichen has quit [kornbluth.freenode.net irc.freenode.net]
chessguy has quit [kornbluth.freenode.net irc.freenode.net]
Bigb[a]ng has quit [kornbluth.freenode.net irc.freenode.net]
slipstream-- has quit [kornbluth.freenode.net irc.freenode.net]
Schmurtz has quit [kornbluth.freenode.net irc.freenode.net]
smimou has quit [kornbluth.freenode.net irc.freenode.net]
avlondono has quit [kornbluth.freenode.net irc.freenode.net]
khaladan has quit [kornbluth.freenode.net irc.freenode.net]
ramkrsna has quit [kornbluth.freenode.net irc.freenode.net]
woggle has quit [kornbluth.freenode.net irc.freenode.net]
danly has quit [kornbluth.freenode.net irc.freenode.net]
Nargg has quit [kornbluth.freenode.net irc.freenode.net]
dvekravy has quit [kornbluth.freenode.net irc.freenode.net]
khaladan_ is now known as khaladan
chessguy2 has joined #ocaml
chessguy has joined #ocaml
ski has joined #ocaml
Bigb[a]ng has joined #ocaml
wimp has joined #ocaml
Smerdyakov has joined #ocaml
slipstream-- has joined #ocaml
Schmurtz has joined #ocaml
revision17_ has joined #ocaml
smimou has joined #ocaml
fab_ has joined #ocaml
szlo has joined #ocaml
cmeme has joined #ocaml
ketty has joined #ocaml
ramkrsna has joined #ocaml
dvorak has joined #ocaml
woggle has joined #ocaml
piggybox has joined #ocaml
danly has joined #ocaml
szloto has joined #ocaml
Nargg has joined #ocaml
Demitar has joined #ocaml
jer has joined #ocaml
mellum has joined #ocaml
dvekravy has joined #ocaml
zmdkrbou has joined #ocaml
creichen has joined #ocaml
avlondono has joined #ocaml
Lob-Sogular has joined #ocaml
TaXules has joined #ocaml
mikeX has joined #ocaml
chessguy has quit [Connection timed out]
jcreigh has joined #ocaml
cmeme has quit [Read error: 104 (Connection reset by peer)]
cmeme has joined #ocaml
mikeX has quit [Read error: 104 (Connection reset by peer)]
mikeX has joined #ocaml
cmeme has quit ["Client terminated by server"]
cmeme has joined #ocaml
fab_ has quit []
cmeme has quit []
cmeme has joined #ocaml
wimp has left #ocaml []
chessguy2 has quit [Success]
<vincenz> out of curiousity
<vincenz> what's the return type of a while
<vincenz> while a do b
<mikeX> unit
<mikeX> just try it on the toplevel
<mikeX> # while true do 4 + 5 done;;
<mikeX> Warning S: this expression should have type unit.
<mellum> What does the "S" do there?
<love-pingoo> name of the warning
<love-pingoo> they have names so that you can tell ocaml on the command line which one you want (don't want) to see
<mellum> Oh, and they envisioned so few warnings that a single letter would do? :-)
<mellum> I guess gcc has like 300 different warnings...
<mellum> correction... 862 :-)
<creichen> Isn't it an entire class of warnings?
<pango> yes, and others are plain errors ;)
jcreigh has quit ["Do androids dream of electric sheep?"]
Smerdyakov has quit ["Leaving"]
User951 has joined #ocaml
User951 has quit [Client Quit]
love-pingoo has quit ["Connection reset by by pear"]
Smerdyakov has joined #ocaml