Banana changed the topic of #ocaml to: OCaml 3.08.1 available! | Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
clog has joined #ocaml
CosmicRay has joined #ocaml
cjohnson has quit [Read error: 104 (Connection reset by peer)]
cjohnson has joined #ocaml
clog has joined #ocaml
dan2 has quit [Excess Flood]
dan2 has joined #ocaml
cjohnson has quit [Connection timed out]
kinners has joined #ocaml
vincenz has quit [Read error: 238 (Connection timed out)]
cjohnson has joined #ocaml
<dan2> is there anyway to identify variable types?
<kinners> runtime type info?
<dan2> yeah
<kinners> no
<dan2> kinners: so its not possible to do smart function calling based on 'a -> foo types
<kinners> type info gets thrown out, there's no need for it
vincenz has joined #ocaml
<dan2> kinners: that kind of sucks if lets say you wanted one function to convert 'a to string
<dan2> kinners: it would be smart enough to call the respective functions using match or something
<kinners> dan2: you could use classes, polymorphic variants, higher order functions, wait for gcaml, stop using ocaml, etc.
<dan2> kinners: how would classes help?
<kinners> dan2: by having a to_string method
<dan2> kinners: and how higher order functions?
<dan2> oo gcaml looks nice
ctr- has joined #ocaml
<kinners> dan2: by capturing the type info inside functions you pass around (like map and fold functions) instead of having a function dispatch based on the type of the argument
<ctr-> good evening
<ctr-> caml is cool
<kinners> hi ctr-
<ctr-> but sometimes, infact most of the time, matching against datastructures can really piusss you off
<ctr-> :)
<Smerdyakov> It doesn't piss _me_ off.
<Smerdyakov> Maybe you have a valve loose.
<ctr-> bah
<ctr-> some times you have to match
<ctr-> and you know what you want to match aganisnt
<ctr-> and ocaml is like
<ctr-> oooooh, wrong type
<ctr-> heh
<kinners> dan2: I'm just saying that you can reformulate a problem and use a different style
<dan2> kinners: though, generics would help fill a need
<Smerdyakov> I'll just point out that OCaml has what is usually meant by "generics." Perhaps you mean something else.
<ctr-> ocaml rocks
<ctr-> however so does lambda calculus ;)
<Smerdyakov> ctr, yeah, so you should always pick OCaml, because it's the best of one of the worlds.
<ctr-> heh
<ctr-> my phd suprservisor says the same shit ;)
mrsolo_ has joined #ocaml
<dan2> Smerdyakov: generics as in generic types but, type matching
<Smerdyakov> What is a "generic type"?
<dan2> Smerdyakov: runtime type information basically
<Smerdyakov> I think you're using a nonstandard definition.
heinola has joined #ocaml
<dan2> Smerdyakov: anyhow gcaml is what I was looking for, is it still under development?
<Smerdyakov> I've never heard of it.
<dan2> Smerdyakov: its what I want, but incomplete and outdated
vezenchio has joined #ocaml
<kinners> dan2: there's a gcaml branch in the ocaml cvs tree
heinola has left #ocaml []
<dan2> kinners: ahh
<tewk> Just getting started with ocaml, what are some good tools, dev environments, debugger, editor etc,
<tewk> I'm using vi and otags currently
<tewk> looked at cameleon, but stuck with vi
<kinners> emacs has a few ocaml modes (I tend to use vim)
<tewk> how about a debugger, just prerr_endline ?
<Smerdyakov> tewk, come on; you can at least read the manual table of contents....
<tewk> sorry, looking for best practices
<dan2> kinners: is there anyway just to compile gcamllib
<kinners> dan2: probably not
<Smerdyakov> tewk, "best practices" will always include every tool distributed with a compiler like OCaml.
<Smerdyakov> tewk, without commercial investment, no one will ever duplicate work already done by the main distributors.
ctr- has quit [Read error: 110 (Connection timed out)]
CosmicRay has quit ["Leaving"]
<tewk> How can I pretty print a source file,
<tewk> vim = doesn't seem to work well,
<tewk> cool pr_o.cmo
<tewk> ??extensions
<tewk> no bot
cjohnson has quit ["Leaving"]
kinners has quit ["leaving"]
monochrom has joined #ocaml
monochrom has quit ["Don't talk to those who talk to themselves."]
daapp has joined #ocaml
daapp has left #ocaml []
daapp has joined #ocaml
daapp has left #ocaml []
mrsolo_ has quit [Read error: 110 (Connection timed out)]
mrsolo_ has joined #ocaml
Nutssh has joined #ocaml
pango has quit ["Client exiting"]
mayhem has joined #ocaml
eugos has joined #ocaml
mrsolo_ has quit [Read error: 104 (Connection reset by peer)]
mrsolo_ has joined #ocaml
mlh has quit [Client Quit]
mlh has joined #ocaml
haelix has left #ocaml []
Nutssh has left #ocaml []
Herrchen has joined #ocaml
buggs^z has joined #ocaml
buggs has quit [Nick collision from services.]
buggs^z is now known as buggs
beschmi has quit [Remote closed the connection]
ctr- has joined #ocaml
<ctr-> hi, thisis probably obvious, but how can i take a chunk of code, split it off to another file and include that in my program ?
<mellum> put it in Foo.ml and use "open Foo"
<ctr-> k
<ctr-> thank you
<mellum> Or just qualify symbols with "Foo."
<ctr-> k
tnks has left #ocaml []
tnks has joined #ocaml
tnks has quit [Remote closed the connection]
tnks has joined #ocaml
ctr- has quit ["Crikey! The Mac OS X IRC Client - http://www.hiddenMemory.co.uk/Crikey/"]
tnks has left #ocaml []
tnks has joined #ocaml
buggs has quit [No route to host]
Robert has quit ["You lock the door and throw away the key. There's someone in my head, but it's not me!"]
ctr- has joined #ocaml
<ctr-> hi, are there any standard tree structures in ocamls library ?
<ctr-> I am not sure if I am being blind or not
<eugos> ctr, why do you need them in the library?
<ctr-> erm
<ctr-> I mean like you have Hashtbl and List
<mayhem> ctr-: creating your own is 1 line
<ctr-> fair enough
<mlh> mayhem, it'd be nice to have a selection of ready made ones -- splay, red-black, btree ...
<Smerdyakov> Map is red-black.
<Smerdyakov> It's simply the case that exposing the underlying treeness in the signature would not make sense.
Tchou has joined #ocaml
Tchou is now known as Banana
tnks has quit [Remote closed the connection]
<mlh> it's always somewhat exposed in the sense of it's performance
<Smerdyakov> That's quite distinct from providing "tree operations."
tnks has joined #ocaml
tnks has quit [Read error: 104 (Connection reset by peer)]
tnks has joined #ocaml
tnks has quit [Remote closed the connection]
tnks has joined #ocaml
cjohnson has joined #ocaml
ctr- has quit ["Crikey! The Mac OS X IRC Client - http://www.hiddenMemory.co.uk/Crikey/"]
uppo has joined #ocaml
CosmicRay has joined #ocaml
CosmicRay has quit [Client Quit]
CosmicRay has joined #ocaml
mlh has quit [Client Quit]
CosmicRay has quit ["Client exiting"]
CosmicRay has joined #ocaml
vect has joined #ocaml
vect is now known as gl`
jave has quit [Remote closed the connection]
eugos has left #ocaml []
mayhem has quit ["Fermeture du client"]
docelic has quit [Read error: 113 (No route to host)]
docelic has joined #ocaml
docelic has quit [Read error: 104 (Connection reset by peer)]
docelic has joined #ocaml
uppo has quit ["Leaving"]
gl` has quit ["[BX] Reserve your copy of BitchX-1.0c20cvs for the Apple Newton today!"]
maihem has joined #ocaml
cara has joined #ocaml
<cara> yay
<cara> there's a room for this
<cara> I'm trying to install ocaml and I keep getting the following error: bng_ia32.c:111: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
<cara> Is there any way I could resolve it?
<Smerdyakov> Which OS/arch?
cara has quit ["[BX] Become a BitchX Certified Systems Engineer today! Apply within!"]
srv_ has joined #ocaml
srv has quit [Read error: 232 (Connection reset by peer)]
pango has joined #ocaml
ctr- has joined #ocaml
<ctr-> how can I concatenate a character onto a string ?
<mattam> bah, i bet cara is on gentoo, using insane CFLAGS and not reading messages the package manager writes
<pango> ctr: s ^ String.make 1 c ?
<pango> not exactly efficient, but answers the question ;)
<pango> Printf.sprintf "%s%c" s c :)
<pango> let add_char s c = let l = String.length s in let s2 = String.create (l+1) in String.blit s 0 s2 0 l; s2.[l] <- c; s2 ;;
<pango> or use a Buffer.t
vezenchio has quit ["If god didn't believe athiests existed, you would not exist. However you exist, so there must be no god"]
ctr- has quit [Read error: 238 (Connection timed out)]
eugos has joined #ocaml
menace has joined #ocaml
m3ga_ has joined #ocaml
m3ga_ has quit [Client Quit]
m3ga_ has joined #ocaml
m3ga_ has left #ocaml []
m3ga has joined #ocaml
monochrom has joined #ocaml
m3ga has left #ocaml []
m3ga has joined #ocaml
Herrchen has quit ["bye"]
m3ga has quit ["Client exiting"]
CosmicRay has quit ["Client exiting"]
eugos has quit ["Leaving"]
menace has quit [" HydraIRC -> http://www.hydrairc.com <- Get hot chicks here!"]
<tewk> So I take it strings are immutable
<mattam> exactly
<mattam> there's Buffer if you want extensible storage
jameson has quit [Remote closed the connection]
<tewk> Make sense
jameson has joined #ocaml
fab_ has quit [Remote closed the connection]
<pango> strings' lengths are immutables
<pango> otherwise they would be elastics
<tewk> what does [| |] mean ?
<tewk> [] is a list, I've seen | as a filter
<pango> arrays
pango has quit [Remote closed the connection]
<dan2> anybody use gcaml from cvs?
pango has joined #ocaml
mlh has joined #ocaml
haakonn has joined #ocaml
<haakonn> can i compile ocaml source to native binaries, for example the ELF format under Linux? ocamlc seems to give me bytecode.
<pango> haakonn: use ocamlopt or ocamlopt.opt
<haakonn> thanks, will look at those
<haakonn> cool :)
<jason__> Hm.. I reproduced a fairly complicated script I made with Ruby. Functional style, 86 lines, object oriented w/o typing 70 lines.
<jason__> Pretty spiffy.
monochrom has quit ["Don't talk to those who talk to themselves."]
<dan2> wow, gcaml kicks ass
<dan2> generic val plus : {'a} => 'a -> 'a -> 'a = fun ta va vb ->
<dan2> match ta with
<dan2> | [: int :] -> Obj.repr ((+) (Obj.obj va) (Obj.obj vb))
<dan2> | [: float :] -> Obj.repr ((+.) (Obj.obj va) (Obj.obj vb))
<dan2> | [: string :] -> Obj.repr ((fun x y -> String.concat "" [x;y;]) (Obj.obj va) (Obj.obj vb))
<dan2> | _ -> assert false;;
GreyLensman has joined #ocaml
<dan2> :P