flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0 out now! Get yours from http://caml.inria.fr/ocaml/release.html
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
myki has joined #ocaml
<myki> Hello! I'm struggling with modules a little. I have nested two simple modules and I have problem defining 'with type..' so that it works properly. The code is here: http://pastebin.com/m4e3393f8. When I put in VERTEX type label = string, it works properly, but I want to abstract the signature from actual code and put "label = string" near Graph definition.
<BlackHC|> nn
BlackHC| has quit ["Quit"]
seafood has quit [Read error: 145 (Connection timed out)]
<Smerdyakov> myki, I don't understand the question. Why do you expect that code to type-check?
<myki> Smerdyakov: I don't because probably around (1) something is missing. I need to link types Graph.V.t and Vertex.t
<Smerdyakov> myki, it looks like you already know the basic feature for doing that.
<Smerdyakov> myki, and you have correctly identified the place to use it.
<myki> Smerdyakov: Could you give me some hint, what to put there?
<Smerdyakov> Do you understand what [with type] means?
<Smerdyakov> And have you read the manual to see its syntax?
<myki> Yes, when in sig some type is defined as abstract, it's used to specialize this type (in this case label = string)
<Smerdyakov> I have a feeling that if you read the manual description, you'll know what to do.
<myki> Ok
struktured has joined #ocaml
<myki> Smerdyakov: It would be great if you could answer me one question. I've found a solution in order for that to work, but essentially I have to write the same thing twice: V.label = string in (1) and label = string in line 29 (module V : VERTEX with label = string = Vertex). Why can't the ocaml infer automatically just from (1) what is the type of V.label ?
<Smerdyakov> myki, the whole point of explicit signature annotations is to hide information.
<Smerdyakov> myki, you must state everything that you want to be known.
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
Mr_Awesome has joined #ocaml
pumpkin_ has joined #ocaml
pumpkin has joined #ocaml
pumpkin_ has quit [Connection timed out]
pumpkin has left #ocaml []
snhmib has quit ["Good riddance!"]
snhmib has joined #ocaml
snhmib has quit [Remote closed the connection]
snhmib has joined #ocaml
struktured has quit [Read error: 110 (Connection timed out)]
jeddhaberstro has quit []
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
alexyk has joined #ocaml
struktured has joined #ocaml
<alexyk> hmm, make world.opt in ocaml 3.11 does not build ocamlbuild.cmxa
ikaros has joined #ocaml
<alexyk> and going in ocamlbuild and saying make native gives an arror
Mr_Awesome has joined #ocaml
Amorphous has quit [Read error: 104 (Connection reset by peer)]
Amorphous has joined #ocaml
apples` has quit ["Leaving"]
Yoric[DT] has joined #ocaml
shortc|desk has quit [Read error: 110 (Connection timed out)]
CoryDambach has quit ["Leaving"]
sporkmonger has quit []
snhmib has quit ["Good riddance!"]
mishok13 has joined #ocaml
acatout has quit [Read error: 60 (Operation timed out)]
acatout has joined #ocaml
alexyk has quit []
seafood has joined #ocaml
seafood has quit [Client Quit]
seafood has joined #ocaml
mishok13 has quit [Remote closed the connection]
mishok13 has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
alexyk has joined #ocaml
ikaros has quit [".quit"]
alexyk has quit []
seafood has quit [No route to host]
_zack has joined #ocaml
asabil has joined #ocaml
gaja has quit ["leaving"]
gaja has joined #ocaml
johnnowak has joined #ocaml
__me has joined #ocaml
pango_ has quit ["I shouldn't really be here - dircproxy 1.0.5"]
pierre_m has joined #ocaml
rwmjones has joined #ocaml
_zack has quit ["Leaving."]
Palace_Chan has quit [Client Quit]
_zack has joined #ocaml
asabil has quit [Read error: 110 (Connection timed out)]
asabil has joined #ocaml
marmotine has joined #ocaml
pierre_m has left #ocaml []
petchema_ has joined #ocaml
petchema has quit [Read error: 110 (Connection timed out)]
shortc|desk has joined #ocaml
Kerris7 has joined #ocaml
<Kerris7> hmm I wonder what exactly did the latest ODT update changed
Kerris7 has quit []
Kerris7 has joined #ocaml
Kerris7 has quit [Client Quit]
vpalle has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
^authentic has joined #ocaml
jeremiah has joined #ocaml
johnnowak has quit []
authentic has quit [Read error: 110 (Connection timed out)]
^authentic is now known as authentic
myki_ has joined #ocaml
myki has quit [Read error: 104 (Connection reset by peer)]
marmotine has quit ["mv marmotine Laurie"]
meteoryte has joined #ocaml
<meteoryte> I'm no language theorist, but I've been pondering this for a few minutes... is there actually a need to refer to the current object (as "self" or "this" etc) in a strongly typed static language? Would the correct definition of scoping remove their need?
johnnowak has joined #ocaml
appletizer has joined #ocaml
appletizer has left #ocaml []
johnnowak has quit [Client Quit]
TaXules has quit [Remote closed the connection]
<__me> meteoryte: how do you return the object itself from a method?
<meteoryte> __me you're right, I can't think of a way. But is there ever a real need to do this? in a well structured program?
<meteoryte> the caller would already have a reference to the object surely...
<__me> I think so if runtime polymorphism comes into play. I'm very new to O'Caml, and it's OO-part seems to be a little different from most mainstream languages, so I can't speak for it, yet. But one subtype might create a new object (e.g. a clone of itself) while another one might just return this/self.
TaXules has joined #ocaml
mjrosenb is now known as kool-aid_nazi
kool-aid_nazi is now known as mjrosenb
acatout has quit [Read error: 60 (Operation timed out)]
<meteoryte> I'm not sure if you can ensure full static type-safety if you allow runtime polymorphism (as opposed to just parametric polymorphism).
Kerris7 has joined #ocaml
TaXules has quit [Remote closed the connection]
vixey has joined #ocaml
<meteoryte> actually I am probably mistaken there; I need to do more reading about late binding and think about this more
^authentic has joined #ocaml
Kerris7 has quit []
acatout has joined #ocaml
^authentic has quit [Read error: 60 (Operation timed out)]
^authentic has joined #ocaml
authentic has quit [Read error: 110 (Connection timed out)]
^authentic is now known as authentic
petchema_ has quit [Read error: 113 (No route to host)]
petchema_ has joined #ocaml
<meteoryte> __me, I finally worked out a concrete example of why a this/self reference is needed:
<meteoryte> def bar(c: C) { }
<meteoryte> class C {
<meteoryte> def foo() {
<meteoryte> bar(this);
<meteoryte> }
<meteoryte> }
<meteoryte> (sorry not in OCaml notation!)
vpalle has quit [Read error: 110 (Connection timed out)]
filp has joined #ocaml
authentic has quit [Read error: 104 (Connection reset by peer)]
authentic has joined #ocaml
^authentic has joined #ocaml
authentic has quit [Read error: 60 (Operation timed out)]
^authentic is now known as authentic
vpalle has joined #ocaml
<__me> I can read it anyway. So yes that's another example.
<flux> meteoryte, btw, ocaml doesn't need 'this' or 'self', but you can declare it if you need it
<flux> and if you have define an object inside an object you might want to choose different names for 'this'
<meteoryte> thanks flux; yes I noticed Ocaml is quite nice in this regard
__me has left #ocaml []
__me has joined #ocaml
__me has left #ocaml []
authentic has quit [Read error: 110 (Connection timed out)]
Kerris7 has joined #ocaml
rwmjones is now known as rwmjones_afk
ikaros has joined #ocaml
<munga> can I write a camlp4 entry that looks like [[ l = LIST1 var ; EOL - > l ]] where EOL is the end of line ?
<munga> alternatively, is there a way to look-ahead one character ? I remember this was possible with a hack in camlp5 ... some hack in camlp4 ?
rwmjones_afk is now known as rwmjones
vpalle has quit [Read error: 110 (Connection timed out)]
ikaros has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
willb has quit [Read error: 110 (Connection timed out)]
alexyk has joined #ocaml
sporkmonger has joined #ocaml
authentic has joined #ocaml
filp has quit ["Bye"]
vpalle has joined #ocaml
vpalle has quit [Client Quit]
<alexyk> anyone built ocamlbuild native with 3.11?
<alexyk> I don't see ocamlbuild.opt nor ocamlbuildlib.cmxa needed by stuff which worked under 3.10.2
<alexyk> make world.opt or opt.opt from top dir of 3.11 doesn't do it in ocamlbuild/
_zack has quit ["Leaving."]
<mfp> I find it somewhat irritating when something is released and you get on reddit: (1) the project upload page (2) the home page (3) the ML announcement (4) the blog announcement (identical to 3)
<Smerdyakov> I find it annoying to have anything to do with Reddit.
<mfp> the message is clearly "you're going to read it whether you like it or not"
<mfp> Smerdyakov: would you have preferred this not to happen? http://www.reddit.com/r/programming/comments/79fmj/urweb_is_a_domainspecific_language_for/
<Smerdyakov> I'm ambivalent.
<Smerdyakov> Lots of hits, but few bits of evidence that anyone is doing more than visiting tourist-style
Camarade_Tux has joined #ocaml
Camarade_Tux is now known as C_Tux|Busy
marmotine has joined #ocaml
willb has joined #ocaml
marmotine has quit [Remote closed the connection]
marmotine has joined #ocaml
oracle1_ has joined #ocaml
<oracle1_> hi
<oracle1_> hey im feeling quite stupid
<oracle1_> i have a curried function doRemain
<oracle1_> - : cmd -> cmd = <fun>
<oracle1_> which unrolls a loop from while loop to nested ifs
<oracle1_> basically the 2nd unrolling is doRemain (doRemain loop1)
<oracle1_> where loop1 is the block for what to put in after the nested if (just the original loop)
<oracle1_> how do I write this application (doRemain (doRemain (.. (doRemain loop1))..)
<oracle1_> hmm
<oracle1_> some basic recursion which i cant get right somehow
<olegfink> [let rec iterate n f v = let rec iter v = function 0 -> v | n -> iter (f v) (n-1) in iter v n]?
Stefan_vK1 has joined #ocaml
<oracle1_> hm and then iterate 3 doRemain loop1 or so
<oracle1_> lets see
<oracle1_> yey sexy ..
<oracle1_> # iterate 2 doRemain loop1 = unrolled2;;
<oracle1_> - : bool = true
<oracle1_> #
<oracle1_> :)
<oracle1_> hm so why 2 recursives, let me see
svenl has quit [kornbluth.freenode.net irc.freenode.net]
bohanlon has quit [kornbluth.freenode.net irc.freenode.net]
ulfdoz_ has quit [kornbluth.freenode.net irc.freenode.net]
vixey has quit [kornbluth.freenode.net irc.freenode.net]
shortc|desk has quit [kornbluth.freenode.net irc.freenode.net]
asabil has quit [kornbluth.freenode.net irc.freenode.net]
Stefan_vK has quit [kornbluth.freenode.net irc.freenode.net]
dfritz has quit [kornbluth.freenode.net irc.freenode.net]
Smerdyakov has quit [kornbluth.freenode.net irc.freenode.net]
jlouis has quit [kornbluth.freenode.net irc.freenode.net]
sbok has quit [kornbluth.freenode.net irc.freenode.net]
mjrosenb has quit [kornbluth.freenode.net irc.freenode.net]
tsuyoshi has quit [kornbluth.freenode.net irc.freenode.net]
mfp has quit [kornbluth.freenode.net irc.freenode.net]
hcarty has quit [kornbluth.freenode.net irc.freenode.net]
ski_ has quit [kornbluth.freenode.net irc.freenode.net]
sscj has quit [kornbluth.freenode.net irc.freenode.net]
<oracle1_> thanks olegfink.
svenl has joined #ocaml
bohanlon has joined #ocaml
mjrosenb_ has joined #ocaml
vixey has joined #ocaml
shortc|desk has joined #ocaml
asabil has joined #ocaml
Stefan_vK has joined #ocaml
dfritz has joined #ocaml
Smerdyakov has joined #ocaml
jlouis has joined #ocaml
sbok has joined #ocaml
ulfdoz_ has joined #ocaml
mjrosenb has joined #ocaml
tsuyoshi has joined #ocaml
mfp has joined #ocaml
sscj has joined #ocaml
ski_ has joined #ocaml
hcarty has joined #ocaml
mjrosenb has quit [Remote closed the connection]
<oracle1_> olegfink: ah the first does not need to be a rec
<oracle1_> let iterate n f v = let rec iter ..
<oracle1_> thanks
<oracle1_> bye
oracle1_ has left #ocaml []
johnnowak has joined #ocaml
alexyk has quit []
ulfdoz_ has quit [kornbluth.freenode.net irc.freenode.net]
hcarty has quit [kornbluth.freenode.net irc.freenode.net]
sbok has quit [kornbluth.freenode.net irc.freenode.net]
dfritz has quit [kornbluth.freenode.net irc.freenode.net]
ski_ has quit [kornbluth.freenode.net irc.freenode.net]
Smerdyakov has quit [kornbluth.freenode.net irc.freenode.net]
tsuyoshi has quit [kornbluth.freenode.net irc.freenode.net]
jlouis has quit [kornbluth.freenode.net irc.freenode.net]
vixey has quit [kornbluth.freenode.net irc.freenode.net]
Stefan_vK has quit [kornbluth.freenode.net irc.freenode.net]
asabil has quit [kornbluth.freenode.net irc.freenode.net]
mfp has quit [kornbluth.freenode.net irc.freenode.net]
shortc|desk has quit [kornbluth.freenode.net irc.freenode.net]
sscj has quit [kornbluth.freenode.net irc.freenode.net]
vixey has joined #ocaml
shortc|desk has joined #ocaml
asabil has joined #ocaml
Stefan_vK has joined #ocaml
dfritz has joined #ocaml
Smerdyakov has joined #ocaml
jlouis has joined #ocaml
sbok has joined #ocaml
ulfdoz_ has joined #ocaml
tsuyoshi has joined #ocaml
mfp has joined #ocaml
sscj has joined #ocaml
ski_ has joined #ocaml
hcarty has joined #ocaml
tsuyoshi has quit [Remote closed the connection]
sbok has quit [Remote closed the connection]
sbok has joined #ocaml
Stefan_vK has quit [Connection timed out]
vixey has quit [Connection timed out]
vixey has joined #ocaml
jlouis has quit [Connection timed out]
jlouis has joined #ocaml
ikaros has quit [".quit"]
_zack has joined #ocaml
pango has joined #ocaml
myki_ has quit [Read error: 104 (Connection reset by peer)]
<Smerdyakov> New release of Ur/Web, now with a reference manual! http://www.impredicative.com/ur/
<vixey> excellent :)
<vixey> Smerdyakov, hey you didn't find htmlize broken..? I've had to fix it recently
maskd has joined #ocaml
<Smerdyakov> Nope.
TaXules has joined #ocaml
tsuyoshi has joined #ocaml
johnnowak has quit []
mjrosenb_ is now known as mjrosenb
ygrek has joined #ocaml
alexyk has joined #ocaml
Stefan_vK1 has quit [Read error: 104 (Connection reset by peer)]
Yoric[DT] has joined #ocaml
fschwidom has joined #ocaml
hkBst has joined #ocaml
ulfdoz_ has quit [kornbluth.freenode.net irc.freenode.net]
hcarty has quit [kornbluth.freenode.net irc.freenode.net]
dfritz has quit [kornbluth.freenode.net irc.freenode.net]
ski_ has quit [kornbluth.freenode.net irc.freenode.net]
Smerdyakov has quit [kornbluth.freenode.net irc.freenode.net]
asabil has quit [kornbluth.freenode.net irc.freenode.net]
mfp has quit [kornbluth.freenode.net irc.freenode.net]
shortc|desk has quit [kornbluth.freenode.net irc.freenode.net]
sscj has quit [kornbluth.freenode.net irc.freenode.net]
shortc|desk has joined #ocaml
asabil has joined #ocaml
dfritz has joined #ocaml
Smerdyakov has joined #ocaml
ulfdoz_ has joined #ocaml
mfp has joined #ocaml
sscj has joined #ocaml
ski_ has joined #ocaml
hcarty has joined #ocaml
Jedai has quit [Read error: 110 (Connection timed out)]
Jedai has joined #ocaml
ulfdoz_ has quit [kornbluth.freenode.net irc.freenode.net]
hcarty has quit [kornbluth.freenode.net irc.freenode.net]
dfritz has quit [kornbluth.freenode.net irc.freenode.net]
ski_ has quit [kornbluth.freenode.net irc.freenode.net]
Smerdyakov has quit [kornbluth.freenode.net irc.freenode.net]
asabil has quit [kornbluth.freenode.net irc.freenode.net]
mfp has quit [kornbluth.freenode.net irc.freenode.net]
shortc|desk has quit [kornbluth.freenode.net irc.freenode.net]
sscj has quit [kornbluth.freenode.net irc.freenode.net]
vpalle has joined #ocaml
shortc|desk has joined #ocaml
asabil has joined #ocaml
dfritz has joined #ocaml
Smerdyakov has joined #ocaml
ulfdoz_ has joined #ocaml
mfp has joined #ocaml
sscj has joined #ocaml
ski_ has joined #ocaml
hcarty has joined #ocaml
Stefan_vK has joined #ocaml
Kerris7 has quit []
anders__ has joined #ocaml
BW^- has joined #ocaml
vpalle_ has joined #ocaml
fschwidom has quit [Remote closed the connection]
vpalle__ has joined #ocaml
vpalle__ has quit [Read error: 131 (Connection reset by peer)]
vpalle__ has joined #ocaml
psnively has joined #ocaml
vpalle has quit [Read error: 110 (Connection timed out)]
vpalle_ has quit [Read error: 110 (Connection timed out)]
<alexyk> anyone used APL or J or kx/Q with ocaml?
asabil has quit ["Ex-Chat"]
<alexyk> ...or without ocaml, for that matter? :)
<C_Tux|Busy> I actually wonder what these are (I don't think APL is the language, or is it ?)
BW^- has quit ["Miranda IM! Smaller, Faster, Easier. http://miranda-im.org"]
alexyk has quit []
ygrek has quit [Remote closed the connection]
<purple__> In the lwt source in lwt_unix.ml there is a note that "Non-blocking I/O and select does not (fully) work under Windows." with a list of possible issues. Is this due to the posix emulation of select() that i think occurs in cygwin dll (i have not used ocaml in anything other than linux). Does anyone know if there are plans to write native bindings to winsock ?
apples` has joined #ocaml
alexyk has joined #ocaml
willb has quit [Read error: 110 (Connection timed out)]
ofaurax has joined #ocaml
<olegfink> alexyk: I always wanted to, but what has APL to do with ocaml?
marmotine has quit ["mv marmotine Laurie"]
<alexyk> olegfink: well it's a functional language and looks compact :)
<alexyk> also ocaml has advantages in finance, and kx/Q also shines there
<alexyk> C_Tux: APL is the APL by Ken Iverson, J is his reincarnation of it, kx.com is a superfast database for finance with Q which is a gibberish-looking APL-like language
vpalle__ has quit [Connection timed out]
<psnively> Yeah, we might want to generalize the question to "Has anyone done vector operations as a concise library in Ocaml?"
<alexyk> there's also A+ used in Morgan Stanlet, aplusdev.org
<alexyk> ...Stanley
<alexyk> psnively: exactly
<alexyk> and all kinds of compressed-looking functions
<olegfink> ...and unicode alphabet :-)
Kerris7 has joined #ocaml
<C_Tux|Busy> alexyk, it looked unreadable to me but I'll give it another try ;)
<alexyk> olegfink: need labels for keyboard
anders__ has quit [Read error: 110 (Connection timed out)]
<alexyk> http://aplteam2.com/aplwiki/Frontpage -- examples, can translate into ocaml actually
<alexyk> ...or not
<olegfink> alexyk: use compose
<alexyk> olegfink: I'd rather remap ω to щ!
<alexyk> as in Rapira OS
<C_Tux|Busy> sleep... good night
<alexyk> g'night
C_Tux|Busy has quit ["Leaving"]
Yoric[DT] has quit ["Ex-Chat"]
_zack has quit ["Leaving."]
psnively has quit []
<alexyk> so ideally, a C++ interop with OCaml would match C++ classes to OCaml ones, a lá Boost.Python, correct?
rwmjones is now known as rjones_afk
hkBst has quit [Read error: 54 (Connection reset by peer)]
<alexyk> anyone used ocaml + swig?
alexyk has quit []
alexyk has joined #ocaml
vixey has quit ["There exists an infinite set!"]