sponge45 changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/
malc__ has joined #ocaml
dark_light has joined #ocaml
dark_ has joined #ocaml
malc_ has quit [Read error: 110 (Connection timed out)]
bluestorm has quit ["Konversation terminated!"]
_JusSx_ has quit [Read error: 110 (Connection timed out)]
smimou has quit ["bli"]
pants1 has joined #ocaml
swater_ has quit ["Quat"]
love-pingoo has joined #ocaml
structured has quit [Read error: 110 (Connection timed out)]
malc__ has quit ["leaving"]
love-pingoo has quit ["Connection reset by pear"]
mikeX has quit ["leaving"]
mnemonic has quit ["leaving"]
bzzbzz has joined #ocaml
dark_ has quit ["Ex-Chat"]
Smerdyakov has quit ["Leaving"]
johnnowak has joined #ocaml
zhllg has joined #ocaml
<flux->
it is, atleast here
diffbavis has quit [Read error: 104 (Connection reset by peer)]
Mr_Awesome has quit ["...and the Awesome level drops"]
pants1 has quit [Read error: 110 (Connection timed out)]
diffbavis has joined #ocaml
love-pingoo has joined #ocaml
love-pingoo has quit [Read error: 104 (Connection reset by peer)]
love-pingoo has joined #ocaml
smimou has joined #ocaml
smimou has quit ["bli"]
johnnowak has quit []
love-pingoo has quit ["Connection reset by pear"]
love-pingoo has joined #ocaml
Submarine has quit ["Leaving"]
ulfdoz_ has quit [zelazny.freenode.net irc.freenode.net]
diffbavis has quit [zelazny.freenode.net irc.freenode.net]
jlouis has quit [zelazny.freenode.net irc.freenode.net]
bebui has quit [zelazny.freenode.net irc.freenode.net]
mattam has quit [zelazny.freenode.net irc.freenode.net]
zmdkrbou has quit [zelazny.freenode.net irc.freenode.net]
oracle1 has quit [zelazny.freenode.net irc.freenode.net]
jdev has quit [zelazny.freenode.net irc.freenode.net]
ulfdoz_ has joined #ocaml
diffbavis has joined #ocaml
jlouis has joined #ocaml
bebui has joined #ocaml
mattam has joined #ocaml
zmdkrbou has joined #ocaml
jdev has joined #ocaml
oracle1 has joined #ocaml
descender has quit [Read error: 104 (Connection reset by peer)]
swater has joined #ocaml
descender has joined #ocaml
Submarine has joined #ocaml
johnnowak has joined #ocaml
johnnowak has quit []
bluestorm has joined #ocaml
swater has quit [Read error: 110 (Connection timed out)]
swater has joined #ocaml
diffbavis has quit [Read error: 113 (No route to host)]
swater has quit ["Quat"]
swater has joined #ocaml
descender has quit [Read error: 110 (Connection timed out)]
pango has quit [Remote closed the connection]
pango has joined #ocaml
mikeX has joined #ocaml
Smerdyakov has joined #ocaml
diffbavis has joined #ocaml
ikaros_ has joined #ocaml
SooW has joined #ocaml
<SooW>
hi everyone
<SooW>
i'm looking howto make typedefs in ocaml
<Smerdyakov>
Have you read the tutorial in the manual?
<SooW>
i tried "type <my_new_def> = <my_old_type>"
<SooW>
but i'm getting incompatibility errors
<Smerdyakov>
I don't know what an "incompatibility error" is./
<SooW>
(expression has type x but is here used with type y)
<SooW>
but they should be the same
<SooW>
maybe, it's because my typedef is inside a module, therefore, the other module cannot see the real declaration of the type ?
benny__ has joined #ocaml
<Smerdyakov>
If you've made the type abstract, then that's how it will be treated.
<Submarine>
Smerdyakov, Ah, you!
<Smerdyakov>
As always, it's best to create a minimal example illustrating your problem and post a URL to it, including precise error messages in comments.
<SooW>
no, i didn't, i suppose that's the idea
<Smerdyakov>
Submarine, is that so?
<Submarine>
Would you happen to know of a system that does quantifier elimination over the theory of the real closed fields, possibly only working for low degrees?
<Submarine>
I mean, I know QEPCAD and Mathematica.
<SooW>
abstract type are just redefinition of types ?
<Submarine>
the former seems to suck a lot
<Submarine>
Mathematica is not always clever
<bluestorm>
hm SooW
<bluestorm>
i'm far from being a module expert
<Smerdyakov>
Submarine, no
<bluestorm>
but you may have to give the type definition in the module signature too
<Smerdyakov>
SooW, no. Read the tutorial section on modules to learn what abstract types are.
<SooW>
ok, i'll post a small example in a second
<bluestorm>
if you give it in the code part only, caml may suppose it should be hidden
<bluestorm>
(i mean in the .mli file)
<SooW>
bluestorm, yes, but mli only contains "type x" but not its definition
<bluestorm>
try to give it the whole definition
swater has quit ["Quat"]
<SooW>
seems to work with a small example
<SooW>
maybe the problem isn't the one i thought
swater has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
benny has quit [Read error: 110 (Connection timed out)]
ikaros_ has quit ["Leaving"]
jlouis has joined #ocaml
<SooW>
Smerdyakov, i've got another question
<SooW>
i'm sharing memory with C and CAML
<SooW>
a bigarray, which is really big :)
<SooW>
and i would like to know how ocaml use object like that
<Smerdyakov>
I don't know.
<SooW>
as an argument, is it copied or referenced ?
<SooW>
ok
<SooW>
is there some kind of neutral value (like NULL) for objects, or should i use None | Some of 'a ?
<Smerdyakov>
I have a feeling you should read the tutorial in the manual.
<SooW>
there's nothing like that on the tutorial
<Smerdyakov>
The tutorial would make it clear that there is no generic "neutral value" in any context.
<SooW>
there's no example of objects referencing objects in one of their mutables
<SooW>
Smerdyakov, wrong, lists have their [], integers have their 0
<Smerdyakov>
Neither of those is a "generic neutral value" as I meant the phrase.
<SooW>
I think I'd understand if I could see an example of objects in objects :s
<Smerdyakov>
Why do you want to use objects?
<SooW>
because I prefer this pattern, and moreover, I'll need to make subclasses
<Smerdyakov>
You can't "need to make subclasses" if you don't use objects. :P
<SooW>
yes, but i'm making an OCR and i need to define a few detection area (chars, words, lines, blocks...) which mostly have to same methods
<SooW>
at least, that's what i think
<Smerdyakov>
That sounds like something that I'd implement with a functional combinator library.
<SooW>
i don't know what it means :s
<Smerdyakov>
That's not surprising. In general, you can use OCaml much more effectively if you take the time to learn the lay of the land in functional programming, instead of trying to write Java programs in OCaml.
<Smerdyakov>
I think objects are usually the wrong implementation tool.
<SooW>
i don't think so
<SooW>
that's true that i'm not used to fonctional programing
<SooW>
+m
<SooW>
but i HAVE to do it in OCaml, whether I like it or not
<Smerdyakov>
I think it's more than just "not used to." I think you haven't decided that you will learn functional programming.
<SooW>
most caml big projects use imperative, because functional is beautiful, but not really fast actually
<Smerdyakov>
That would be news to me. I think most OCaml projects use mostly functional code.
<Smerdyakov>
Sure, it's common to have some imperative stuff in most projects, but it's not the central organizing principle.
pango has quit [Remote closed the connection]
pango has joined #ocaml
<SooW>
well, i think I've got the point after a year of OCaml, but I really need to pass an object to a fucntion, and I don't know if it will be a reference or the data
<love-pingoo>
SooW: objects are not copied
<love-pingoo>
nothing is copied actually, afaik
<SooW>
love-pingoo, thank you
<love-pingoo>
SooW: for copies you have Oo.copy, but I never used it
<SooW>
so if a mutable of my class is an object, i can just write "val mutable x = my_object" ?
<love-pingoo>
you can certainly write that
<love-pingoo>
an object is a value like an other
<SooW>
and if it has no value when i initialize it, what should I write after "val mutable x = " ?
<SooW>
actually, can i do it ?
<love-pingoo>
you should use an option type in that case
<SooW>
ok, that what i thought
<SooW>
thank you both.
<SooW>
time to eat
<love-pingoo>
there must always be something at initialization, the option type is there to make it explicit that there is a possibility that x is not defined
<love-pingoo>
SooW: bon appetit
<SooW>
:)
swater has quit ["Quat"]
swater has joined #ocaml
smimou has joined #ocaml
descender has joined #ocaml
Mr_Awesome has joined #ocaml
diffbavis has quit [Read error: 104 (Connection reset by peer)]
swater has quit ["Quat"]
diffbavis has joined #ocaml
diffbavis has quit [Read error: 110 (Connection timed out)]
SooW has quit ["Quitte"]
bluestorm has quit ["Konversation terminated!"]
Submarine has quit ["Leaving"]
slipstream has joined #ocaml
pants1 has joined #ocaml
smimou has quit ["bli"]
SooW has joined #ocaml
<SooW>
re
<SooW>
caml is optimized for terminal recursion, isn't it ?
<SooW>
it souldn't Stack overflow with something terminal ?