cjohnson has quit [Read error: 232 (Connection reset by peer)]
cjohnson has joined #ocaml
kinners has joined #ocaml
cjohnson has quit [Read error: 54 (Connection reset by peer)]
cjohnson has joined #ocaml
GreyLensman has quit ["Leaving"]
shawn_ has quit [Read error: 232 (Connection reset by peer)]
cjohnson has quit [Read error: 232 (Connection reset by peer)]
shawn_ has joined #ocaml
cjohnson has joined #ocaml
cjohnson has quit ["The main attraction: distraction"]
dxlvi has joined #ocaml
kinners has quit ["leaving"]
mrsolo_ has joined #ocaml
dxlvi has quit ["dans med da djävul"]
creichen has joined #ocaml
<creichen>
Hi everyone! I'd like to use the O'Caml optimising compiler backend as a backend for a little toy of mine; however, some posting that I found in a mailing list archive seems to indicate that the lambda intermediate representation differs a bit for bytecode vs. native compilation.
<creichen>
Does anyone happen to know any documentation on this topic?
mlh has quit [Client Quit]
mlh has joined #ocaml
<Nutssh>
Don't worry much about it?
ez4 has quit ["Quitting!"]
<det>
creichen: Ocaml optimizes! News to me :D
<Nutssh>
Well, technically its a native code compiler, with a little optimization.
pango has quit ["Client exiting"]
pango has joined #ocaml
mlh has quit [Client Quit]
vezenchio has joined #ocaml
mrsolo__ has joined #ocaml
mrsolo_ has quit [Read error: 242 (No route to host)]
Herrchen has joined #ocaml
mlh has joined #ocaml
m3ga has joined #ocaml
m3ga has quit [Client Quit]
_fab has quit [Remote closed the connection]
grom358 has joined #ocaml
kinners has joined #ocaml
kinners has quit ["leaving"]
grom358 has quit []
_fab has joined #ocaml
cjohnson has joined #ocaml
CosmicRay has joined #ocaml
karryall has joined #ocaml
haelix has quit [Read error: 104 (Connection reset by peer)]
mlh has quit [Client Quit]
_fab has quit [Remote closed the connection]
monochrom has joined #ocaml
<vincenz>
Hmmm...
<vincenz>
question
<vincenz>
type test = Alpha of int*int | Beta;;
<vincenz>
let a = Alpha 1 2;; doesn't work
<vincenz>
(syntax error
<Demitar>
int * int is a tuple, tuples are separated by commas.
_fab has joined #ocaml
<Demitar>
And Alpha 1, 2 is interpreted as (Alpha 1), 2 so you'll have to add parentheses too.
<vincenz>
yeah I know
<vincenz>
I did that
<Demitar>
Hmm? I see Alpha 1 2 where there should be Alpha (1, 2)
<vincenz>
yup
<vincenz>
I got it after I asked my question
Nutssh has quit [Read error: 104 (Connection reset by peer)]
<Demitar>
Well "I know" doesn't translate into "I figured it out" very efficiently in my mind. ;-)
<vincenz>
sorry, busy :/
<vincenz>
Anyone that has worked with Makefiles?
<vincenz>
(with ocaml)
<vincenz>
I got it working, but now I'm separating my sources in multiple dirs...)
<Smerdyakov>
There are standard Makefiles that you should use instead of constructing your own.
<vincenz>
where?
<vincenz>
I mean where do I get them, and I do have a standard makefile which uses a .depend and such
<monochrom>
recursion into directories is well explained in the make manual. look for "recursive" or "recursion".
<monochrom>
I say that because I can't explain it better than the manual.
Nutssh has joined #ocaml
<Smerdyakov>
vincenz, are you using Ocamlmakefile?
<vincenz>
nope
<Smerdyakov>
vincenz, try it. :-)
<vincenz>
alright
<vincenz>
I was just hoping to use makefiles for the moment
<Smerdyakov>
That _is_ a Makefile.
<vincenz>
yes but it requires an external tool, no?
<Smerdyakov>
No
<vincenz>
oh
<Demitar>
I'm more and more leaning towards omake, simply because I easily spend more time running make than compiling when traditional make... :)
<Demitar>
s/when/when using/
haakonn has joined #ocaml
pango has quit ["Leaving"]
haakonn_ has quit [Read error: 238 (Connection timed out)]
pango has joined #ocaml
rosho333 has joined #ocaml
rosho333 has quit [Client Quit]
fooli has joined #ocaml
<fooli>
hello
<fooli>
is it possible to make one distribution, preferably a single exe, to run some ocaml code in windows environment (95, me, nt4, w2k, w2003, xp) with bundled open gl libraries and a wrapper or ocaml library for it, like perhaps LablGL and Mesa?
<Smerdyakov>
I think that is the default situation, actually.
<Smerdyakov>
(Modulo licensing restrictions)
<fooli>
smerdyakov, ok, so do you mean mesa libraries will be statically linked in if I use some LablGL code?
<Smerdyakov>
I mean that whether or not libraries are statically linked is controlled at the C level. OCaml links all its own stuff statically by default, as far as I know.
<fooli>
Yes. The difficult part for me to know is precisely how OCaml works with C and through it to external libraries.
<fooli>
I wonder if there's any good tutorial how to link LablGL and Mesa together.
<Blicero>
what does ocaml have in way of cross platform gui toolkits
<fooli>
Well, I haven't used OCaml ever, but there's Gtk and Gtk+-2.0 bindings, and those work in normal unixes and wintoys.
<fooli>
So my guess is that your OCaml GUI code using those libraries would be directly portable.
<Blicero>
ah, nice
foolio has joined #ocaml
fooli has quit [Read error: 110 (Connection timed out)]
foolio is now known as fooli
pflanze has joined #ocaml
gl has quit [Read error: 60 (Operation timed out)]
gl_ has joined #ocaml
gl_ is now known as gl
Blicero has quit [Read error: 54 (Connection reset by peer)]
karryall has quit [Ping timeout: 14400 seconds]
eugos has joined #ocaml
Herrchen has quit ["bye"]
mrsolo__ has quit [Read error: 110 (Connection timed out)]
eugos has quit ["Leaving"]
vezenchio has quit ["None of you understand. I'm not locked up in here with you. YOU are locked up in here with ME!"]
Submarine has joined #ocaml
cmeme has quit [Read error: 232 (Connection reset by peer)]
mrsolo__ has joined #ocaml
cmeme has joined #ocaml
cmeme has quit [Read error: 113 (No route to host)]
cmeme has joined #ocaml
cjohnson has quit ["The main attraction: distraction"]
pawelb has joined #ocaml
Mike6543 has joined #ocaml
Submarine has quit ["ChatZilla 0.8.31 [Mozilla rv:1.4.1/20031114]"]
<vincenz>
Can you have 'friend modules'?
<vincenz>
(aka modules that can read the type inside)
<Smerdyakov>
I don't think so.
<Smerdyakov>
You can put all such modules within one container module, though.
dobrek has joined #ocaml
<vincenz>
hmm
<vincenz>
thnx
<dobrek>
hallo
Mike6543 has left #ocaml []
<vincenz>
how do you open cmxa's in ocaml again?
<dobrek>
any camlp4 masters or users ? I have a following problem I would like to write something like <:str_item< value a () = List.iter print_string [ $list:some_list$ ] >> but this doesn't work.
<dobrek>
I works if I use array for instanve <:str_item< value a() = Array.iter print_string [| $list:some_list$ |] >>
<dobrek>
It has probably something to do with list construction semantic in revised syntax but I don't know what.
<dobrek>
Any suggestions more than welcome.
mrsolo__ has quit [Read error: 60 (Operation timed out)]
CosmicRay has quit ["Client exiting"]
dobrek has quit ["ChatZilla 0.9.61 [Mozilla rv:1.7.3/20041005]"]
mlh has joined #ocaml
Axioplase has joined #ocaml
Axioplase has quit [Client Quit]
<creichen>
Hmm... is there any easier way to do 'class type t = object f : u end and u = { x : t };;' than to parameterise 't' by 'u' and instantiate it afterwards?
<Smerdyakov>
I don't understand what you mean by "parameterise 't' by 'u'," if u depends on t...
<Smerdyakov>
Oh, I see. You're saying that code _doesn't_ work. Right?
<creichen>
Exactly, yes.
<Smerdyakov>
type t = < method f : u > and u = { x : t}
<Smerdyakov>
Er
<Smerdyakov>
type t = < f : u > and u = { x : t}
<Smerdyakov>
There. :-)
<creichen>
But won't that turn 't' into a... what's it called "closed type"? Well, let me try it first.
<creichen>
Thanks for the suggestion, in any case!
pflanze has quit [Read error: 110 (Connection timed out)]
<Smerdyakov>
I don't understand you.
<creichen>
No, it seems to be working perfectly. No idea what my problem was last time. Thanks!
<creichen>
I believe that I tried something similar a while back, which essentially resulted in some complaints from the side of the type checker distinguishing "< f : u >" and '< f : u; ..> as 'a".
<Smerdyakov>
That was probably because you weren't casting the second expression to type t.
<Smerdyakov>
You need explicit casts whenever you want to "drop" fields from the known type of a value.
<Smerdyakov>
Er, drop methods.
<creichen>
It's possible that I wasn't doing it at that point, yes.
<Smerdyakov>
Or, maybe you needed to give an explicit type annotation for a function parameter, to say that it has type t.
<Smerdyakov>
Otherwise, if f is the only method used, you would get that overly general type inferred.
<creichen>
Ah... yes, that actually sounds more likely.
<creichen>
But why would the type checker disallow a function taking a value of type "< f : u; ..> as 'a" to be applied to a value of type "< f : u >"? From a structural subtyping point of view, it seems that those two types should be the same.
<creichen>
s/structural subtyping/structural type equivalence/
<Smerdyakov>
OCaml has no implicit subtyping.
<Smerdyakov>
This just keeps with the existing ML philosophy.
<creichen>
That makes perfect sense to me, however...
<Smerdyakov>
By "no implicit subtyping," I mean no implicit coercions from a value's type to a supertype.
<creichen>
What's the difference between the types "< f : u; ..> as 'a" and "< f : u >"?
<Smerdyakov>
The first one doesn't provide you any way to find the address of f.
<Smerdyakov>
Objects are stored with flat dispatch tables using a canonical method order.
<Smerdyakov>
Without knowing all methods, the table layout is under-determined.
<creichen>
Ah, OK... so the first method has to search for the appropriate function (Smalltalk-style, IIRC), whereas the second one is guaranteed to be passed a structure from which it can directly derive the appropriate function pointer (statically-typed-single-inheritance-OO-language style)?
<creichen>
So it's a performance thing (little pain for potentially considerable gain), not some subtle type-theoretical issue, then...
<Smerdyakov>
There is no Smalltalk-style lookup possible in OCaml.
<Smerdyakov>
All type information is forgotten during compilation.
<creichen>
So the first type I mentioned is simply not allowed to occur as the type of any entity that is visible externally (outside of a unit of compilation)?
<mattam>
interface types are kept until link time...
<mattam>
nevermind
<Smerdyakov>
creichen, yes.
kinners has joined #ocaml
<creichen>
Smerdyakov: Again, thanks for your explanation!
<creichen>
Sorry for the lack of thematic change in the issues I bring up, but how do I define a class that is mutually recursive with a function ("class c = object method g = f () end;; let f _ = new c;;")?