<MegaWatS>
right now im trying to define a class with an explicit class type but its giving me a syntax error and I dont know why :(
<pnou>
can you paste it?
<MegaWatS>
class ['a] variable (fs: 'a tfontserv) (v: string) (sz: int) : ('a, unit) tformula = <--- this is where it says its a syntax error
<pnou>
let's see if i am realy awake :)
<MegaWatS>
tformula is a class type which is declared like "class type ['a,'b] tformula = ..."
<MegaWatS>
i didnt have the type annotations for the parameters in there at the beginning, i only wanted to declare the return type
<pnou>
hum
<MegaWatS>
but after it gave me a synatx error, i put those in but it still doesnt work :/
<pnou>
class ['a] variable : ['a, unit] tformula = object end
<MegaWatS>
ah
<MegaWatS>
it works
<MegaWatS>
hmm
<MegaWatS>
whats the logic behind when you have to use [ brackets ] and when you have to use ( parentheses ) to group type parameters?
<MegaWatS>
when i declare a method, for instance, which returns a ('x,'y) tformula, it gives me a syntax error when i use brackets
<pnou>
brackets for class type and parentheses for raw type
<MegaWatS>
raw type?
<pnou>
everything else :)
<MegaWatS>
ah i see
<pnou>
type defined by « type »
<MegaWatS>
because i declared a class ... which is actually kind of a function - now it starting to make sense
<MegaWatS>
so when i do inheritance i have to use the [ ] also
<pnou>
yes
<MegaWatS>
but when it is used only as a type, not as a class, you use ( )
<MegaWatS>
ok
<MegaWatS>
thx
<pnou>
welcome :)
<pnou>
what are you doing ?
<pnou>
it seems funny
<MegaWatS>
what seems so funny about it?
<pnou>
the names of your class make me think it's interesting
<MegaWatS>
ah fun not funny :>
<pnou>
hum
<MegaWatS>
well its supposed to become a graphical chat interface on top of irc
<pnou>
yes
<MegaWatS>
ie
<MegaWatS>
like
<pnou>
that's the same word in french :/
<MegaWatS>
etc
<MegaWatS>
with an s-expression based text format
<MegaWatS>
or rather, graphical element format
<pnou>
hehe
<MegaWatS>
because you can also - but mirc doesn't support this - put ctcp "objects" into normal text, ie like
<MegaWatS>
text text <Char.code 1>CTCP-TYPE ARGS<Char.code 1>text text
<pnou>
i know i wrote a bot in ocaml
<MegaWatS>
a normal ctcp request looks exactly like this, only not embedded into normal text, but the whole text string sent is <Char.code 1>CTCP-TYPE ARGS<Char.code 1>
<MegaWatS>
:)
<MegaWatS>
yeah writing irc bots is fun
<MegaWatS>
its so easy
<pnou>
yep
<MegaWatS>
the irc protocol is nice and easy 8)
<MegaWatS>
i wrote a lisp bot in ocaml once, you could query it and "ask" it lisp expressions and it would answer with the result of evaluation :p
ocamlbot has joined #ocaml
<MegaWatS>
thats pretty useless but it was my first irc bot and i did it to learn the irc protocol
<pnou>
hey
<pnou>
mine do that with ocaml
<MegaWatS>
really? :>
<MegaWatS>
hmm
<MegaWatS>
it doesnt react
<MegaWatS>
[05:27:41] <MegaWatS> let foo = 17;;
<MegaWatS>
[05:27:44] <MegaWatS> foo;;
<MegaWatS>
how does it work?
<pnou>
well due to the strong typing of ocaml you're expression must have string type
<pnou>
.ocaml "toto"
<ocamlbot>
toto
<MegaWatS>
.ocaml "foo" ^ "bar"
<pnou>
.ocaml string_of_int (1 + 2)
<ocamlbot>
3
<pnou>
.ocaml "foo" ^ "bar"
<ocamlbot>
foobar
<MegaWatS>
it doesnt like me :(
<pnou>
he doesn't listen to you, i'm a bit paranoid :)
<TimFreeman>
Maybe there were other objections too that I don't remember. It seems that lots of people want dynamic linking.
<TimFreeman>
.ocaml "Hi"
<TimFreeman>
.ocamlr "Hi"
<TimFreeman>
Oops, ocamlr has left the building.
<TimFreeman>
If you get it started again, I'll be off the master list, right? That's fine; I have a good ocaml environment that I can get to without using IRC. :-).
<pnou>
.ocaml String.concat " " ["i'm on the"; self#chan; "channel"]
<ocamlbot>
i'm on the #ocaml channel
<pnou>
.ocaml String.concat " " ["i'm on the"; self#chan; "channel and"; self#nick; "is talking to me" ]
<ocamlbot>
i'm on the #ocaml channel and pnou is talking to me
<pnou>
i'm reading the thread about dll
<pnou>
i'm affraid ocaml will stay the programming tool of choice for discriminating hackers and nothing more :/
<MegaWatS>
what do you expect?
<MegaWatS>
it is not imperative, and it certainly does not have C syntax... so it has not a snowballs chance in hell in the market place anyway
<pnou>
i'm not talking about conquering the world
<pnou>
but about be used conveniently for wide projects
<MegaWatS>
hmmm
<MegaWatS>
well ocaml lacks different things to different people
<pnou>
so let's add all these things :)
<TimFreeman>
That's a quotable phrase. "Ocaml lacks different things to different people".
<MegaWatS>
the only gui libraries are still ports of/interfaces to C/C++ libs of varying quality
<TimFreeman>
:-).
<TimFreeman>
ocamlgtk has been good to me lately.
<MegaWatS>
to me what ocaml would really need would be a graphical / gui based standard library
<MegaWatS>
yes lablgtk is pretty nice
<MegaWatS>
i agree
<TimFreeman>
Ah well. I have to go to bed. Goodnight all.
TimFreeman has left #ocaml []
<pnou>
good night
<MegaWatS>
still, imho, something completely integrated into the language i.e. designed especially for it, along with a delphi/vb like rad development environment would go a long way imho ... its what many people these days expect from a programming language. also something that would look more "native" when used under windows ....
<MegaWatS>
but most of all, it should come with the language distribution
<MegaWatS>
the days when a standard library for a language consisted of console I/O commands are pretty much over imho
<MegaWatS>
also, it would solve the problem of WHAT gui toolkit to use: of course you use the standard lib; people think of these things as part of the language these days, much like the FILE*/fopen/printf etc C standard library is part of the C language
<pnou>
hum yes, but it's a huge work to manage such a lib for as many architectures
<MegaWatS>
sadly yes
<MegaWatS>
but it would go a long way to at least have it for linux/x86 and windows/x86 - the two most important platforms
<MegaWatS>
simply using lablgtk like it is right now would do, even
<MegaWatS>
it'd just then, also, need documentation in standard ocamldoc format like the rest of the ocaml lib is documented, right there on the ocaml homepage
<pnou>
so you just want to put lablgtk in the ocaml distribution ?
<MegaWatS>
what i would propose right now would be, to put lablgtk into the ocaml distribution and most of all , lablgtk lacks documentation
<MegaWatS>
that would need to be fixed, too ... right now the only documentation really available is the gtk documentation on www.gtk.org (which isnt all that much anyway ... for 1.2 anyway) and the .mli files that come with it
<MegaWatS>
well and also nice, of course, would be an ide that comes with it, which is written itself in the same gui style, completely integrated
<MegaWatS>
but well thats just what I think :p
<pnou>
my documentation was looking at what zoggy outputed, a bit poor you're right :)
<MegaWatS>
but labltk is part of the standard distribution and, quite honestly, it kinda sucks ... especially on windows
<MegaWatS>
lablgtk on the other hand is actually really quite nice. well maybe thats just my prejudices speaking but :)
<MegaWatS>
but before 3.06 I never even got lablgtk to work at all on my windows box
<pnou>
yes i think the main issue is that lablgtk doesn't _really_ work on windows
<MegaWatS>
?
<MegaWatS>
it seems to work quite well for me, what do you mean?
<pnou>
according to what i read (from jacques i think) the gtk port for windows has been made to make gimp work, nothing more
<pnou>
so it's incomplete
<MegaWatS>
hmm
<MegaWatS>
i don't know about that
<MegaWatS>
what i tried to do with it so far seemed to work quite ok
<MegaWatS>
but yes, if thats true that just highlights the basic problem ....
<pnou>
i've never thought about it, but you're right the gui issue is very important for conquering the world :)
<MegaWatS>
ill say :)
<pnou>
to me another issue is the poor standard lib
<pnou>
hope that baire will do the job
<MegaWatS>
yes that is , in my opinion, exactly one and the same problem
<MegaWatS>
the lack of gui support as IN the standard library, as part of the larger problem of the poor standard library
<pnou>
yep
<MegaWatS>
which actually is really sad, because functional, polymorphic languages like ocaml really show their strength mostly in library-writing
<pnou>
yes
<MegaWatS>
only with a really good standard library could ocaml REALLY achieve its full power potential
<pnou>
i think that even C++ has a more complete standard lib :/
<pnou>
you're right brother ! :)
<pnou>
baire seems promising
<MegaWatS>
C++'s standard lib is actually even quite good, apart from the lack of gui support, for when you consider the limitations of the language (mostly lack of garbage collection, which makes writing library functions for complicated data structures a lot harder)
<pnou>
it seems that the cristal team doesn't care about that
<MegaWatS>
well you have to remember that ocaml is a research language, its not actually meant to conquer the world but to try out new, interesting compiler and language features :)
<pnou>
so why there is a ocaml consortium ?
<MegaWatS>
hmm ok :p
<pnou>
their position seems quite ambiguous
<MegaWatS>
:/
<MegaWatS>
i think ill go fetch meself something edible :p
<pnou>
:)
thierry[away] is now known as thierry
<thierry>
yop
smklsmkl has joined #ocaml
smkl has quit [Read error: 104 (Connection reset by peer)]
TachYon25 has joined #ocaml
<pnou>
yop thierry
<thierry>
salut pnou
<pnou>
cha roule ?
<thierry>
je continue a mettre mon projet en place
<pnou>
moi je viens de passer mon entretien pour la magistère, réponse ce soir à cinq heures
<thierry>
hehe.. :)
<thierry>
confiant ?
<pnou>
on va dire que oui :)
<pnou>
même si l'entretien était assez bizarre
<thierry>
ah ?
<pnou>
ben ils parlaient plus entre eux qu'avec moi :)
<pnou>
enfin j'exagère un tout petit peu
<pnou>
y a un site pour ton projet ?
<thierry>
il y aura xtensive.org.. pas encore pret pour accueillir ce projet
<thierry>
ce site est plutot un site federateur
<thierry>
pour une suite de projets
<pnou>
tu participes à tout ces projets ?
<xtrm>
on doit cliquer sur qqchose sur xtensive.org ??
<xtrm>
j'ai pas vu
<pnou>
bon j'y zou, à plus
smklsmkl is now known as smkl
<thierry>
pnou: rien a cliquer pour l'instant
mrvn_ has joined #ocaml
mrvn has quit [Read error: 110 (Connection timed out)]
TachYon25 has quit [Remote closed the connection]
TachYon25 has joined #ocaml
<xtrm>
is there someone who knows where is the irc log of this chan?