flux changed the topic of #ocaml to: Yes, inria.fr is back up! | Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0beta1 available from http://caml.inria.fr/pub/distrib/ocaml-3.11/ | Or grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html
<mfp> guyzmo: 3.11 has got switchable stack trace recording
<guyzmo> mfp - ah ok
<guyzmo> can't upgrade, I'm working on a school assignment, have to keep the same version as the teacher :/
<guyzmo> so I got to track it painfully
Linktim has joined #ocaml
hkBst has quit [Read error: 104 (Connection reset by peer)]
_zack has quit ["Leaving."]
Linktim_ has quit [Read error: 110 (Connection timed out)]
Linktim_ has joined #ocaml
Linktim_ has quit ["Quitte"]
hsuh has joined #ocaml
ulfdoz has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
Axioplase has quit ["leaving"]
Axioplase has joined #ocaml
threeve has joined #ocaml
electronx has joined #ocaml
Axioplase has quit ["Lost terminal"]
bering has joined #ocaml
Axioplase has joined #ocaml
Axle has joined #ocaml
struktured_ has joined #ocaml
bering has quit ["Leaving"]
struktured has quit [Read error: 110 (Connection timed out)]
ulfdoz has quit ["deprecated"]
tomh has quit ["http://www.mibbit.com ajax IRC Client"]
jeddhaberstro has quit []
Axioplase has quit ["leaving"]
struktured_ has quit [Read error: 60 (Operation timed out)]
struktured_ has joined #ocaml
vixey has quit ["Leaving"]
FatalBot has joined #ocaml
FatalBot has quit [Remote closed the connection]
FatalBot has joined #ocaml
FatalBot has quit [Remote closed the connection]
struktured_ has quit [Read error: 110 (Connection timed out)]
<palomer> how do I profile my program?
<palomer> it's a gtk monster program
<thelema> the normal profiling tools don't work for you?
FatalBot has joined #ocaml
FatalBot has quit [Remote closed the connection]
<palomer> what are the normal profiling tools?
<palomer> (with a nice easy to use tutorial too!)
<palomer> well, erm
<palomer> seems that's what ill be doing all tonight
FatalBot has joined #ocaml
FatalBot has quit [Remote closed the connection]
Associat0r has quit [Read error: 110 (Connection timed out)]
FatalBot has joined #ocaml
FatalBot has quit [Remote closed the connection]
FatalBot has joined #ocaml
FatalBot has quit [Remote closed the connection]
FatalBot has joined #ocaml
FatalBot has quit [Remote closed the connection]
pv104 has quit [Read error: 104 (Connection reset by peer)]
<palomer> can you use valgrind with ocaml?
<thelema> hmm, that's a good question.
* thelema tries to recall how valgrind works
FatalBot has joined #ocaml
FatalBot has quit [Remote closed the connection]
<thelema> well, after reading a bit, I think it should work
FatalBot has joined #ocaml
<palomer> how do I compile the ocaml binary?
<thelema> ocamlopt -g etc etc.
<palomer> k, here I go
tar_ has quit ["byebye"]
FatalBot has quit [Client Quit]
FatalBot has joined #ocaml
FatalBot has quit [Client Quit]
struktured_ has joined #ocaml
<palomer> wel...
<palomer> valgrind says im losing memory
<palomer> bummer.
<palomer> big bummer
<palomer> I need a super computer to valgrind my app!
<palomer> I'm thinking its in the UTF8 module of extlib
<thelema> extlib or batteries?
<thelema> and what are you doing with the UTF8 module? it should be quite straightforward
Associat0r has joined #ocaml
electronx is now known as FatalErrorx
FatalErrorx is now known as jarvas
jarvas is now known as fatalerrorx
<palomer> extlib
<palomer> tracking it down
<palomer> ill know withing a week
<palomer> ugh.
Jarvas has joined #ocaml
<palomer> nope, it's in the widgets
<palomer> again!
* palomer knocks head on wall
<palomer> and cries
Jarvas has quit [Client Quit]
Jarvas has joined #ocaml
Jarvas has quit [Remote closed the connection]
Jarvas has joined #ocaml
Jarvas has quit [Remote closed the connection]
Jarvas has joined #ocaml
pango has quit [Remote closed the connection]
Jarvas has quit [Client Quit]
Jarvas has joined #ocaml
Jarvas has quit [Client Quit]
Jarvas has joined #ocaml
Jarvas has quit [Remote closed the connection]
ozzloy is now known as lbc
lbc is now known as ozzloy
Jarvas has joined #ocaml
Jarvas has quit [Remote closed the connection]
Jarvas has joined #ocaml
<tsuyoshi> so have you tried looking at the lablgtk source to see what's wrong
<palomer> tsuyoshi, I found what was wrong before
<palomer> or, rather, I thought I did
threeve has quit []
<Jarvas> Title:
<palomer> but...
<palomer> I found another memory leak
<palomer> :(
<tsuyoshi> oh so uim leaks?
<tsuyoshi> good thing I don't use it
<tsuyoshi> although.. that means all the japanese input methods are buggy
<tsuyoshi> I can't figure out why there are so many.. they all seem to do the same thing
<tsuyoshi> every last one of them has a lisp interpreter, too
<palomer> scim works fine
<palomer> here's a new memory leak!
<Jarvas> Title: pastebin - collaborative debugging tool
<palomer> can you quickly check if it keeps going up in top?
<palomer> this one is easily reproducible in gtk lablless
<palomer> let's see what happens
* palomer first goes and gets some cereal
pango has joined #ocaml
<tsuyoshi> you're creating 10 thousand vboxes
<tsuyoshi> of course that's going to use a ton of memory
<tsuyoshi> er wait.. I read it wrong
Jarvas has quit [Remote closed the connection]
<palomer> hmmm
<palomer> maybe I need to call GMain.Main.main () to get the memory manager going
* palomer doubts it
Jarvas has joined #ocaml
<tsuyoshi> memory manager?
<palomer> err
<palomer> maybe gtk periodically does stuff to manage memory
<palomer> ahh, there's an infinite loop
* palomer tries to find it
struktured_ has quit [Read error: 110 (Connection timed out)]
<palomer> haha, repeat is written wrong
* palomer hits self
<Jarvas> Title: pastebin - collaborative debugging tool
<palomer> still has a memory leak though
<palomer> the corresponding C program does not leak
<palomer> http://ocaml.pastebin.com/ma925929 <--smallest program I've come across
<Jarvas> Title: ocaml private pastebin - collaborative debugging tool
<palomer> it leaks on my system
<palomer> can anyone corroborate ?
Axle has quit [Read error: 60 (Operation timed out)]
struktured_ has joined #ocaml
ygrek has joined #ocaml
Jarvas has quit [Remote closed the connection]
Jarvas has joined #ocaml
Jarvas has quit [Remote closed the connection]
Jarvas has joined #ocaml
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
<palomer> guess not
<flux> palomer, have you checked whether it's the ocaml heap or the C side that keeps leaking? by dumping Gc.stat.heap_words, perhaps
<flux> palomer, maybe this is of interest to you: http://modeemi.fi/~flux/summary-1.txt and summary-2.txt
<flux> they are the output of valgrind
<flux> (memcheck)
<flux> to me, it looks like gtk allocates widgets but they are not freed
<flux> ..maybe..
<flux> I haven't really used valgrind much at all
GustNG has joined #ocaml
Jarvas has quit [Remote closed the connection]
mishok13 has joined #ocaml
ulfdoz has joined #ocaml
johnnowak has joined #ocaml
Camarade_Tux has joined #ocaml
code17 has joined #ocaml
filp has joined #ocaml
|Jedai| has joined #ocaml
Associat0r has quit [Read error: 54 (Connection reset by peer)]
Associat0r has joined #ocaml
johnnowak has quit []
GustNG1 has joined #ocaml
Jedai has quit [Read error: 110 (Connection timed out)]
Jedai has joined #ocaml
_Jedai_ has quit [Read error: 110 (Connection timed out)]
GustNG has quit [Read error: 110 (Connection timed out)]
_zack has joined #ocaml
OChameau has joined #ocaml
mbishop_ has joined #ocaml
mbishop has quit [Read error: 104 (Connection reset by peer)]
yziquel has left #ocaml []
fatalerrorx has quit []
bering has joined #ocaml
fatalerrorx has joined #ocaml
GustNG has joined #ocaml
fatalerrorx has quit []
fatalerrorx has joined #ocaml
GustNG1 has quit [Read error: 110 (Connection timed out)]
Linktim_ has joined #ocaml
fatalerrorx has quit []
seafood has joined #ocaml
ygrek has quit [Remote closed the connection]
hsuh has quit ["i commute"]
Associat0r has quit [Client Quit]
seafood has quit []
vixey has joined #ocaml
bering has quit ["Leaving"]
Axle has joined #ocaml
bering has joined #ocaml
Linktim_ has quit [Read error: 110 (Connection timed out)]
rwmjones_ has joined #ocaml
Axioplase has joined #ocaml
Linktim has joined #ocaml
Linktim has quit [Read error: 104 (Connection reset by peer)]
Camarade_Tux has quit ["Leaving"]
Camarade_Tux has joined #ocaml
<flux> hmm, nobody's posted on the caml mailing list yesterday or today?
Axioplase has quit ["Lost terminal"]
Axioplase has joined #ocaml
<vixey> what is this stuff: [< x = p ; l = (parse_star p) >] -> x::l ?
<vixey> I think it's not normal ocaml because ocamlc wont compile it
<flux> looks like a stream parser
<Camarade_Tux> I think the style changed and these are not possible anymore
<Camarade_Tux> (I *think*, or it's the other way round, I don't know)
<flux> really?-o
<Camarade_Tux> I know there were several styles and one got deprecated, I'm gonna check
<Camarade_Tux> 7.2 in the 3.10 reference manual, but I had only read half of it :
<Camarade_Tux> it's not part of the language but it's available through a language extension
<flux> yes, that has been the case for quite some time now
<flux> that is, they've been supported via campl4
<Camarade_Tux> flux, right
rwmjones_ has quit [Read error: 104 (Connection reset by peer)]
<Camarade_Tux> btw is there a timeline of the ocaml development available somewhere ? for instance I'd like to know when these have been introduced and when they have been moved, but apart from reading all the changelogs...
jeremiah has quit [Read error: 104 (Connection reset by peer)]
<flux> changelogs ;)
Amorphous has quit [Read error: 110 (Connection timed out)]
damg has joined #ocaml
Axle has quit ["Leaving."]
Amorphous has joined #ocaml
jeremiah has joined #ocaml
<Camarade_Tux> I'm not even sure the 1 changelog is still available :p
<damg> weee, 3.11. is proper shared library support available as I heard it should come in this version?
<flux> what kind of proper shared library support?
<flux> I knew only that it would support dynamically loadable native (ocaml) code
<damg> yeah, I meant that ocamlopt can generate libraries to be loaded by ocaml apps (in contrast to libraries targeted to be loaded by C apps)
LeCamarade has joined #ocaml
Linktim has joined #ocaml
Camarade_Tux_ has joined #ocaml
christo_m has joined #ocaml
Camarade_Tux has quit [Read error: 110 (Connection timed out)]
christo_1 has joined #ocaml
<christo_1> I'm trying to implement a queue data structure in ocaml
<christo_1> im not sure how to delete things from a record type
<christo_1> or remove them if you will
Linktim_ has joined #ocaml
<flux> how you mean?
<flux> one cannot add or remove elements from a record, as its fields are fixed during compile time
<christo_1> flux: im being unclear, my bad
<christo_1> what i mean to say is, i want to reset a particular field back to defaults
<christo_1> let me show you some of the code if i have thus far
<christo_1> flux: basically, i want to pop the element that's in the front, so i want to remove it, and the way i can do that is reset the data field to "" (empty string) and the id field to 0
<flux> well, you must make them mutable
<christo_1> flux: ah..
<christo_1> mutable keyword in front
<flux> yes
<christo_1> flux: how will i know which field im accessing
<christo_1> that smy problem right now
struktured_ has quit [Read error: 110 (Connection timed out)]
<flux> myq.contents.(myq.font).data <- "" ?
<flux> not unlike push
<christo_1> i see
<christo_1> thats perfect
<christo_1> is there a way to reset both data and id in one line
<christo_1> or should i do it separately
<flux> do it separately
struktured_ has joined #ocaml
pango has quit [Remote closed the connection]
LeCamarade has quit [Read error: 110 (Connection timed out)]
christo_m has quit [Connection timed out]
mishok13 has quit [Connection timed out]
<christo_1> flux: im not implementing queue correctly am i
<christo_1> im not really sure how the data structure works
<flux> no, not really
Linktim_ has quit [Connection timed out]
<flux> I would perhaps not use an array at all, but rather bidirectionally linked lists
Linktim has quit [Read error: 110 (Connection timed out)]
pango has joined #ocaml
<christo_1> flux: i don thave that option
jeremiah has quit [Read error: 104 (Connection reset by peer)]
<christo_1> the teacher, once again, is enforcing requirements
<christo_1> flux: i have to keep track of the first one put in, so that its the first one popped off, and i have to keep track of the back so i kno what is the last element ot be removed
<christo_1> not only that, but i need to do this for my length function which needs to be fixed
<doy> christo_1: is an array specifically required?
<flux> christo_1, so there is to be a maximum length to the queue?
<flux> is it supposed to be a ring buffer?
struktured_ is now known as struktured
<christo_1> flux: yes
<christo_1> doy: yes
<christo_1> flux: basically there are cases where back is greater than front, an di need to account for this in my length function
rpg has joined #ocaml
ulfdoz has quit [kornbluth.freenode.net irc.freenode.net]
Smerdyakov has quit [kornbluth.freenode.net irc.freenode.net]
hcarty has quit [kornbluth.freenode.net irc.freenode.net]
wlmttobks has quit [kornbluth.freenode.net irc.freenode.net]
sbok has quit [kornbluth.freenode.net irc.freenode.net]
Mr_Awesome has quit [kornbluth.freenode.net irc.freenode.net]
ski_ has quit [kornbluth.freenode.net irc.freenode.net]
ulfdoz has joined #ocaml
Smerdyakov has joined #ocaml
Mr_Awesome has joined #ocaml
wlmttobks has joined #ocaml
sbok has joined #ocaml
ski_ has joined #ocaml
hcarty has joined #ocaml
Camarade_Tux_ is now known as Camarade_Tux
<rpg> type x = { a:array };;
<rpg> constructor array expects 1 argument
<rpg> ??
<vixey> ??
<rpg> how do i use array type
<doy> rpg: array isn't a type on its own, i believe
<vixey> an array of what?
<doy> should be 'int array', etc
<rpg> int's for example
jeremiah has joined #ocaml
<rpg> type x = { a:array int};;
<rpg> ??
<christo_1> no
<doy> type x = { a : int array };;
<christo_1> yes
<rpg> oh
<rpg> ok
<rpg> cool
hkBst has joined #ocaml
<rpg> aah
<christo_1> flux: yeah getting some seirous errors here
willb has joined #ocaml
jlouis has joined #ocaml
<christo_1> flux: you know whats going on
<christo_1> flux: that resetting to defualts affects the actual element
<christo_1> and thus when i pop and push new things, i cant see them realtime
<doy> well, you'll have to return a copy of the element
<christo_1> doy: example?
<doy> {data : myq.data; id : myq.id} maybe?
<doy> i'm not too familiar with record syntax
<doy> don't use them much
<christo_1> ahh
<rpg> are arrays dynamic ? can elements be added to them ?
<rpg> like if# 1 :: [| 2 ; 3 |];;
<rpg> This expression has type int array but is here used with type int list
<rpg> but it works for lists
<rpg> 1 :: [ 2 ; 3];;
<flux> they aren't
<rpg> oh ok
<flux> one could use DynArray from ExtLib (or Batteries), but I'm guessing that's not the point of this exercise
<rpg> good guess :)
Linktim has joined #ocaml
<rpg> lets say i want to initialize let x = [| 0 ; 0 ; 0 ; 0 ; 0 ; 0 |];;
<rpg> is there a better way to do it ??
_zack has quit ["Leaving."]
<rpg> in otherwords can i specify the size
<rpg> of the array
<flux> Array.make 10 0
filp has quit ["Bye"]
<rpg> so let x = Array.make 10 1 ;; will place 10 1's ?
<flux> yes
<rpg> and if i want them to be blank ( NULL )
<rpg> is there such thing ?
<doy> no
<rpg> ok
<flux> well, perhaps you'd like Hashtbl then, or use the option type
<doy> well, you could do 'int option array'
<rpg> its ok i dont mind filling it up with 0's
christo_1 has quit ["going back home"]
damg has quit [Remote closed the connection]
pango has quit [Remote closed the connection]
pango has joined #ocaml
vixey has quit [Read error: 113 (No route to host)]
vixey has joined #ocaml
mbishop_ is now known as mbishop
mishok13 has joined #ocaml
acatout_ has joined #ocaml
<palomer> yo
<palomer> flux, you around?
<flux> yes
<palomer> http://ocaml.pastebin.com/m3504d931 <--does this leak for you?
<flux> it appears to reach plateau, but then leaks a bit more, reaches plateau.. need to wait a bit longer to see it.
<flux> but in any case it appears to leak less than the version with a window..
<palomer> the other version was with an entry
<palomer> and it didn't actually leak
<palomer> well, on most systems it doesn't leak
<palomer> it leaked on mine because of uim
<palomer> im at 15 megs
<flux> I wonder if such a slow leak could be attributed to memory fragmentation
<palomer> i think it's an off by one error
<palomer> change the 1 to a 2 and no leak
OChameau has quit ["Leaving"]
<flux> it doesn't appear to grow larger than 10M RSS
<flux> nah, now it reached that level :)
<flux> in any case, the memory usage increases slowly
<flux> palomer, you mean the timeout?
<palomer> yeah
<flux> the memory increase is so much smaller with these examples than it was with the original
<flux> if one increases it to two, it will atleast take twice as long to witness the effect?
<flux> so it is more likely to look like it's not leaking :)
<palomer> flux, yours actually leaked for my previous example?
acatout has quit [Read error: 110 (Connection timed out)]
<palomer> flux, top said it leaked?
<flux> palomer, I don't know what constitutes as a leak. yes, its memory footprint increased slowly
<flux> at times the increase stopped
<flux> then resumed increasing
<palomer> I men the example of 3 days ago
<palomer> s/men/mean
<flux> that does appear to leak memory
<flux> or, wait.. it stopped at 17M at the moment
<palomer> 17m is a memory leak
<flux> now it's at 21M
<palomer> which example?
<flux> ke201905 < flux> http://ocaml.pastebin.com/m20e178be ?
<flux> that
<palomer> http://ocaml.pastebin.com/m26fde1d6 <---C code of original example
<palomer> compile the C code and see if you get a memory leak
<palomer> most people _dont_ get a memory leak
<palomer> if you have a memory leak, there's something wrong with your system
bering has quit ["Leaving"]
<palomer> (I had to fix mine)
<palomer> shower time!
<palomer> bbl
<flux> stays around solid RSS 9828
Axioplase has quit ["leaving"]
Axioplase has joined #ocaml
Linktim_ has joined #ocaml
<palomer> flux, but the corresponding ocaml code leaks?
<palomer> weird!
<palomer> http://ocaml.pastebin.com/m20e178be doesn't leak for me anymore
struktured has quit [Read error: 110 (Connection timed out)]
<palomer> stays at 10 megs flat
* palomer eats breakfeast to make sure this is true
<Camarade_Tux> palomer, no you're in a dream, look there are Qt bindings available and teaching Java is now forbidden :)
zerny has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
<palomer> ok, no memory leak
<palomer> phew
* palomer finds it strange that flux is getting a memory leak
struktured has joined #ocaml
* palomer dreams of ocaml qt bindings
cmeme has joined #ocaml
cmeme has quit [Read error: 54 (Connection reset by peer)]
cmeme has joined #ocaml
<flux> pft.. qt is gpl or pay-per-developer ;)
bering has joined #ocaml
acatout_ is now known as acatout
bering has quit ["Leaving"]
<palomer> but no memory leaks!
<vbmithr> i hope so :)
<vbmithr> qt-caml.crapulion.org
<vbmithr> But don't expect anything before a year or so
<mbishop> Qt really screwed itself using C++
<mbishop> and someone who's looked at the code more intimently than I have said they don't even use many C++ features
<mbishop> so he has no idea why they would use C++ heh
<flux> just plain being c++ may have contributed to its success, though
jeddhaberstro has joined #ocaml
Linktim has joined #ocaml
* palomer is a fan of C++
mishok13 has quit [Read error: 110 (Connection timed out)]
Linktim_ has quit [Read error: 110 (Connection timed out)]
<palomer> well...
<palomer> I found something interesting about my memory leak
<palomer> anyone want to test?:P
<palomer> bah, I'll write the C version first
saml has joined #ocaml
vbmithr has quit ["Changing server"]
Axioplase has quit ["later"]
tlavoie has joined #ocaml
Demitar has quit [Remote closed the connection]
Demitar has joined #ocaml
tomh has joined #ocaml
tlavoie has quit ["leaving"]
vbmithr has joined #ocaml
GustNG has quit ["Leaving."]
GustNG has joined #ocaml
saml has quit ["Leaving."]
Associat0r has joined #ocaml
jeddhaberstro has quit []
rpg has quit [Nick collision from services.]
rpg has joined #ocaml
rpg has quit [Nick collision from services.]
jeddhaberstro has joined #ocaml
psnively has joined #ocaml
psnively has quit [Remote closed the connection]
zerny has quit [Remote closed the connection]
yziquel has joined #ocaml
pattern has left #ocaml []
willb has quit ["Leaving"]
GustNG has quit ["Leaving."]
fatalerrorx has joined #ocaml
ushdf has joined #ocaml