gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
emmanuelux has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
ontologiae has joined #ocaml
ftrvxmtrx has joined #ocaml
ontologiae has quit [Ping timeout: 265 seconds]
emmanuelux has joined #ocaml
iago has quit [Quit: Leaving]
ftrvxmtrx has quit [Ping timeout: 252 seconds]
ftrvxmtrx has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 260 seconds]
ftrvxmtrx has joined #ocaml
lamawithonel__ has quit [Ping timeout: 240 seconds]
Drup has quit [Quit: Leaving.]
lamawithonel__ has joined #ocaml
int_ has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 240 seconds]
ftrvxmtrx has joined #ocaml
<int_> Can anyone help with a homework problem: http://hpaste.org/63946
otk has joined #ocaml
g0dmoney- has quit [Ping timeout: 248 seconds]
otk_ has quit [Ping timeout: 260 seconds]
g0dmoney- has joined #ocaml
g0dmoney- has quit [Changing host]
g0dmoney- has joined #ocaml
letrec has quit [Ping timeout: 260 seconds]
emmanuelux has quit [Remote host closed the connection]
otk_ has joined #ocaml
otk has quit [Ping timeout: 260 seconds]
lamawithonel__ has quit [Remote host closed the connection]
lamawithonel__ has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 240 seconds]
ftrvxmtrx has joined #ocaml
smondet has quit [Ping timeout: 276 seconds]
Tobu has quit [Ping timeout: 260 seconds]
thebope has joined #ocaml
<thebope> hi, I'm actually trying to do some programming in Standard ML of New Jersey '97 and I can't seem to find any associated channels, I was hoping maybe someone in here might know of one?
maufred has quit [Ping timeout: 245 seconds]
thebope has left #ocaml []
thebope has joined #ocaml
<thebope> actually I believe I found it at #sml, thanks a lot for reading
thebope has left #ocaml []
Tobu has joined #ocaml
cdidd has joined #ocaml
letrec has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 276 seconds]
ftrvxmtrx has joined #ocaml
edwin has joined #ocaml
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
Tobu has quit [Read error: Operation timed out]
Tobu has joined #ocaml
Cyanure has joined #ocaml
Obfuscate has quit [Read error: Operation timed out]
Obfuscate has joined #ocaml
Tobu has quit [Read error: Operation timed out]
Drakken has joined #ocaml
<Drakken> Hello camlrs.
<adrien> morning
eikke has joined #ocaml
<Drakken> I have two subclasses that inherit from the same base class, and they each have a method that creates a new object belonging to the same subclass.
<Drakken> The methods are identical except for the (sub)class of the object that's created.
<Drakken> Is there a way to implement that in the parent class?
MaskRay has joined #ocaml
MaskRay has quit [Changing host]
MaskRay has joined #ocaml
<adrien> if you have common code, you could put it in the parent class, inherit it with "inherit foo as super" and then call super#common_stuff iirc
<Drakken> adrien I don't need to override a method. I want to pass the current object's type (subclass) to the super's method.
<Drakken> The method adds a new child node to a node object. There are two kinds of node, so the method has to create the right kind of object in each case.
<Drakken> (node in a tree)
<Drakken> So I guess the parent method has to be a sort of template.
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
Tobu has joined #ocaml
avsm has quit [Ping timeout: 240 seconds]
<bobry> i think OASIS should be forced (at least) for forge uploads..
<adrien> so I just found out that ledit is actually used quite a lot and outside of the ocaml community
<bobry> too many broken makefiles and bashscripts and whatnot
antegallya has joined #ocaml
avsm has joined #ocaml
Tobu has quit [Read error: Operation timed out]
Tobu has joined #ocaml
<adrien> bwah; I just found that in "class foo = let x = Unix.sleep 1 in object ... end", the "let" clauses are evaluated at module initialization; makes sense but hurt a little bit at first
<thelema> int_: looking at your code
<thelema> adrien: I'd been using that to set up class-local values for a long time - avoiding recomputing them on each object
spearalot has joined #ocaml
<adrien> I've been using that with functions but somehow, I thought the behaviour was different with classes
<thelema> int_: it looks like you're adding psum(1) twice
ontologiae has joined #ocaml
Submarine has quit [Ping timeout: 260 seconds]
<int_> thelema: fantastic! just let k = ref 1.0 does the trick, thank you!
<thelema> int_: if I were you, I'd name x and y more descriptively; that may have solved your problem by making the double-counting obvious
<int_> * x = ref (psum 0.) * y = ref (psum 1.) , got it
<thelema> I was thinking more like "acc" and "last_acc"
<thelema> acc for accumulator
<adrien> (recursion!)
<thelema> and *only* assign last_acc := !acc
<thelema> i.e. last_acc can't get a value any other way.
<int_> oh I see, I see. that is better notation indeed
beginner has quit [Read error: Connection reset by peer]
beginner has joined #ocaml
beginner has quit [Ping timeout: 240 seconds]
beginner has joined #ocaml
brendan has quit [Ping timeout: 255 seconds]
lamawithonel__ has quit [Ping timeout: 240 seconds]
beginner has quit [Ping timeout: 240 seconds]
lamawithonel__ has joined #ocaml
beginner has joined #ocaml
iago has joined #ocaml
g0dmoney- has quit [Ping timeout: 276 seconds]
g0dmoney- has joined #ocaml
MaskRay has quit [Quit: leaving]
ankit9 has quit [Quit: Leaving]
ontologiae has quit [Ping timeout: 245 seconds]
Tobu has quit [Remote host closed the connection]
ontologiae has joined #ocaml
int_ has quit [Ping timeout: 245 seconds]
Tobu has joined #ocaml
Kakadu has joined #ocaml
ccasin has joined #ocaml
g0dmoney- has quit [Changing host]
g0dmoney- has joined #ocaml
beginner has quit [Read error: Connection reset by peer]
BiDOrD has joined #ocaml
avsm has quit [Quit: Leaving.]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
letrec has quit [Ping timeout: 245 seconds]
Epelii has joined #ocaml
Kakadu has quit [Ping timeout: 260 seconds]
Kakadu has joined #ocaml
brendan has joined #ocaml
ontologiae has quit [Ping timeout: 244 seconds]
int_ has joined #ocaml
jamii has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
Anarchos has joined #ocaml
Tobu has joined #ocaml
djcoin has joined #ocaml
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 244 seconds]
antegallya has quit [Quit: Leaving.]
antegallya has joined #ocaml
Drup has joined #ocaml
<djcoin> Hi there! Is there a better shell than the 'standard' one ? ie: no autocomplete, no way to erase a char, etc. Thanks a lot
<adrien> you can use "ledit ocaml" or "rlwrap ocaml", with the corresponding utilities which should be available everywhere
<companion_cube> you should use rlwrap to make the standard shell more bearable
<adrien> or you can use utop
<companion_cube> lots of people use emacs, afaik
<adrien> which is an improved version of the toplevel (I hope the name is right)
<zorun> yup, utop is pretty cool
<zorun> but an ocaml toplevel in emacs is practical also
<djcoin> Kk, well I'm a vim user ;) But I know Emacs has great modes. I will check rlwrap and ledit out
<djcoin> thanks a lot
<djcoin> (so there is no "autocomplete" shell)
<adrien> utop has completion
<djcoin> Ho ok
<djcoin> Thanks!
avsm has joined #ocaml
silver has joined #ocaml
emmanuelux has joined #ocaml
smondet has joined #ocaml
<rwmjones> adrien: thanks
<rwmjones> it's written 'in' camlp4
<djcoin> Im sorry, Im just beginning Ocaml, I have, I guess rather obvious question: I installed some ocaml lib setting the --prefix option in ./configure, and setting up the -destdir in ocamlfind. But it seems ocamlfind does not know how to find the lib (as I did not installed it globally - which seems quite normal); how can I specify where it should look to ? And would you advise me some good tutorial about all
<djcoin> those "root" ocaml component for packaging etc. ?
<adrien> djcoin: ocamlfind should find them itself; I think the issue is that -destdir does something else in ocamlfind
<adrien> try without
<adrien> rwmjones: I think I'll have roughly the same use as you for it
<djcoin> adrien: trying without the -destdir make ocamlfind try to install it globally in /usr/locale and such
<djcoin> ocamlfind install camomile $files META camomileLibrary.mli camomileLibraryDefault.mli camomileLibraryDyn.mli camomileLibrary.cmi camomileLibraryDefault.cmi camomileLibraryDyn.cmi
<djcoin> ocamlfind: Cannot mkdir /usr/local/lib/ocaml/3.11.2/camomile: Permission denied
<adrien> ah
<djcoin> (The line I got before manually setting the destdir)
<adrien> that's with ocamlfind's config
<adrien> don't use destdir
<adrien> in $prefix/etc/findlib.conf
<adrien> fix destdir there
<adrien> but it should have picked ocaml's config during config of findlib
<djcoin> For more context, as a complete beginner, I get the ocaml package from my distribution (ubuntu..). Then I decided to install Ocaml Batteries, I get the sources, look at the README, tried to install it -> dependencies was missing so I downloaded Camomile sources, and this time managed to get it installed. I dont have a clue if this is the "right" way to do it.
<djcoin> And thus findlib (eg: ocamlfind) is installed "system wide" and came with the ocaml package I guess.
<adrien> I'd probably advise you to run godi
<djcoin> Hm, just discovered ocamlfind printconf :)
<adrien> in a separate prefix
<djcoin> Okay, thanks, it seems I will be easier indeed
avsm has quit [Quit: Leaving.]
eikke has quit [Ping timeout: 245 seconds]
Tobu has quit [Read error: Operation timed out]
int_ has quit [Ping timeout: 248 seconds]
antegallya has quit [Ping timeout: 260 seconds]
Tobu has joined #ocaml
eikke has joined #ocaml
Kakadu has quit [Remote host closed the connection]
eikke has quit [Ping timeout: 252 seconds]
<pr> 21:42:29 < Japan3gro> desmond playing wesker like gief
<pr> whoops
avsm has joined #ocaml
eikke has joined #ocaml
antegallya has joined #ocaml
jamii has quit [Quit: Leaving]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
silver has quit [Read error: Connection reset by peer]
avsm has quit [Quit: Leaving.]
spearalot has quit [Quit: Computer has gone to sleep]
eikke has quit [Ping timeout: 248 seconds]
Tobu has quit [Ping timeout: 240 seconds]
groovy2shoes has joined #ocaml
Tobu has joined #ocaml
<rwmjones> adrien: thanks, but please note that it's not finished yet
edwin has quit [Remote host closed the connection]
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
Cyanure has quit [Remote host closed the connection]
ontologiae has joined #ocaml
letrec has joined #ocaml
groovy2shoes has quit [Read error: Connection reset by peer]
Xizor has quit []
ftrvxmtrx has quit [Read error: Operation timed out]
ftrvxmtrx has joined #ocaml
groovy2shoes has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
<zlaqay> Can anyone tell me what "This expression has type stm/1650 .. expected of type stm/1383" might be referring to? I'll paste code if it's not possible to tell.
<zlaqay> stm is a user-defined type
<hnrgrgr> zlaqay: if you are using the toplevel, you have probably redefined 'stm' and not the functions that use it.
<zlaqay> hnrgrgr, thanks, restarting my top-level fixed that. Whilst I'm here, is there a way to temporarily resolve forward references between mutually recursive functions without "and"ing one into the other? I'd like to keep them separate for the time being to test them.
<hnrgrgr> no way. Or may be use reference: let f = ref (fun x -> failwith "undefined");; f := (fun x -> if x = 0 then 1 else !f (x-1) * x);; !f 3;;
<hnrgrgr> not working with polymorphic functions.
<zlaqay> yeah, i'll have to settle for the nesting. Cheers.
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
letrec has quit [Ping timeout: 252 seconds]
cdidd has quit [Remote host closed the connection]
<zlaqay> I'm getting what I consider a strange type error. I've tried to capture the context of this in the following paste: http://pastebin.com/9L3HEA5K - can anyone give me any suggestions?
<smondet> have you tried PrintStm (e::exprs) ?
<zlaqay> wtf, that worked o_O. Thanks!
<djcoin> Hey all, I copy/pasted example at: http://darcs.ocamlcore.org/cgi-bin/darcsweb.cgi?r=ounit;a=headblob;f=/examples/example.ml <= I have OUnit installed ; but it seems to be named rather oUnit than OUnit. In the toploop using #use "example.ml" gives "unbound module OUnit" in one case ; and syntax error if I lower case the oUnit
<djcoin> Any help would be appreciated :)
<zlaqay> Grrr, the emacs caml mode inserts lots of redundant spacing every time I successfully C-M-x...
<djcoin> And by the way -> #use "topfind";; #require "oUnit";; works
<djcoin> Kinda weird
<djcoin> Oh, I had to load #camlp4o
<djcoin> How may you know which syntax you are using in the toplevel ?
groovy2shoes has quit [Read error: Connection reset by peer]
<djcoin> Hm no sorry. Nothing to do with camlp4o. I had to manually load the library using #require "oUnit" ; yet the name of the lib in the src file is still OUnit
djcoin has quit [Quit: WeeChat 0.3.2]