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
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
raichoo_ has joined #ocaml
raichoo has quit [Ping timeout: 268 seconds]
emmanuelux has quit [Ping timeout: 240 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
raichoo_ has quit [Ping timeout: 240 seconds]
The_Journey has joined #ocaml
raichoo has joined #ocaml
raichoo has quit [Client Quit]
The_Journey has left #ocaml []
philtor has joined #ocaml
Skolem has joined #ocaml
Skolem has quit [Client Quit]
Skolem has joined #ocaml
abdallah has joined #ocaml
<abdallah> is anybody familiar with channels and/or bindings to C libraries?
<abdallah> I am using the GLPK binding to solve many (hundreds of thousands) small (10 variables at most) linear programs. For some reason I need to call "flush_all ()" very frequently if I don't want my program to use a "lot" of memory. Any idea why?
technomancy has quit [Remote host closed the connection]
<thelema> abdallah: flush_all? for flushing output channels?
<abdallah> yes
<thelema> abdallah: Are you somehow writing to ocaml output channels from C?
<abdallah> I was flushing my debut output, then I remove the debug output and profiled, flush_all was taking too much time. I commented it and hop my memory swap :(
<abdallah> I don't know, I'm using the GLPK binding, I'm not sure how it works.
<abdallah> The verbosity for GLPK is set to minimal (not even error messages) and my stderr/stdout are cleary not problematic.
<thelema> I'm guessing that somehow the bindings are writing to the channels in a manner that bypasses their normal buffer flushes.
<abdallah> Yes, I suppose, you're right
<thelema> And this would result in the buffers filling unless you flush them
<thelema> I can't explain how or why the bindings would do that.
<abdallah> Is there any better way of dealing with this situation than what i'm currently doing? I feel it's a bit ugly :
fanatsticsid has joined #ocaml
<thelema> The other possibility that comes to mind is that the slowness of the output is keeping the program from filling up memory fast enough.
fanatsticsid has quit [Remote host closed the connection]
<abdallah> incr counter; if !counter mod 100 = 0 then flush_all ()
<thelema> although that wouldn't hold that much water.
fantasticsid has joined #ocaml
<abdallah> Nope, my program terminates in 15 sec when it doesn't swap ^^
<thelema> blah.
<thelema> see if you can pin down which channel it is that needs flushing.
pilki has joined #ocaml
<abdallah> How can I do that ?
<thelema> replace the `flush_all ()` with `flush_out stdout`
<vivanov> hcarty, adrien: thx :)
<thelema> looking at the underlying implementation of flush_all, it flushes each registered channel. Flushing involves a do_write to that channel's fd of that channel's buffer, and a memmove to move the tail of the buffer (unwritten) back to the head. I guess it's possible that somehow this is affecting values it shouldn't be, although I can't imagine how it would reduce your memory footprint
<abdallah> stdout and stderr are not the ones to be flushed (which is consistent with my terminal output).
pilki has quit [Quit: This computer has gone to sleep]
<abdallah> I'm possibly also catching many exceptions, but I don't know of any link between channels and exceptions.
<abdallah> I cannot find any reference to channels in the source for the bindings. http://ocaml-glpk.svn.sourceforge.net/viewvc/ocaml-glpk/trunk/src/
scottmcl66 has joined #ocaml
<abdallah> Apparently calling Gc.major () instead of flush_all () has the same effect so it probably isn't linked with channels after all.
<abdallah> Calling Gc.minor () is not enough, though.
<abdallah> I didn't know that flush_all () called the GC systematically.
vivanov has quit [Quit: leaving]
abdallah has quit [Quit: Ex-Chat]
abdallah has joined #ocaml
Skolem has quit [Quit: Skolem]
<abdallah> thelema: is there any pattern nicer than "incr counter; if !counter mod 1000 0 then Gc.major ()" to avoid swapping?
<abdallah> *!counter mod 1000 = 0
vivanov has joined #ocaml
ankit9 has joined #ocaml
ankit9 has quit [Ping timeout: 240 seconds]
fantasticsid has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
fantasticsid has joined #ocaml
ankit9 has joined #ocaml
scottmcl66 has quit [Quit: ChatZilla 0.9.88 [Firefox 8.0/20111104165243]]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
The_third_man has quit [Ping timeout: 260 seconds]
ulfdoz has quit [Ping timeout: 252 seconds]
The_third_man has joined #ocaml
philtor has quit [Ping timeout: 252 seconds]
ousado has quit [Remote host closed the connection]
ousado has joined #ocaml
Kakadu has joined #ocaml
<Kakadu> Qrntzz: ping
ftrvxmtrx has joined #ocaml
edwin has joined #ocaml
abdallah has quit [Quit: Ex-Chat]
maufred has joined #ocaml
avsm has joined #ocaml
destrius has quit [Read error: Connection reset by peer]
damg has joined #ocaml
Cyanure has joined #ocaml
ocp has joined #ocaml
destrius has joined #ocaml
emmanuelux has joined #ocaml
_andre has joined #ocaml
ousado has quit [Changing host]
ousado has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
mfp has quit [Quit: Leaving]
mfp has joined #ocaml
ftrvxmtrx has joined #ocaml
destrius has quit [Quit: Leaving.]
<Kakadu> Qrntzz: ping
letrec has joined #ocaml
vivanov has quit [Quit: Reconnecting]
vivanov has joined #ocaml
sebz has joined #ocaml
sebz has quit [Client Quit]
<Qrntzz> Kakadu: double pong
Submarine has quit [Ping timeout: 240 seconds]
sebz has joined #ocaml
<Kakadu> Qrntzz: lablqt is waiting for us?
<Qrntzz> Kakadu: it is, I guess
fantasti` has joined #ocaml
fantasticsid has quit [Ping timeout: 260 seconds]
<Kakadu> Qrntzz: Let's rock?
<Qrntzz> Kakadu: yes!
<Kakadu> git clone git://github.com/Kakadu/lablqt.git?
<Qrntzz> done
<Kakadu> $ ocaml build.ml
<Qrntzz> need to satisfy some dependencies (tyxml, netstring)
<adrien> Kakadu: made progress on your issues
<adrien> ?
<Kakadu> adrien: I've found a very big issue and I;m looking for a people (qrntzz) who will fix it :D
<adrien> having other people fix your issues? good idea :P
fantasti` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<Qrntzz> quite
chambart has joined #ocaml
<Qrntzz> I badly need qt4 support in a project, so I'm okay with fixing issues that arise
<Kakadu> Qrntzz: btw, what Qt version do u have?
fantasticsid has joined #ocaml
damg has quit [Ping timeout: 258 seconds]
<Qrntzz> Kakadu: my qt-core is 4.7.4-r1
<vivanov> where to find send email examples using ocaml? i only found one that uses smtp-mail package
<vivanov> ocamlnet suits right
<Qrntzz> Kakadu: http://paste.in.ua/3570/
<Kakadu> $ ocamlfind list | grep lgraph
<Kakadu> 112:ocamlgraph (version: 1.8.1)
<Qrntzz> ocamlgraph (version: 0.99b)
<Qrntzz> heh
<Qrntzz> portage has some packages forgotten, will install manually in a moment
ocp has quit [Remote host closed the connection]
pilki has joined #ocaml
<Kakadu> Qrntzz: also you will need Js-core
<Qrntzz> Kakadu: ok
<Qrntzz> Kakadu: http://paste.in.ua/3571/
avsm has quit [Quit: Leaving.]
<Kakadu> Qrntzz: we should ask camlunity
<Qrntzz> indeed
<adrien> hmmm
<edwin> Qrntzz: look at the file ./../liblablqt.a(enum_Qt_FocusPolicy.o with nm, and see how caml_hash_variant is mangled. It should look like a C function, not a C++ one
<adrien> "LANG=en_US.UTF-8 make" :P
<Qrntzz> adrien: the most important bits are in english anyway :-p
<adrien> it makes it hard to read however
Submarine has joined #ocaml
<Kakadu> Qrntzz: test your ocaml distribution
sebz has quit [Quit: Computer has gone to sleep.]
<Qrntzz> Kakadu: aight, just a moment
pilki has quit [Quit: This computer has gone to sleep]
<Qrntzz> Kakadu: http://paste.in.ua/3572/
<Kakadu> hmm, it works
<Kakadu> wtf
<Kakadu> Qrntzz: we should test native code too
<Qrntzz> Kakadu: fine
Submarine has quit [Quit: Leaving]
<Qrntzz> Kakadu: http://paste.in.ua/3573/
<Kakadu> cma -> cmxa
<Kakadu> !!
<Kakadu> Qrntzz: git pull
<Kakadu> it works
<Qrntzz> yes
<Kakadu> TT
<Kakadu> adrien: we need guru)
<adrien> Kakadu: about what?
<Kakadu> adrien: caml_hash_variant
<Kakadu> Qrntzz: can u make crash log with good locale?
<adrien> Kakadu: does compilation use ocamlc.*opt* and ocamlopt.*opt*? or does it use ocamlfind?
<Qrntzz> edwin: if I'm not mistaken, it does look like one, but the symbol is undefined
<Qrntzz> Kakadu: yes
<Kakadu> adrien: yes, ocamlfind is used
<Kakadu> adrien: in this place no any opts...
<adrien> ok, it will pick the .opt versions automatically then =)
<adrien> it's building here but iirc it took 20 minutes to build last time
<adrien> ocamlfind opt -g -I . -I ./.. -I ./../out lablqt.cmxa main.ml -o test
<adrien> /usr/lib64/libGL.so.1: undefined reference to `xcb_glx_set_client_info_arb'
<adrien> /usr/lib64/libGL.so.1: undefined reference to `xcb_glx_set_client_info_2arb'
<adrien> collect2: ld returned 1 exit status
<adrien> I might have made a weird mesa
<adrien> (I built one version of it on yesterday)
sepp2k has joined #ocaml
<flux> qt uses xcb?
<flux> but maybe you link libxcb-glx0
<flux> (I don't know how ;))
<flux> (+need to)
<flux> not that I don't 'need to' know but rather maybe you need to link 8-)
<adrien> it's also possible that I should recompile my Qt against the currently-installed mesa
<adrien> they had broken mesa git and I might have done something bad in response and might have ended without --enable-xcb in mesaw
<edwin> Kakadu: what do I download to try lablqt?
<Kakadu> edwin: git clone git://github.com/Kakadu/lablqt.git
<Kakadu> dependencies: tyxml, js-core
<edwin> and then? no configure or makefiles..
<edwin> ah build.ml
<Kakadu> ocaml build.ml
raichoo has joined #ocaml
<Kakadu> adrien: I'm going to remove openGL dependencies, try git pull please
<hcarty> vivanov: ocamlnet does have support for sending email. I'm not sure if it includes any examples.
<adrien> Kakadu: oh, I've already rebuilt mesa ;-)
<adrien> right, my package was borked, I've had confirmation by building mesa's examples
<edwin> Kakadu: builds for me
<edwin> but whats with the janestreet core, and crypto dependencies for Qt? :D
<adrien> Kakadu: hmmm, it's executing 'make -C test_gen/out/cpp -j3
<adrien> Kakadu: does this step always start from 0 when the generator is changed?
<edwin> Kakadu: is there some self-test or demo app that I can run?
<adrien> i.e. does it trigger make's
<adrien> modification-time-based rebuild rules?
<Kakadu> edwin: what with js-core, I don't catch it?
<Kakadu> edwin: look at test_gen/test
<Kakadu> ls
<Kakadu> f*ck, I'm not in bash
<edwin> Kakadu: is the requirement about janestreet-core going to stay? also how about the crypto dependencies?
<Kakadu> adrien: I recompiles C sources every time TT
<Kakadu> edwin: 1. yes. 2. what crypto dependencies?
<edwin> Kakadu: tyxml pulled in libcryptgps-ocaml-dev
<Kakadu> edwin: It's first time when I hear it. I didn't know about it
<edwin> apt-cache depends libocamlnet-ocaml-dev|grep crypt
<edwin> Depends: <libcryptgps-ocaml-dev-1zmb9>
<edwin> libcryptgps-ocaml-dev
<edwin> ah ocamlnet needs it
<adrien> Kakadu: would you be interested in an oasis-based system? (once I've done lablgtk's that is :p )
<adrien> ouch, I need ccache at least
<Kakadu> adrien: Do u really know how to explain oasis that some files are going to be autogenerated?
<adrien> Kakadu: you need to generate the _oasis file along with the sources
<adrien> I'm doing it for lablwebkit
<Kakadu> adrien: hmmm. Somebody should oen feature-request
<edwin> hmm, lablqt built quite fast here: user 1m37.047s
<edwin> if you want me to run some tests let me know
<edwin> the one in test_gen/test works
<Kakadu> edwin: It will be great If you help Qrntzz with his problem
<Qrntzz> indeed :-(
fantasticsid has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<edwin> well it builds for me, maybe you can pastebin the output from nm on that file that fails to link with caml_hash_variant
<Qrntzz> sure
<Qrntzz> mangled?
<edwin> also I think you can add -v, or -verbose ot ocamlopt/ocamlfind and it'll print more details on what exactly it includes in the link
<edwin> yeah, the raw output pls, don't run it through c++filt
<Qrntzz> ok
<Qrntzz> the whole output is too large though (a few thousand lines), I'll paste only the sections the linker barfs at
<edwin> ok so that looks the same as mine, can you find now the exact linker command
<edwin> and add -v or -verbose to it?
<Qrntzz> I'll try to
<adrien> building fine here without opengl stuff
<adrien> and ccache helps a lot with recompilation speed ;p
<Kakadu> Qrntzz: we can fix xml file manually and make output shorter
<Kakadu> btw, compiler swears on all enums or only on some of them?
<Qrntzz> euhm, I think it compiled
<Qrntzz> weirdo
<Qrntzz> I added the -verbose option to the makefile and make'd the test directory on its own
<Qrntzz> i. e. cd test_gen/test; make
<Qrntzz> doesn't barf at linking now, or anything other for that matter
<Qrntzz> should I clean and recompile to see if I can reproduce this?
<Qrntzz> Kakadu: only on GestureFlags and FocusPolicy
sebz has joined #ocaml
<Kakadu> wtf
sebz has quit [Client Quit]
<Kakadu> only 2 of them?!
<Kakadu> Qrntzz: btw, You can remove them from xml file
<Qrntzz> okay
<Kakadu> but
<Qrntzz> and yes, the test executable runs fine too
<Kakadu> also you should remove calling of script for_*.sh. (this script overwrites xml file)
metasyntax|work has joined #ocaml
<Kakadu> Qrntzz: ну ты дофиксь установку и запуск тестового приложения и переходи к осмыслению как это работает (в том числе https://github.com/Kakadu/lablqt/wiki/Inheritance).
<Kakadu> Qrntzz: говори мне про неочевидные вещи в lablqt , я их постараюсь задокументировать. Если ты ещё не раздумал , конечно
<Qrntzz> Kakadu: ок, попытаюсь
<Qrntzz> Kakadu: не раздумал, у меня выхода нет :-)
<Kakadu> Qrntzz: пишу по-русски ибо хз как по-английски сказать
<Qrntzz> спросят -- переведу
philtor has joined #ocaml
metasyntax|work has quit [Quit: WeeChat [quit]]
<Qrntzz> it seems the problem is gone magically, it just built successfully after a git pull + build.ml -clean
<Qrntzz> thanks everyone for participating
metasyntax|work has joined #ocaml
<thelema> hcarty: do you mind if I mention ocamlbrew on caml-list?
<hcarty> thelema: Not at all - I was planning to do a formal "alpha" announcement today
<hcarty> thelema: Don't let that hold you up though
<thelema> :)
<hcarty> thelema: What is the context of the post?
<vivanov> hcarty: it does
<hcarty> vivanov: Cool! I will have a use for that soon, so that's good to know.
<thelema> hcarty: Pons' the "just do it" reply to Minsky
<vivanov> :)
<hcarty> thelema: Yes... I saw that this morning and chose to ignore it. But I'm glad someone is addressing it.
<hcarty> Chose to ignore that 'just do it' part that is.
<hcarty> s/that/the/ ... can't type today
<thelema> :)
<thelema> hcarty: I didn't end up working in ocamlbrew, although I thought I would when I started the email. I look forward to your announcement.
<thelema> I'm seriously considering re-oasis-ing odn, to fix the oasis install
philtor has quit [Ping timeout: 240 seconds]
<hcarty> thelema: It may be worth asking gildor to join to development team for odn and oasis on the forge
<hcarty> I'm a little concerned about the 3.13 oasis breakage. There is even an Official OCaml Developer post on that bug :-)
pango_ has quit [Ping timeout: 268 seconds]
avsm has joined #ocaml
letrec has quit [Remote host closed the connection]
letrec has joined #ocaml
<Kakadu> Qrntzz: any news?
pango_ has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
avsm has quit [Quit: Leaving.]
<thelema> hcarty: I think I'll do that now.
<Qrntzz> Kakadu: power outage, lol
<Qrntzz> Kakadu: trying to figure out how the test examples work
<Kakadu> Qrntzz: OK
<Kakadu> Qrntzz: test example recognize pressed key
<Kakadu> recognizes*
<Qrntzz> yes, I understood that
<Qrntzz> just trying to follow up with the instantiations of classes
<Qrntzz> e. g. which properties are of interest to me in qwidget
metasyntax|work has quit [Quit: WeeChat [quit]]
rawtatoor has joined #ocaml
Cyanure has quit [Ping timeout: 260 seconds]
ulfdoz has joined #ocaml
fraggle_ has quit [Read error: Connection reset by peer]
fraggle_ has joined #ocaml
sepp2k has quit [Quit: Leaving.]
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 240 seconds]
letrec has quit [Ping timeout: 252 seconds]
mdelaney has joined #ocaml
avsm has joined #ocaml
rawtatoor has quit [Ping timeout: 248 seconds]
rawtatoor has joined #ocaml
rawtatoor has quit [Ping timeout: 240 seconds]
fridim_ has joined #ocaml
metasyntax|work has joined #ocaml
milosn has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
fridim_ has quit [Ping timeout: 240 seconds]
iago has joined #ocaml
mdelaney has quit [Quit: mdelaney]
avsm has quit [Quit: Leaving.]
_andre has quit [Quit: leaving]
<_habnabit> trying to use Printexc.register_printer, but it doesn't seem to be doing what I expect it to do. in this example, is there something I'm not doing correctly? I'd expect it to format the traceback using my printer. http://paste.pound-python.org/show/qFG6XwHZSWAGuhM2XTU7/
<_habnabit> I can cut this down to a more trivial example, but it might be something obvious
mdelaney has joined #ocaml
* NaCl wouldn't know
<NaCl> is there a HTML parser in ocamlnet or somewhere else?
<adrien> maybe but I don't think so
<adrien> you can have a look at MMM
<adrien> it's HTML 3.2
<NaCl> grrr
* NaCl was seeking something quick and simpleish
<adrien> I'd say the move to 4.01 is probably alright
<adrien> to 5? probably not
<adrien> and then, it's HTML: you will have troubles finding websites which are proper HTML and don't rely on some specific things in engines
<adrien> so it depends on what you want to use the parser on
<NaCl> the target should be simple enough
<adrien> well
<adrien> if you make an html5 parser ready
<adrien> and make a new web engine
* NaCl sees clouds of doom on the horizon
<adrien> oh, come on: me hugging you is not *that* bad :P
* NaCl did that in response to "Web Engine"
<adrien> yeah, I was joking ;-)
<_habnabit> HTML5 has rules for dealing with malformed markup; a properly-done HTML5 parser will succeed even when given tag soup
<adrien> hmmm, that's true
ftrvxmtrx has joined #ocaml
<NaCl> wonderful
<adrien> actually
<adrien> webkit-gtk exposes functions to the DOM
<edwin> adrien: I think what the readme says is that some C structures are stored in the caml heap
<edwin> and thats why its a problem if the GC moves them
<edwin> adrien: would it be possible to malloc() those structures instead? then the caml values could be moved freely
<adrien> edwin: but then, the C heap references them, so the C heap would have to be updated too
<edwin> well no, the caml heap would reference the C one
<edwin> and the C one doesn't change unless you want it to
<edwin> or is it about some callbacks?
<edwin> from C -> OCaml?
<adrien> it's GTK which decides when to call the callback
<adrien> so it has to be in the C heap, no?
<edwin> ye
<adrien> errr, referenced in the C heap
<edwin> well dunno maybe lablgtk plays some tricks and doesn't use custom block/ops for its data structures, but stores the data in the caml values
<edwin> but it needs those values during the callbacks
mdelaney has quit [Ping timeout: 252 seconds]
mdelaney_ has joined #ocaml
<adrien> really don't know
<Kakadu> Qrntzz: how do u do?
<Qrntzz> Kakadu: turns out I'm silly. nothing has fixed itself, it was just me forgetting to remove -v (which is for -version and aborts normal execution) in favor of -verbose from the ocamlopt line
<Qrntzz> so I'm desperately trying to repair that, and trying to write something more sophisticated than the test app on my own seeing as the bytecode version works fine
<Kakadu> ты типа играешься с тестовым приложением?
<Qrntzz> пытаюсь добавить в него функциональности и/или починить ошибку которая нифига не исчезла. до сих пор не понял до конца, как построена классовая иерархия, т. п. поэтому пока просто в исходниках ковыряюсь
<Qrntzz> байткод-версия нормально работает, поэтому можно хоть что-то проверить
<Kakadu> Qrntzz: байткод это хорошо
<sgnb> ça parle russe ici ?
<Kakadu> sgnb: oui
<Kakadu> Qrntzz: а можешь в двух словах по-русски что не так с нативом?
<Qrntzz> Kakadu: да та же ошибка с незаданным caml_hash_variant, уже все пробовал что мог, хз отчего оно вылазит. не линкует, короче. от js-core этого же не может быть? или она стандартный рантайи вообще не трогает?
<Kakadu> не трогает
<Kakadu> тем паче только то что в xml с корой собирается
<Kakadu> может отложим натив и потестим на байткодне?
<Qrntzz> тогда вообще хз. до этого ничего не жаловалось.
Xizor has joined #ocaml
<Kakadu> Qrntzz: AFAYU I make a class in OCaml and give him a C++ pointer to object in a constructor.
<Qrntzz> я и пытаюсь на байткоде что-то сделать, но не до конца понимаю что откуда берется из внешних функций и что они, собственно, делают. если мы тут мешаем с русским, можно передислоцироваться в джаббер.
<Qrntzz> so, it inherits every C++ object's method from qt?
<Kakadu> N.B. We cannot catch keyPressEvent in Qt without inheritance. So we should support inheritance in OCaml
<Kakadu> Qrntzz: yep
<Kakadu> It calls a method of specific object
<flux> it doesn't need to look like inheritance in OCaml, though. but it can :)
<flux> (even if the generated C++ needs to use inheritance)
<Kakadu> Qrntzz: N.B. OCaml has not forward declarations of classes. So we should use recursive definitions.
<adrien> class type?
<adrien> bit verbose but it could work
<Kakadu> Qrntzz: I can give you access to repo if you want write something to wiki
<Kakadu> Qrntzz: things which are not obvious for non-developer person
<Kakadu> Qrntzz: also it wil be great if you help to create good wiki for community
<Qrntzz> Kakadu: that would be nice, I have also already cleaned up the build.ml for convenience (nothing intrusive, mostly style changes such as redundant ';;''s)
<Kakadu> Qrntzz: and one more N.B. not all methods can be translated to OCaml. for example void fooo(A&);
<Kakadu> Qrntzz: I need your nick
<Qrntzz> understood. can I, at the current stage, use qt designer to construct layouts for the ocaml lib?
<Qrntzz> "qrntz" it is
<Kakadu> Qrntzz: welcome
<Qrntzz> as in, designer generates C++ layouts actually, so can I already use that as a base for a project in ocaml, e. g. writing the callbacks to the interface in ocaml
<Qrntzz> thanks!
<Kakadu> Qrntzz: I've added initial suppport for connecting signals&slotes but it was adopted for writing all code in OCaml
<Qrntzz> ah, okay then
<Kakadu> I think there 2 stratagies to extend lablqt
<Kakadu> 1. Do all things with QtGui (startup from OCaml code , make GUI, wrap classes and have fun)
<Kakadu> 2. Create GUI in QML, create C++ classes in QML and call OCaml code from these classes
<Kakadu> flux: We should remember your idea and we will discuss it in future
<Kakadu> flux: have you look at https://github.com/Kakadu/lablqt/wiki/Inheritance ? Is these approach for implementing is too crazy, what do u think?\\
<Qrntzz> ocaml has inheritance in form of virtual objects, virtual methods, etc, and I don't see it used currently in lablqt
<Kakadu> there are some problems with virtuals
<flux> kakadu, seems pretty sane approach
<adrien> lablgtk puts some stuff in #misc (operations from gObj.ml) and #connect (operations for signals); it doesn't seem far-fetched to use associations in more places
<adrien> it has the advantage of being explicit
<Kakadu> Qrntzz: to explain problems with virtuals we should discuss 1. How I create twin-object and how to inherit a method. 2. How Qt runtime calls inherited method. 3. your question :-
<Kakadu> )
<Kakadu> btw in https://github.com/Kakadu/lablqt/tree/master/inher you can find minimal example about inheritance
<Qrntzz> I did
<Qrntzz> didn't really grasp the purpose of twin objects atm
<Qrntzz> are those basically instances with overridden fields?
<Kakadu> Qrntzz: чего?
<Kakadu> aaaaa
<Kakadu> You don't undestand why twin objects are needed?
<Kakadu> Qrntzz: ^^
<Qrntzz> in a nutshell, yes :-p
<Kakadu> OK
<Kakadu> We have a class A with a method foo
<Kakadu> We have a class A with a method foo in C++
<Kakadu> we have OCaml class which wraps class A
<Qrntzz> yes
<Kakadu> we override methods foo in ocaml. How C++ will understand is methods overrided or not?
<Kakadu> methods <- method `foo`
<adrien> hit the vtable!
<Kakadu> adrien: what vtable? we override in OCaml!!
<adrien> the C++ ones
<Qrntzz> hm
<Qrntzz> if I understood you properly, we can declare the ocaml class, which wraps A, to be virtual, and use its descendant subclasses instead of the currently used twin ones to show the C++ runtime a method's been overridden, can't we?
<Kakadu> we cannot mark a class to virtual I think. For example QWidget. It is not abstract class. Why we should mark it to be virtual?
<Kakadu> I 've not catch your idea
Submarine has quit [Ping timeout: 240 seconds]
<Qrntzz> oh, right. then virtual classes aren't a solution. so, a twin class is to be created anytime one needs to overwrite a method in the bare-bones ocaml wrapping class?
<Qrntzz> and then a number of objects needed instantiated from it?
<Qrntzz> just making sure I understood things
<Qrntzz> (or didn't)
<Kakadu> I thinks all correct
<Qrntzz> ok then, now that's clear to me.
<Kakadu> Qrntzz: now think how to call overriden ocaml methods from C++ and why C++ class should have `reference` to OCaml object
raichoo has quit [Quit: leaving]
oriba has joined #ocaml
<adrien> I need to find an easier way to make releases on the forge
Kakadu has quit [Read error: Connection reset by peer]
<thelema> adrien: what's the hard part, making the release tarball or putting it on the forge?
ulfdoz has quit [Ping timeout: 252 seconds]
<adrien> thelema: putting it on the forge
<adrien> I'd like something like scp
<thelema> and of that, is is the logging in part, the uploading the tarball part or the giving it a description part that's hardest?
<adrien> FRS in the forge
<adrien> File Release System iirc
<adrien> I'm used to things like: git archive --prefix=slackbuilds/ --format=tar HEAD | ssh notk.org 'tar x -C public_html/ocaml/'
<thelema> the "create a new release" page?
<adrien> it's not a huge amount of work
<thelema> but it could be must less, and automated, yes.
<adrien> but for some I've been doing lots of new versions recently and I wouldn't have done 20 releases on the forge
<adrien> gildor told me it couldn't be done through ssh but I should take a look at it anyway
<thelema> understood. The forge doesn't support this kind of development. You can use SSH to push a file to your webspace on the forge
<thelema> and then link to the directory somehow (I think you might be able to get directory listings for free)
ftrvxmtrx has quit [Quit: Leaving]
<adrien> aren't we quota'ed for the webpages?
<thelema> I dunno.
<adrien> I have the feeling that the releases on the forge might be a folder hierarchy
<thelema> batteries is using 68MB of web space
<thelema> Batteries is ~2/3 MB, so that's 100 releases worth
<adrien> haha, true
<thelema> maybe more with bz2
<adrien> xz!
<thelema> !
<adrien> the other solution is to improve fusion forge ;-)
<thelema> If you want to spend time doing that, be my guest.
<thelema> (I consider it not so productive)
<adrien> there are some easy things to do to make the UI lighter
<adrien> and adding to the right place the link which I'm always looking for when doing file releases would be very easy and help me a lot
<adrien> don't ask me which one however: that's exactly the issue, I never know =)
<NaCl> is it worth my time to write a string-splitting routine or find out how to install batteries in Mac OS X...
<NaCl> adrien: ^
<adrien> splitting according to what?
<thelema> NaCl: try odb - I'd love a bug report from someone using it on OSX
<adrien> thelema: I think that's precisely what he's afraid of :P
<NaCl> adrien: whitespace
<adrien> only one?
<NaCl> \s or \n
<thelema> NaCl: Str.split (Str.regexp "[ \\t\\n]+") string
<adrien> I'd probably use Str too here (or Pcre)
* thelema bonks adrien
<thelema> Pcre is a naughty word for me.
<adrien> thelema: why?
<thelema> backtracking
<adrien> also, I've never used Pcre directly but only through mikmatch
<adrien> I can't remember; it handles it?
<thelema> also, the external dependency on a C library makes ocaml packaging less nice
<adrien> worse performance?
<thelema> yes, exponential worst case performance.
<adrien> Pcre has this issue (and that it uses a C library), we agree; Str is not thread-safe; and we don't have a nice native library
<adrien> or maybe that there is one but we're not aware of it
<thelema> adrien: actually, there does exist perfectly good regex implementations in ocaml (one sec while I find one)
<thelema> built in 2002
<adrien> oh, a chart with partly-labelled axis :P
<adrien> ah, ok, x axis is indices; I wouldn't have used this kind of plot
edwin has quit [Remote host closed the connection]
<adrien> nice
<thelema> adrien: agreed - the color plus the x axis positioning is not smooth
<NaCl> and why is Str still in the standard library?
<adrien> NaCl: compat is probably a big reason
<adrien> it's quite likely I'll soon take a look at Regexp
<thelema> there is one more thing that Str does that Regexp doesn't, which is also the reason that Str isn't threadsafe
<thelema> That's capturing ()
<NaCl> awww it isn't in macports
<adrien> capturing is the ability to get \1, \2, ... in the replacement template or only in the regexp itself?
<NaCl> wait
<NaCl> classical automata?
<thelema> adrien: both
<adrien> NaCl: I don't think there is a single package for it (well, maybe debian but that's not even sure)
<thelema> NaCl: yes
<thelema> NaCl: probably - I haven't used it yet.
<thelema> NaCl: It's on my TODO list to bring it fully into the 21st century, possibly as part of batteries
<NaCl> honestly, I like perl regexps
<thelema> NaCl: a large part of the functionality of perl regexps is supportable by classical automata
<adrien> thelema: wouldn't that be fixable without losing thread-safety?
<thelema> adrien: only with big mutexes, which would kill performance, or by exposing the match positions, which would make the interface *much* uglier
<NaCl> thelema: link me to instructions on how to set up batteries with odb and I'll do it sometime this week
<adrien> thelema: hmmm, maybe not make it thread-safe but at least handle interleaving calls which is something Str doesn't do properly (it's been a long time I've used Str however)
<thelema> NaCl: curl -O https://raw.github.com/thelema/odb/master/odb.ml && ocaml odb.ml batteries
<thelema> NaCl: this assumes you have curl, tar, gzip, ocaml 3.12 and findlib
<adrien> NaCl: see the pretty graphs at http://swtch.com/~rsc/regexp/regexp1.html
<thelema> adrien: I wouldn't feel so bad about ocaml bindings to RE2
<NaCl> thelema: that I'll do
<adrien> RE2's public API is C++ but seems fairly short
Obfuscate has quit [Read error: Connection reset by peer]
<NaCl> thelema: install worked
<NaCl> testing? just try using it?
Obfuscate has joined #ocaml
<thelema> NaCl: just try using it
<NaCl> kk, I'll do that laterish
<NaCl> bbiab
<thelema> In the toplevel: #use "topfind";; #require "batteries";;
Obfuscate has quit [Read error: Connection reset by peer]
Obfuscate has joined #ocaml
NihilistDandy has quit [Read error: Connection reset by peer]
NihilistDandy has joined #ocaml
NihilistDandy has quit [Client Quit]
<NaCl> thelema: it loaded
Xizor has quit []
mdelaney_ has quit [Quit: mdelaney_]
NihilistDandy has joined #ocaml
<thelema> NaCl: very nice. Good to have another success story.
<thelema> There's lots of other software that can be easily installed with odb.
mdelaney has joined #ocaml
<orbitz> is there an ocaml-memprof for 3.12?
Obfuscate has quit [Read error: Connection reset by peer]
Obfuscate has joined #ocaml
sepp2k has joined #ocaml
Morphous_ has quit [Ping timeout: 255 seconds]
milosn has quit [Ping timeout: 255 seconds]
letrec has joined #ocaml
Morphous_ has joined #ocaml
<thelema> orbitz: not that I've seen.
<orbitz> whooo possible breakthrough in my memory problem!
<thelema> what's that?
<orbitz> I have a few new pieces of information: 1) lots of subscription/unsubscription to queues seems to cause the problem (although I don't see anything obvious, yet) 2) If I stress the app so I grow the heap large then let it sit for awhile then stress it again I can get the heap down to 9megs
<adrien> oh, that's quite nice
<adrien> also, there are a few things to get the size of an object (or somthing like that...)
<orbitz> Also, it appears that ocaml doe not give all of its memory back to the OS (i'm unsure if that is a linux thing or an ocaml thing) so my heap was at 800megs on top and ocaml, then ocaml shrunk down to 9megs, but top is showing it at 450megs
<thelema> 9mb seems nice
<adrien> should be possible to walk all the reachable values and find the biggest ones
<orbitz> It's nice for testing, the problem is the real app never has that unstressed period for whatever is happening to happen
<orbitz> so in prod the heap just grows
<adrien> # 450. *. 1.8;;
<adrien> - : float = 810.
<adrien> it's possible it is memory the Gc "uses"
<orbitz> I have my space-overhead down to 30% and my max-overhead down to 10% for testing
<adrien> :-)
<adrien> night!
<orbitz> What's interesting is that when i'm stressing it even though I see major GC's start, they never free anything
<thizanne> hello, anybody using archlinux here ?
<orbitz> I'm still compiling my thoughts and going to see if I canc ome up with a sane hypothesis
<thelema> orbitz: by "free", do you mean back to the OS, or internal to the GC?
<orbitz> back to the OS
<orbitz> According to Gc.print_stats, the entire size of my heap is 9megs with some number less than taht being live objects
<thelema> Yes, you have to Gc.compact to compact the heap.
The_third_bug has joined #ocaml
The_third_man has quit [Disconnected by services]
mdelaney has quit [Quit: mdelaney]
<orbitz> thelema: it is compacting
<orbitz> but even with a compaction it still isn't returning all of its memory to eh OS
<Drakken> orbitz is your nick based on your employer?
destrius has joined #ocaml
letrec has quit [Ping timeout: 240 seconds]
sepp2k has quit [Remote host closed the connection]
avsm has joined #ocaml
<thelema> orbitz: compaction returns memory to the system malloc, it's up the that to return it to the OS