smimou changed the topic of #ocaml to: Dicussions about the OCaml programming language | http://caml.inria.fr/
smimou has quit ["bli"]
revision17 has joined #ocaml
revision17 has quit [Client Quit]
_JusSx_ has quit [Client Quit]
jdev has joined #ocaml
<llama32> does anyone know of an efficient [native compiled] ML that supports dynamic linking?
stevan has joined #ocaml
pango has quit [Remote closed the connection]
<malc_> ocaml 3.04
sponge45 has joined #ocaml
fik has quit ["Leaving"]
mikeX_ has quit ["leaving"]
sponge45 has quit [Remote closed the connection]
khaladan has quit [Connection timed out]
malc_ has quit ["leaving"]
llama32 has quit [Read error: 145 (Connection timed out)]
Ballin_05 has joined #ocaml
<Ballin_05> ~lo
llama32 has joined #ocaml
llama32 has quit ["Leaving"]
jacobian_ has quit [Read error: 110 (Connection timed out)]
jacobian_ has joined #ocaml
wy has quit ["离开"]
johnnowak has joined #ocaml
dbueno has quit ["Leaving"]
Smerdyakov has quit ["Leaving"]
MisterC has joined #ocaml
Skal has quit [Read error: 60 (Operation timed out)]
ziggurat has joined #ocaml
ramkrsna has quit [Remote closed the connection]
ramkrsna has joined #ocaml
ikaros_ has joined #ocaml
ikaros has quit [Read error: 110 (Connection timed out)]
llama32 has joined #ocaml
zak_ has joined #ocaml
llama32 has quit [Connection timed out]
cmeme has quit [Connection timed out]
cmeme has joined #ocaml
_velco has joined #ocaml
_fab has joined #ocaml
revision17 has joined #ocaml
velco has joined #ocaml
levi_home has joined #ocaml
zak_ has quit ["Leaving"]
slipstream-- has joined #ocaml
love-pingoo has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
pango has joined #ocaml
revision17_ has joined #ocaml
ppsmimou has quit ["Leaving"]
ziggurat has quit ["Leaving"]
revision17 has quit [Read error: 110 (Connection timed out)]
ppsmimou has joined #ocaml
ppsmimou has quit [Read error: 104 (Connection reset by peer)]
malc_ has joined #ocaml
ppsmimou has joined #ocaml
<love-pingoo> any idea/experience of why/how-to-know-why an ocaml program would suddenly without any reason increase its memory consumption by 600% ?
<love-pingoo> (not pure ocaml, though.. we have bindings)
<flux__> I would like to suggest a bug..
<flux__> unfortunately I don't have a suggestion on how to debug it
<flux__> the ocaml threads stalling -problem I had earlier might actually turn out to be a bug (of one thread dying due to an uncaught exception), so my trust to ocaml is rising slightly again ;-)
<love-pingoo> OCaml has had some bugs on threads and signals management
<love-pingoo> but last time I had problems with that, it was my fault (I was using forks and threads at the same time)
<flux__> threads and signal management combined?
<flux__> or just both features?
<love-pingoo> mmm actually I just know that a bug in the handling of signals was closed in 3.09
<love-pingoo> a race condition or something, maybe a deadlock..
<love-pingoo> I'm not sure about threads
<flux__> I have 200+ threads, so.. they aren't doing much, though, although I wouldn't mind if it would scale beyond one cpu :-).
johnnowak has quit []
<love-pingoo> flux__: that's a lot
<love-pingoo> can't you multiplex tasks into less threads ?
<flux__> I could fold a half of them into one thread
<flux__> folding the rest of them into one thread would be a bigger task (convert into continuation passing style etc)
<flux__> I'm expecting 200 more threads though, so maybe I should actually investigate atleast the first option more, though
<love-pingoo> it'd be interesting to ask for other people's experience with that many threads on the caml-list
<love-pingoo> for my part I found my app more stable when I managed to cut down the number of threads (say, from 12 to 6)
<love-pingoo> and the telnet interface became much more responsive, since no thread creation was involved in the handling of one client
* love-pingoo wishes there were a graphical tool for visualization ocaml's heap on the fly...
<malc_> actually there was soemthing of that kind
<love-pingoo> any pointer/name ?
<Ballin_05> is ocaml fat enough for game programming ?
<malc_> nope. but if something like this was mentioned it was on ocaml ml. so you can search there.
<Ballin_05> fast*
<malc_> dubious question at best
<flux__> love-pingoo, well, I don't actually have much experience on that, because there isn't an easy way to interact with the program..
<flux__> I've pondered about adding a telnet-interface for debugging and other needs..
<love-pingoo> Ballin_05: there are some games in perl... so speed is not the only question :)
<Ballin_05> lol
<Ballin_05> well this would be a 3D kinda deal
<flux__> with your own 3d engine?
<love-pingoo> freetennis is written in caml, afaik
<flux__> maybe ocaml isn't fast enough for a software rasterizer
<Ballin_05> hmmm
<flux__> but I would expect it to be plenty fast for everything else..
<Ballin_05> i would use
<Ballin_05> opengl or something
<love-pingoo> I think it's good enough. Freetennis uses openGL.
<Ballin_05> hmmmm i seee
<Ballin_05> this would be a high quality game with high quality textures :D
<pango> love-pingoo: there's a compiler patch called memprof-ocaml... ftp://ftp.berlios.de/pub/mldonkey/pango/goodies/memprof-ocaml/
<love-pingoo> I believe that there's more to gain in using openGL in a clever way than in switching to C (or at least not enough for justifying what you loose).
<Ballin_05> i already have a good portion of the game written tooo
<love-pingoo> pango: I also found "display" by filiatre, it only shows one value's representation, not the whole heap
<love-pingoo> Ballin_05: written in caml ?
<love-pingoo> you can also write the core in C and the game logic in caml
<Ballin_05> nope C++
<Ballin_05> alot of games use scripting languages for game logic
<love-pingoo> yup
<Ballin_05> D might be good too
<love-pingoo> but ocaml is faster, so you can afford to do more stuff with it
<Ballin_05> its actually faster then c++
<flux__> wait a year and it'll be much faster again :-)
<love-pingoo> depends on how you code: C++ is a superset of C, which is said to be faster than OCaml
<Ballin_05> huh why ?
<flux__> intel vs amd -race..
<Ballin_05> i c
<Ballin_05> well i kinda want to do the whole thing in D or Ocaml :D with a opengl bidning of course
<Ballin_05> or SDL or something
ikaros_ is now known as ikaros
<ikaros> since those two languages are pretty different you should have a favourite.. pick it ;)
<love-pingoo> pango: that memprof-ocaml sounds interesting
<love-pingoo> did you use it ? do you know if it's still working on 3.09 ?
<love-pingoo> pango: didn't see the "pango" in the path.. I guess you used it :)
<pango> I tried the version for 3.07 and failed at the time (didn't insist much, either); I haven't tried the version updated for 3.08.3
buluca has joined #ocaml
<flux__> where's that version?
<flux__> I find only the 3.07-version
<flux__> I suppose one could downgrade to 3.07 for memory profiling
<pango> flux__: see url above... updated by spiralvoice
<flux__> oh, right
<love-pingoo> I don't have much time for debugging these days so I'm looking for the lazy solution.. but I guess I'm dreaming and I can afford compiling a downgraded ocaml
<flux__> does it patch against 3.09?
<flux__> that's a very interesting piece of work, though
<flux__> if it works :)
<love-pingoo> it's a pity that lefessant spent only three days on it, as he claims
<love-pingoo> he should have gotten into the crystal team, so his tool may now be mainstream
<ppsmimou> love-pingoo: the patch is mostly applying
<ppsmimou> (to 3.09.3)
<ppsmimou> I guess it should be doable to update it
<love-pingoo> cool
<love-pingoo> I was trying on 3.08.3
<love-pingoo> after all, liquidsoap compiles with 3.08.3
<love-pingoo> ppsmimou: interested in packaging memprof-ocaml-3.09.3 ?
<love-pingoo> :)
<ppsmimou> tsss
<ppsmimou> untested
<love-pingoo> this patches successfully ? coool
<pango> mmmh 1/4 of the size of the original patch ? :)
<ppsmimou> hum right that's strange
<ppsmimou> however, I think I manually resolved all the STRANGE
<ppsmimou> however, I think I manually resolved all the FAILED
<pango> you diff'ed without -N, so you lost all the completely new files
<ppsmimou> ah that must be it
joshcryer has joined #ocaml
<love-pingoo> with 3.08.3 I got an error which isn't reported as normal in the README :(
<love-pingoo> and with 3.09.3 I got;
<love-pingoo> File "typing/datarepr.ml", line 84, characters 6-13:
<love-pingoo> Warning Y: unused variable ty_path.
<love-pingoo> (and errors are fatal there)
<ppsmimou> love-pingoo: it should be ok with the new patch
<love-pingoo> the 3.08.3 being broken, I would be surprised to see the 3.09.3 working :(
<ppsmimou> hum not yet
pango has quit [Remote closed the connection]
mnemonic has joined #ocaml
<mnemonic> hi
<love-pingoo> hi
mnemonic has quit ["leaving"]
Smerdyakov has joined #ocaml
<love-pingoo> ppsmimou: done ?
<love-pingoo> I had to modify otherlibs/num/Makefile in 3.08.3, that may be needed for you too
<love-pingoo> and another modif for a deprecated Xlib.h path, which should be OK in 3.09
<ppsmimou> love-pingoo: I have put the latest patch on the web
<ppsmimou> still I get a compilation error
<love-pingoo> is that about GENERAL_REGS ?
<ppsmimou> nope
<ppsmimou> boot/ocamlrun boot/ocamlc -nostdlib -I boot -linkall -o ocaml.tmp toplevel/toplevellib.cma toplevel/topstart.cmo
<ppsmimou> Error while linking boot/stdlib.cma(Gc):
<ppsmimou> The external function `caml_dump_heap' is not available
<love-pingoo> that's normal, read the README
<love-pingoo> run bootstrap twice at this point
<ppsmimou> ah good
<ppsmimou> it looks a bit hackish :)
<love-pingoo> and we don't even know what the tool will look like
<ppsmimou> it compiles now
<love-pingoo> you already finished the bootstrap
<ppsmimou> you can try the patch
<ppsmimou> yes
<love-pingoo> I'm compiling on sci1, it's slow :(
<love-pingoo> ppsmimou: I still get "Warning Y: unused variable ty_path."
<ppsmimou> ah ?
<love-pingoo> but I can fix that
<ppsmimou> anyway just replace the variable by an _
<love-pingoo> ppsmimou: and make bootstrap run into circles... :(
<love-pingoo> cd hp/hp2ps; make clean
<love-pingoo> /bin/sh: line 0: cd: hp/hp2ps: No such file or directory
<love-pingoo> shit it's completely broken now :(
<love-pingoo> oh I know: wget doesn't replace former downloaded files !
<ppsmimou> ...
velco has quit ["Ex-Chat"]
<love-pingoo> ok I managed to do one bootstreap
<love-pingoo> fixpoint not reached, try one more...
<ppsmimou> yes you're supposed to do two of them
<love-pingoo> that's what in the README, yes
<love-pingoo> +'s
<love-pingoo> I've never stayed that late at the lab'
<ppsmimou> :)
pango has joined #ocaml
Leonidas has joined #ocaml
<love-pingoo> Fixpoint reached, bootstrap succeeded.
love-pingoo has quit ["Leaving"]
_JusSx_ has joined #ocaml
danly has joined #ocaml
_JusSx_ has quit [Client Quit]
_JusSx_ has joined #ocaml
setog3 has joined #ocaml
<setog3> does we have a vect.length do know the lenght of a vector in a matrix ?
<pango> isn't a matrix just an array of arrays ?
<setog3> I use p
<setog3> let v = [|1; 2; 3; 4|];;
<setog3> p
<setog3> p
<setog3> p
<setog3> p
<setog3> p
<setog3> arf
<setog3> Array.make_matrix <-- I use this
<pango> that returns an 'a array array
_velco has quit ["I'm outta here ..."]
<setog3> hmm .. yes
<setog3> and to get the number of column ?
<setog3> a lenght array .. not sure
<pango> if you use Array.length on the matrix, you'll get the "major" size, as I understand
_JusSx_ has quit [Client Quit]
<pango> to get the "minor" size, you can run Array.length on any element of that array... make_matrix always create rectangular matrices
mon has joined #ocaml
<setog3> yes rectangular but not square ;D .. so I must use Array.length on matrix.(0) for example
<pango> yes
klapmuet1 has quit [Read error: 110 (Connection timed out)]
llama32 has joined #ocaml
shawn has quit ["This computer has gone to sleep"]
_JusSx_ has joined #ocaml
stevan_ has joined #ocaml
bluestorm has joined #ocaml
stevan has quit [Read error: 110 (Connection timed out)]
Demitar_ has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
david_koontz has quit ["Leaving"]
<llama32> hmmm
<llama32> i cant 'a :: 'a list??
<llama32> is there another way to do that? [i would assume so :|]
smimou has joined #ocaml
<malc_> llama32: huh?
<llama32> well a list is just (a :: (b :: (c :: ()))) right?
<malc_> erm.. no () is a unit you mean []
<malc_> but in general yeah
mikeX has joined #ocaml
<pango> :: is right associative, so you don't need the parens... a :: b :: c :: [] is ok too
<llama32> ah sorry
<pango> and should be the same as [a;b;c]
<llama32> i don't get why i can't a :: (some list of same type as a here)
<llama32> This expression has type string * data but is here used with type
<llama32> (string * data) list
<pango> what's the error like ?
<pango> the error is about the right part of the expression I guess ?
<malc_> apparently ocaml infers the type of your second argument to :: as string * data
<mikeX> are you sure it's 'a and not 'a list?
<llama32> the second argument is 'a list, first argument is 'a
<llama32> but i don't see why it shouldn't work
<pango> but OCaml doesn't agree ;)
<mikeX> well ocaml is not wrong if that's what you are saying : )
<malc_> just do a `let x : (string * data) list = your_second_argument in ...'
<llama32> it's complaining about the first argument being used as a list though... but unless the second argument is a list list, this shouldn't be happening should it :s
<mikeX> llama32: it would help if you pasted the code somewhere
* llama32 steals #lisp's pastebin
<llama32> http://paste.lisp.org/display/30808 <-- the middle is where the error is
<llama32> hmm, does ocaml's error reporting account for tabs? like it will is say character 8 if it's really character 2 but after a tab right?
<llama32> or 9 or whatever
<llama32> oh doesn't matter anyway... it's space indented
<mikeX> llama32: you mean run_closure code (env :: (("self", target) :: (List.combine arg_names args))) ?
<pango> I think the problem is with the first ::, not the second
<pango> if env is of type (string * data) list, then what's at the right of the first :: must be of type (string * data) list list
<pango> either you meant @, or something totally different
<mikeX> on another note, the parentheses for :: are not really required, 3 :: 3 :: [] is equal to (3 :: (3 :: []))
<mikeX> (well at least the inner pair)
<llama32> ohhhh, crap
<llama32> XD
<llama32> serves me right for coding in the morning
<mellum> morning? it's 21:00 :)
<llama32> i didn't even think that it would be infering the type from the outer bracket :)
<llama32> thanks
<mellum> Hmm. How is "backstep" implemented in ocamldebug? Wouldn't that need to record an incredible amount of state?
<flux__> it creates process snapshots with fork
<flux__> and then runs to the point before current
<flux__> so: yes, but not incredible amount
<flux__> it's a tradeoff off memory and speed
<mellum> only one fork?
<flux__> no, n forks
<flux__> well, atleast I think that's the theory, I've never really used it for anything useful
<flux__> the n is user-adjustible
<mellum> so potentially, one backstep takes as long as the whole current program runtime?
<mellum> Ah, I see.
<mellum> Well, that will screw up with I/O, though.
<flux__> yes
<mellum> or not? dunno, might even work.
<flux__> running io backwards would be something else anyway, though ;)
<mellum> well, I at least, O probably not :)
love-pingoo has joined #ocaml
<pango> mellum: periodical forks
<pango> flux__: I'm sure it would have useful uses ;)
<pango> "16.8.7 Fine-tuning the debugger"
scanpat has joined #ocaml
<llama32> anyone know if f# works on mono? or if there are attempts to make some other decent functional language for mono?
<llama32> nemerle just looks like someone shat a closure onto C#
shawn has joined #ocaml
_fab has quit [Read error: 104 (Connection reset by peer)]
scanpat has quit ["Parti"]
<mellum> Does anybody know about publications comparing reference counting and "real" GC? In particular I'm looking for those that support my assumption that reference counting is basically always a bad idea :)
<pango> probably somewhere in http://www.cs.kent.ac.uk/people/staff/rej/gc.html, but that's large ;)
_fab has joined #ocaml
gene9 has joined #ocaml
gene9 has quit [Client Quit]
<pango> ftp://ftp.cs.utexas.edu/pub/garbage/bigsurv.ps is always a good read, too
<setog3> hey, I have # Exception: Invalid_argument "index out of bounds".
<setog3> how can I debug the code ?
<setog3> ocamldebuger ?
<mellum> export OCAMLRUNPARAM="b=1"
<mellum> that'll give you a backtrace
<mellum> but it only works with bytecode
<pango> and compile to bytecode with debugging infos (ocamlc -g, I think)
<setog3> I love you mellum and pango !!
<setog3> hmm .. but we don't have something like that wih the interpreter
<setog3> thx ocamlc -g and b=1 do exatly what I want !!
<pango> indeed it'd be great if the toplevel reported backtraces on uncaught exceptions
MisterC has quit [Read error: 54 (Connection reset by peer)]
<pango> line numbers may be hard to interpret, but even just function names can be helpful :)
<llama32> that would be rather useful... even D prints such info [by default]
<llama32> GRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
<llama32> if amarok was written in ocaml, i bet it wouldn't crash all the time!!!
<llama32> actually it probably still would, but meh
<llama32> is the ocaml compiler fairly hackable [in terms of adding a backend]?
<mellum> llama32: It's probably easier than for gcc :)
_JusSx_ has quit [Client Quit]
<llama32> that's like saying "it's probably easier than swimming to the moon"
Leonidas has quit [Read error: 110 (Connection timed out)]
joshcryer has quit [Connection timed out]
smimou has quit ["bli"]
malc__ has joined #ocaml
malc_ has quit [Read error: 60 (Operation timed out)]
malc__ has quit ["leaving"]
seafood_ has joined #ocaml