mbishop changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab Ocaml 3.10.0 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
Yoric[DT] has quit ["Ex-Chat"]
leo037 has quit ["Leaving"]
magnus has joined #ocaml
thermoplyae has joined #ocaml
pixxi has joined #ocaml
pixxi has left #ocaml []
middayc has quit []
Smerdyakov has quit [Remote closed the connection]
Smerdyakov has joined #ocaml
nashdj has joined #ocaml
jlouis has joined #ocaml
ita has quit [Remote closed the connection]
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
mordaunt has joined #ocaml
Mr_Awesome has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
buluca has joined #ocaml
<jdavis_> My module uses sets inside, like "module StringSet = Set.Make(String)". I would like to be able to use those inner modules from programs that use my module. How do I say in my interface that it should have access to the entire sub-module (in this case one generated by Set.Make)?
__suri has joined #ocaml
_KS has joined #ocaml
mlasson has quit [Read error: 113 (No route to host)]
thermoplyae has quit ["daddy's in space"]
seafood_ has joined #ocaml
_KS_ has joined #ocaml
jlouis_ has joined #ocaml
_KS has quit [Nick collision from services.]
_KS_ is now known as _KS
jlouis has quit [Read error: 110 (Connection timed out)]
nashdj has quit [Read error: 110 (Connection timed out)]
<tsuyoshi> jdavis: I think if you put it in the interface it ought to work
buluca has quit ["Leaving."]
Boojum has joined #ocaml
buluca has joined #ocaml
Boojum is now known as Snark
seafood_ has quit []
ygrek has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
jderque has joined #ocaml
pwnguin has left #ocaml []
asmanur has joined #ocaml
kmeyer has quit [Remote closed the connection]
kmeyer has joined #ocaml
filp has joined #ocaml
buluca has joined #ocaml
<pango> jdavis_: module StringSet : Set.S with type elt = String.t seems to work fine
<pango> module StringSet = Set.S with type elt = String.t and type t = Set.Make(String).t look even better (gives the exact same signature as the one inferred for Set.Make(String))
_KS has quit []
marmottine has joined #ocaml
ttamttam has joined #ocaml
filp has quit [Remote closed the connection]
hkBst has joined #ocaml
zmdkrbou has quit [Read error: 110 (Connection timed out)]
asmanur has quit [Read error: 110 (Connection timed out)]
ttamttam has left #ocaml []
middayc has joined #ocaml
marmottine has quit [Read error: 113 (No route to host)]
ttamttam has joined #ocaml
ygrek has quit ["Leaving"]
mlasson_ has joined #ocaml
zmdkrbou has joined #ocaml
asmanur has joined #ocaml
Yoric[DT] has joined #ocaml
hcarty has quit ["leaving"]
hcarty has joined #ocaml
marmottine has joined #ocaml
ikaros has joined #ocaml
ikaros has quit [Remote closed the connection]
ikaros has joined #ocaml
gim_ has joined #ocaml
ttamttam has left #ocaml []
ikaros has quit ["segfault"]
ikaros has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
ikaros has quit [Remote closed the connection]
DukeDave has joined #ocaml
jderque has quit [Read error: 113 (No route to host)]
smimou has quit ["bli"]
jlouis has joined #ocaml
ygrek has joined #ocaml
Snark has quit [Read error: 113 (No route to host)]
jlouis_ has quit [Read error: 110 (Connection timed out)]
mordaunt has quit [Read error: 110 (Connection timed out)]
smimou has joined #ocaml
yangsx has joined #ocaml
yangsx has left #ocaml []
leo037 has joined #ocaml
jlouis_ has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
nashdj has joined #ocaml
rillig has joined #ocaml
jlouis has joined #ocaml
DukeTheDave has joined #ocaml
DukeTheDave has quit [Client Quit]
jlouis_ has quit [Read error: 110 (Connection timed out)]
DukeDave has quit [Read error: 110 (Connection timed out)]
jlouis has quit [Remote closed the connection]
jlouis has joined #ocaml
asmanur has quit [Remote closed the connection]
Smerdyakov has quit [Remote closed the connection]
Smerdyakov has joined #ocaml
ita has joined #ocaml
asmanur has joined #ocaml
buluca has joined #ocaml
Snark has joined #ocaml
pango_ has joined #ocaml
love-pingoo has joined #ocaml
jderque has joined #ocaml
pango has quit [Remote closed the connection]
asmanur has quit [Read error: 110 (Connection timed out)]
buluca has quit ["Leaving."]
Morphous has joined #ocaml
buluca has joined #ocaml
buluca has quit ["Leaving."]
Amorphous has quit [Read error: 110 (Connection timed out)]
Morphous is now known as Amorphous
mordaunt has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
gene9 has joined #ocaml
maayhem has joined #ocaml
<maayhem> hello
<maayhem> try (eval env e1) with | x -> (eval (bind_var v x env) e2)
<maayhem> I do this, I get this error:
<maayhem> This expression has type environment = value Env.t but is here used with type exn Env.t
<maayhem> ah, I think I understood, thanks anyway :)
<Smerdyakov> Which expression?
<maayhem> env
<flux> maayhem, do you use emacs or vi?
<maayhem> I use emacs
<flux> maayhem, and you're aware of C-c C-t?
<maayhem> I wasnt, just discovered, thanks :)
<maayhem> its awesome
<flux> maayhem, it's very helpful in type mismatch related problems
<flux> you were quite fast to try it out, recompile with -dtypes etc :)
<maayhem> I compile with -g
<maayhem> and it works
<flux> strange, I didn't know that
<flux> I don't think -g produces the .annot -file
<maayhem> C-c C-t gives me the type of the variable under the point
<maayhem> it does
<flux> it also handles whole expressions, if your point is over a whitespace
<maayhem> nice
<flux> now only if ocaml compiler was able to proceed after type errors
<flux> as to produce multiple error messages in one shot, and provide more type information when the code fails to compile
<flux> (it could for example consider the type to be equal to 'a, I suppose it would work most of the time)
<flux> but then again, perhaps that support would require big changes in the compiler..
<maayhem> it would turn real errors into compiled code too
<maayhem> by considering a polymorphic type while you generally dont want it
<flux> I didn't mean it would actually produce a binary
<maayhem> well, s/compile/interpret/
<flux> it would just consider the type to be 'a for the sake of proceeding in the compilation, to produce as many errors (which may not anymore be meaningful) after encountering one error; like what gcc does
<flux> I suppose type inference makes it more compilcated to implement than it is for gcc
<flux> do other compilers (sml, ghc) support producing multiple typing-related errors in one go?
gene9 has quit ["Leaving"]
<maayhem> dont know
<flux> other may contribute too.. ;-)
<flux> others, even
<Smerdyakov> SML/NJ and MLton do.
<flux> smerdyakov, they skip over both typing and syntax errors?
Tetsuo has joined #ocaml
<Smerdyakov> I wouldn't call it "skipping," but both can be processed such that more errors are reported afterward.
<flux> yeah, I too thought it wasn't good, perhaps a better one: proceed after
<flux> smerdyakov, does it practically never/sometimes/often occur that the following type errors are not actually errors, but result from the first type error?
<Smerdyakov> Sometimes
<flux> so in practice it appears to be a very useful feature
<flux> perhaps we'll get that to ocaml some day :)
<jderque> ghc seems to report only the first type error..
<maayhem> I have another beginner question : it seems like a parameter of type "fun" (anonymous function) can not just be a function but also a list
<maayhem> is it normal ?
<maayhem> maybe its considered as a constant function that always return the list ?
zmdkrbou_ has joined #ocaml
<maayhem> im seeing that almost any type will make it for a "fun" parameter
<flux> what is a 'fun' parameter?
<maayhem> let conj = fun b1 -> fun b2 -> [...]
zmdkrbou has quit [Read error: 113 (No route to host)]
<flux> depending in the contents of [...] b1 and b2 could be anything
<flux> that's the same as let conj b1 b2 = [...]
jeremiah has quit [Read error: 104 (Connection reset by peer)]
<flux> or even let conj = fun b1 b2 -> [...]
<flux> its return value is a function, not its input argument..
<flux> you can use C-c C-t to confirm that ;)
<maayhem> the problem is that its not a ML code but a ML-like language for which Im writing a compiler,
<maayhem> :)
<maayhem> its just ML-ish
<maayhem> and Im not understand how let conj fun a -> func b -> .. is supposed to mean something different than "taking 2 functions as parameter"
<flux> fun isn't a parameter type there
<flux> it's.. a function constructor
Tetsuo has quit [Remote closed the connection]
jeremiah has joined #ocaml
|jeremiah has joined #ocaml
<flux> let a = fun b -> b + 42
<flux> defines a function that takes an integer in and gives an integer out
|jeremiah has quit [Remote closed the connection]
<maayhem> alright, now lets see this code:
<maayhem> let conj = fun b1 -> fun b2 ->
<maayhem> match b1 with
<maayhem> | True ->
<maayhem> (b2 : bool)
<maayhem> | False ->
<maayhem> False
<maayhem> end
<maayhem> in
<maayhem> [...]
Tetsuo has joined #ocaml
<maayhem> False here is considered a constant func ?
<maayhem> or like identity on bools ?
<Smerdyakov> maayhem, aren't you asking about your own language? How can anyone answer?
DRMacIver has joined #ocaml
<flux> True and False would be constructors for a boolean type.. although smerdyakov kinda has a point here ;-)
<maayhem> Smerdyakov, its not my language, Its a toy language done by someone else and that language is supposed to follow ML
<Smerdyakov> maayhem, do you understand that [fun] isn't saying "here's an argument that's a function"?
<maayhem> well, flux just pointed that
<Smerdyakov> maayhem, rather, it's for defining functions anonymously.
nashdj has quit [Read error: 110 (Connection timed out)]
<maayhem> let conj = fun b1 -> fun b2 takes a parameter b1 and return an anonymous func so ?
<Smerdyakov> maayhem, I think you need to do more reading. You should have a specification of this language if you are to implement it.
<maayhem> there is no specification unfortunately, its supposed to be like a mini-ml
<maayhem> thats why Im asking here
<maayhem> I also read ocaml manual and ocaml-tutorial.org and more ..
<maayhem> but not all subtilities are explained
<maayhem> there
<DRMacIver> Hi. I wanted an example of extensible records / row polymorphism to demonstrate something. I was under the impression that OCaml had this, but it looks like it doesn't. Is that right? (It has it for the object system, but not for record types by the looks of it)
<DRMacIver> I'm happy with a link or a keyword to search for. The manual wasn't very informative and I can't seem to reproduce anything that looks right in the repl. :)
<Smerdyakov> maayhem, so you are really asking about OCaml semantics, just asking about it with your own goofy syntax solely to confuse us? :P
<maayhem> Smerdyakov, ahah yea kinda :)
<Smerdyakov> maayhem, please ask all future questions about OCaml and ignore your language.
<maayhem> Smerdyakov, the piece of code I pasted could be ocaml right ?
<Smerdyakov> maayhem, no.
<maayhem> why not ?
<Smerdyakov> maayhem, you shouldn't have to ask. Get the OCaml toplevel and try it.
<maayhem> ok
<maayhem> well, there is the end
<maayhem> which is not ocaml
<maayhem> but I mean _except_ the end
<maayhem> :)
<Smerdyakov> You are free to define a type with constructors [True] and [False], but they are [true] and [false] in the OCaml standard library.
<maayhem> ok sure, I have defined my own True | False ..
<maayhem> also in ocaml, it seems like the "in" of the let conj = fun ..
<maayhem> doesnt work
<maayhem> because conj is anonymous ?
<maayhem> I guess so .. but now I dont understand how this test is supposed to pass even in my toy language ..
_JusSx_ has joined #ocaml
<_JusSx_> hi OCAML ppl
<Smerdyakov> Top-level [let]s in OCaml have no [in]s.
<Smerdyakov> Put parentheses around your whole program and it will be treated more like you expect.
asmanur has joined #ocaml
<maayhem> Smerdyakov, it worked
<DRMacIver> So, extensible records? :)
<maayhem> it doesnt answer if yes or not, a fun bool -> bool parameter can be passed as a (bool, bool) list
<maayhem> well, it seems to work for me unless I misinterpret it
thermoplyae has joined #ocaml
<Smerdyakov> DRMacIver, I think it might only be available through objects.
<DRMacIver> Yeah. That's what my experiments looked like. But I've been bombarded by people saying "Structural subtyping is so cool! You should look at how OCaml does it!" and must have somehow assumed that this meant that the records had structural subtyping.
<Smerdyakov> No, they mean the object system.
Jedai has joined #ocaml
<DRMacIver> Yeah, looks like. Ok. Thanks.
ttamttam has joined #ocaml
ttamtta1 has joined #ocaml
ttamttam has left #ocaml []
ttamtta1 has left #ocaml []
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
Associat0r has quit []
Demitar has quit [Remote closed the connection]
Demitar has joined #ocaml
Associat0r has joined #ocaml
middayc_ has joined #ocaml
<mbishop> Whoa
<mbishop> I visit this site, "plnews.org" a lot
<mbishop> and I just noticed now that it has a "Caml Powered" logo on it
<mbishop> anyone know who runs it?
<flux> no idea, but thanks for the link
<flux> ah, and now I learn apparently ocaml 3.10.1rc2 has been released ;)
<mbishop> heh
<mbishop> yeah that's a neat site
<mbishop> I just emailed them asking if they would tell me about the implementation of the site and why they use ocaml
<flux> I guess you know programming.reddit.com and planel ocaml?
Smerdyakov has quit ["go fly fly plane"]
<mbishop> yep
<flux> planel.. now that's a weird typo, t's nowhere near l
<mbishop> both good (although ocaml links on reddit get downvoted a lot) :(
<flux> (o is, though)
<flux> contribute to upvoting by checking the new links too ;)
<mbishop> well most are submitted by me :P
<DRMacIver> mbishop: It's harrop's fault. :) (I tend to upvote them)
<flux> it might be true that the downvotes are mostly due to ocaml being associated with jdh..
<mbishop> yeah, that's what it seems, sadly
<mbishop> that or people think Microsoft owns it now because of F#
<flux> heh
<mbishop> someone actually said that once heh
<DRMacIver> Eh. Microsoft do good stuff with .NET.
<flux> is ms part of the ocaml consortium, btw?
<mbishop> something about how microsoft is in the ocaml consortium, and how the yare scared of it
<flux> (it only costs money, and not even a lot)
<flux> so, they are
<flux> not really surprising
* mbishop nods
<flux> it'd be nice to see more companies there
<flux> otoh: too many people discussing matters might prohibit actual progress..
<flux> hm, s/probihit/hinder/
middayc has quit [Read error: 110 (Connection timed out)]
bluestorm has joined #ocaml
<middayc_> whar is ocaml planet? thanks for link to plnews (btw I didn't know rebol had an OS version)
middayc has joined #ocaml
middayc_ has quit [Read error: 104 (Connection reset by peer)]
<flux> argh, I even _googled_ for planel ocaml, what's wrong with me.. (must be the keyboard) but the site is ocaml.cn/ocaml ; there's an english rss feed down the page
<middayc> aha .. I found that one too now
<flux> (I wonder if ocaml is any popular in china..)
<flux> well, atleast trends.google.com doesn't any any china-specific records on ocaml, but I don't know if google is significant around there..
Snark has quit ["Quitte"]
asmanur has quit [Remote closed the connection]
<orbitz> how does INRIA feel abtu F#? In on sense it's good, peopel will start usign it hopefully, in the other though once MS gets a decent F# base they may start pshing it in their own direction..
<bluestorm> i haven't seen so much INRIA feelings out here
<ita> m$ will definitely push in their own direction, inria or not
<bluestorm> i'm not sure F# is mature enough yet
<bluestorm> i mean, they audaciously added lots of features
<flux> one part of them should be happy to get something ocaml-based backed by a giant, even if they aren't involved in it.. obviously ms has some resources inria doesn't.
<bluestorm> and now they're adding "Deprecated" tags at some places
<flux> otoh, perhaps they feel a bit left out, if they are able to have that kind of feelings ;)
<maayhem> who leads the F# project ?
<flux> it'd be nice if ocaml were a bit more open - it is my understanding (please correct me if I'm wrong) that the folks at inria aren't very acceptive of code submissions made by third parties
<orbitz> from what i've seen they are reluctant to add things to teh stdlib beacuse it gives them more stuff that they need to keep at a certain quality
<flux> that's a good point of view. I don't think the stdlib needs that much _more_ stuff, but the stuff that's already there should be more consistent.
<flux> although some stuff should just come with ocaml: for example ocamlfind
<flux> it's something all (?) ocamlers use, and it greatly simplifies using third party packages
<orbitz> i'm not a big fan of ocaml's build system
<flux> the new one?
<flux> I haven't actually tried it out
<flux> for ocamlfind there is no competition
<orbitz> i'm not sure about new one i've mosl just been plaing with ocamlc/ocamlopt
<orbitz> and get seriously annoyed by all the diferent extensions
<flux> so your complaint is that there is no build system?
<flux> examples?
<orbitz> i'm not sure that is my complaint
<flux> I think ocamlc and ocamlopt are quite nice. very similar to gcc etc.
<orbitz> i'm used to working with somethig nlike erlang where regardless of native or bytecode compilation you get the same file name output
<orbitz> (althouhg granted naive compilatin in erlang is much diff than ocaml)
<flux> so you'd like to mix and match?
<flux> binaries and byte code?
<flux> I think that'd be a big feature - and IMO useless..
<orbitz> i mean when i compiel with ocamlopt i get .cmx files, and if i link against nums i need to use nums.cmxa
<flux> big as in it'd be a big task to implement
<orbitz> if i go back ot bytecode for debugging
<orbitz> i get a whole new bunch of filenames
<flux> simple files are .cmo or .cmx, archive files are .cma or .cmxa
<flux> s/simple/single object/
<orbitz> right, and i find that annoying
<flux> .o and .a, same in C :)
<ita> the problems really start when linking with c/c++ apps
<orbitz> no
<flux> (except C doesn't have two kinds of output files)
<orbitz> roght
<pango_> orbitz: seems you need ocamlfind
<orbitz> and i don't care about .a's in C, -l find sit for me
<orbitz> pango_: i'll play with it
<flux> with ocamlfind you just -package num and it works
<orbitz> bear in mind i'm mostly jus tplaying around and using a trivial makefile
<flux> to reiterate my point: ocamlfind is something every ocamler uses, or _should_ use :-)
<flux> so the only point you'll see any .cma-files would be when you create your own libraries
<pango_> (haven't played yet with ocamlbuild either, so I can't compare)
mordaunt has quit [Remote closed the connection]
<flux> (a related issue: I'm having trouble generating a .cma that links in libcamlidl.a in, is the only (nice) option to just use ocamlfind here.. the other .o-files appear to go in just fine.)
<flux> s/ in//2
_JusSx_ has quit [Read error: 110 (Connection timed out)]
robyonrails has joined #ocaml
yminsky_ has joined #ocaml
yminsky_ has quit []
rillig has quit ["exit(EXIT_SUCCESS)"]
ygrek has quit [Remote closed the connection]
jderque has quit [Read error: 113 (No route to host)]
zmdkrbou_ has quit [Read error: 110 (Connection timed out)]
DRMacIver has left #ocaml []
Tetsuo has quit ["Leaving"]
filp has joined #ocaml
filp has quit [Read error: 104 (Connection reset by peer)]
<flux> uh.. any ideas how to express the C idiom struct foo { int a, b; }; struct foo_child { struct foo base; int c; }; struct foo_child2 { struct foo base; char d; char* e}; with camlidl?
<flux> I'm thinking I need to handle it through abstract plus self-written conversion code..
ahnfelt has joined #ocaml
bluestorm has quit ["Konversation terminated!"]
robyonrails has quit ["Leaving"]
<hcarty> flux: camlidl only has ocamlfind support in the Godi version
<hcarty> It applies some patches to add ocamlfind support. Those patches are not there (yet) in Debian or the original source code.
<hcarty> After seeing your conversation about Chipmunk the other day I tried to use camlidl to wrap that ... and it turns out that I don't know enough to make that happen quickly + easily yet
<hcarty> It seems like it should not be too difficult though with the proper know-how
marmottine has quit ["Quitte"]
hkBst has quit ["Konversation terminated!"]
mordaunt has joined #ocaml
<hcarty> flux: Nevermind... I just saw your list post
_KS has joined #ocaml
middayc has quit []
zheng has joined #ocaml
zmdkrbou has joined #ocaml
yminsky_ has joined #ocaml
yminsky_ has quit []
seafood_ has joined #ocaml
ahnfelt has left #ocaml []
buluca has joined #ocaml
zheng has quit ["ERC Version 5.3 (devel) (IRC client for Emacs)"]
gim_ has quit [Client Quit]