<whee>
that is rather odd, I don't think that's actually a convention
<whee>
most wouldn't use if statements in that case, anyway
<whee>
but technically those if statements are nested
Rapiere has left #ocaml []
<vegai>
well, yeah... I guess
Vincenz has joined #ocaml
pattern_ has quit [Read error: 60 (Operation timed out)]
systems has joined #ocaml
<systems>
is it possible in ocaml, to create a function like the > operator
<systems>
i think not right
<Vincenz>
hmm
<Vincenz>
anyone have some good setup for interactive ocaml?
<Vincenz>
the interpreter is not that handy when typing multiline code and messing it up (copy paste and such...)
<systems>
check cameleon
<Riastradh>
Vincenz - The Tuareg Emacs mode works pretty well for me.
<whee>
systems: what do you mean like the > operator?
<Vincenz>
Riastradh: how do I set it up?
<Vincenz>
the one on the site?
<Riastradh>
Vincenz - Yes, that one. Put it in some directory, add that directory to your load-path with 'add-to-list,' and autoload 'tuareg-mode' from it.
<systems>
whee, for example a float function, that can take a float or an int and return float , i am not doing anything, learning the lang, i know this might not be useful
<Vincenz>
alright, I'll try, just so you know...I'm an emacs newb
<whee>
you lost me, heh
<systems>
'a -> float
<whee>
how is that related to >?
<systems>
> is 'a -> bool
<Riastradh>
Vincenz - OK, do this:
<Riastradh>
mkdir ~/elisp
<whee>
> is 'a -> 'a -> bool
<Riastradh>
cp tuareg-mode.el ~/elisp # or whatever the file is called
<Riastradh>
Then put in your ~/.emacs file:
<systems>
yep
<whee>
you could do something else that returned float, if you wanted to
<whee>
well, you'd have to find something meaningful to calculate that'd be a float result :P
<Riastradh>
If that doesn't work, just look in the comments near the top of the Tuareg mode file and you should find installation instructions; or maybe you'll find some elsewhere.
<Vincenz>
thanks a lot :)
<systems>
so i cannot redefine > to add support for example to my own types
<Riastradh>
Vincenz - And you can ask in #emacs for anything else you'd like to do with it.
<whee>
systems: no, you can't overload like that
* Vincenz
nods
<whee>
you could write a compare function for comparison purposes, and derive the rest from that
<Riastradh>
systems - Unless you make it be a method on objects, in which case you can just subclass the class that defines it and override the method.
<systems>
i dont really get it
<systems>
but i could be askin too soon
<systems>
ahh, multiple inheritense , i create a compare class, and make all the different object that i would need to compare inherit it, you meant that?
<Riastradh>
Yes.
<mrvn>
Or you write an comparable interface for each the way Set needs it.
<Riastradh>
That too.
<mrvn>
Or just use Pervasives.compare :)
<systems>
:)
<mrvn>
systems: > is already magical and works for everything
<mrvn>
systems: Might just not be the order you want
<systems>
thanks
<systems>
bye bye for now a bientot
systems has left #ocaml []
rox has joined #ocaml
<Vincenz>
What would one use to make guis in ocaml?
<mattam_>
lablgtk is a good one
mattam_ is now known as mattam
<Vincenz>
nothing standard?
<Vincenz>
what about native? win32?
<mattam>
nope
<whee>
no gui toolkit is standard on all platforms
<whee>
but you're pretty safe with gtk or tk
<Vincenz>
I've used tk in ruby and I don't like it much
<mattam>
lablgtk has a very nice object system
<mrvn>
Modules Graphics should run everywhere.
<mrvn>
Needs an X server on mac though I hear.
<whee>
yeah, it needs X11 on OS X
<whee>
but that's easy to get and use, so it's no biggie
<mrvn>
Is it hard to get lablgtk for win32?
<Vincenz>
I just found win32 bindings for ocaml
<whee>
that'd alienate quite a large number of users, though