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
ulfdoz has quit [Read error: Operation timed out]
<NaCl> thelema: going to use Batteries to make an incremental sieve
<NaCl> thelema: prime sieve
ulfdoz has joined #ocaml
fantasticsid has joined #ocaml
philtor has joined #ocaml
oriba has quit [Quit: oriba]
fantasti` has joined #ocaml
fantasticsid has quit [Ping timeout: 268 seconds]
fantasti` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
iago has quit [Quit: Leaving]
sebz has quit [Quit: Computer has gone to sleep.]
<thelema> NaCl: Enum has nice facilities for this.
philtor has quit [Ping timeout: 255 seconds]
<NaCl> thelema: indeed
Goat25 has quit [Quit: Leaving]
<NaCl> huh
philtor has joined #ocaml
* NaCl has having trouble creating a self-referencing enum
letrec has joined #ocaml
<thelema> NaCl: ? do you need to do that? can't you just filter `Enum.range 1`
<thelema> hmm, there is a bit more of a trick to it...
<NaCl> I was thinking that there would be some eumerable type where it would take a function that would reference an enum
<NaCl> or something like that
<thelema> Not the solution, but an interesting solution using batteries
<NaCl> I have an incremental sieve that appends arrays to arrays
<NaCl> looking for a better data structure to back it with
<NaCl> Probably going to use a BatDllist
<thelema> cf-lib has functional catenable deques
<thelema> (which have been on my list of data structures to merge)
<thelema> also, if you're appending arrays, you should look at BatVect, which is efficient to concatenate, and has random access
<NaCl> I was just appending arrays because Array isn't dynamically resizeable. :P
<thelema> there are dynamically resizeable arrays for ocaml, but vect is probably good enough.
<thelema> anyway, good night.
<NaCl> night
philtor has quit [Ping timeout: 253 seconds]
<orbitz> omg!!!
<orbitz> I think I found my memory leak!!
<orbitz> All is right in the world
orbitz has quit [Quit: brb]
orbitz has joined #ocaml
vivanov has quit [Ping timeout: 276 seconds]
f[x] has quit [Ping timeout: 276 seconds]
ccasin_ has quit [Ping timeout: 276 seconds]
ccasin has joined #ocaml
vivanov has joined #ocaml
lamawithonel has joined #ocaml
f[x] has joined #ocaml
ankit9 has quit [Ping timeout: 240 seconds]
<letrec> what is it unhappy with?
<letrec> it seems to be the same as http://caml.inria.fr/mantis/view.php?id=5463
ankit9 has joined #ocaml
Snark has joined #ocaml
edwin has joined #ocaml
milosn has quit [Ping timeout: 240 seconds]
asmanur has joined #ocaml
ygrek has joined #ocaml
fantasticsid has joined #ocaml
milosn has joined #ocaml
<adrien> does anyone know the granularity of Unix.gettimeofday? it's most probably implementation-dependant; I'm running on recent hardware with a recent linux kernel and glibc
ygrek has quit [Remote host closed the connection]
<adrien> (I'm currently trying to see what clock_getres says but there is no guarantee that both have the same granularity)
ygrek has joined #ocaml
ttamttam has joined #ocaml
<adrien> with a C and a cold CPU cache, I get around 500ns for delta between two clock_gettime(CLOCK_REALTIME, ...); and with a hot cache: down to 130ns
<adrien> and for Unix.gettimeofday: granularity is 1µs or less and precision is 1µs since the C gettimeofday function only gives microseconds
<adrien> and btw, there is /proc/timer_list on linux to get infos about the available timers and their use
Submarine has joined #ocaml
fantasti` has joined #ocaml
fantasticsid has quit [Remote host closed the connection]
letrec has quit [Ping timeout: 252 seconds]
fantasti` has quit [Ping timeout: 252 seconds]
NihilistDandy has quit [Quit: Linkinus - http://linkinus.com]
ikaros has joined #ocaml
iago has joined #ocaml
milosn_ has joined #ocaml
milosn has quit [Ping timeout: 255 seconds]
milosn has joined #ocaml
milosn_ has quit [Ping timeout: 252 seconds]
ttamttam has quit [Quit: ttamttam]
emmanuelux has joined #ocaml
sebz has joined #ocaml
<thelema> orbitz: what was the memory leak?
sebz has quit [Quit: Computer has gone to sleep.]
shachaf has quit [*.net *.split]
mehdid has quit [*.net *.split]
hcarty has quit [*.net *.split]
dsheets has quit [*.net *.split]
diml has quit [*.net *.split]
rbancroft has quit [*.net *.split]
shachaf has joined #ocaml
mehdid has joined #ocaml
hcarty has joined #ocaml
dsheets has joined #ocaml
diml has joined #ocaml
rbancroft has joined #ocaml
shachaf has quit [Max SendQ exceeded]
shachaf has joined #ocaml
sebz has joined #ocaml
The_third_bug has quit [Read error: Connection reset by peer]
pilki has joined #ocaml
The_third_man has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
<Drakken> # Bigarray.Array1.map_file fd Bigarray.char Bigarray.c_layout true (-1);;
<Drakken> Exception: Sys_error "Invalid argument".
<Drakken> from letlrec's paste
<Drakken> Why does this raise such a cryptic exception when there's already an Invalid_arg exception?
<adrien> C side and unhandled scenario I guess
<adrien> but if you want the actual issue, I think that stracing the program is appropriate
sebz has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
sebz has quit [Client Quit]
mcclurmc has quit [Excess Flood]
mcclurmc has joined #ocaml
<adrien> is there a homepage for odb.ml?
sebz has joined #ocaml
<orbitz> thelema: A secret hashtbl not being cleaned up when a user unsubscribed
<orbitz> thelema: Been running for abotu 12 hours and memory usage is holding flat around 14megs, great day!
<adrien> \o/
<orbitz> :)
<orbitz> This has been a dark mark on my soul for 3 weeks
<orbitz> can't say how happy I am to track it down
sebz has quit [Client Quit]
roconnor has quit [Ping timeout: 260 seconds]
ccasin has quit [Ping timeout: 245 seconds]
dsheets has quit [Ping timeout: 240 seconds]
ccasin has joined #ocaml
sebz has joined #ocaml
letrec has joined #ocaml
ttamttam has joined #ocaml
<thelema> orbitz: secret hashtables! grr
<thelema> adrien: no, just the github home. Do you think odb needs a homepage?
<thelema> adrien: well, I guess there's this: http://oasis.ocamlcore.org/dev/odb/
<adrien> thelema: I told someone "use odb" and then found myself unable to link at what odb is
<adrien> thelema: but the forge page is not too bad
<adrien> probably needs some more explanation but only a few more words I think
<thelema> orbitz: yes, hashtables are based on arrays - an array of linked lists
<thelema> adrien: I think I can make changes to the website too, so let me know if you have any specifics.
<adrien> thelema: sure; I'll look at how it can be changed a bit later today or tomorrow
letrec has quit [Ping timeout: 252 seconds]
<adrien> been building stuff the whole day; mostly C++ stuff, and usually dirty
EmmanuelOga has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
<adrien> C++ is probably the language that best reminds me why I like OCaml
<adrien> on the other hand, the slow compiles give enough time to go out, buy food, clean the dishes, ...
<thelema> :)
<Drakken> thelema where on github do you want that batbench plot?
ftrvxmtrx has quit [Ping timeout: 268 seconds]
ftrvxmtrx has joined #ocaml
<orbitz> thelema: Some way to easily investigate the heap of an ocaml app would be great. Know of how bad this would be to implement/anyone doing this without patchingthe ocmpiler?
<orbitz> This experience has taught me, even though I dislike the language, Java has really nice tools for understanding yoru application
sebz has joined #ocaml
<adrien> as far as I'm concerned, I wouldn't mind having to have a second ocaml installation on disk with everything for profiling, no matter how slow it is
sebz has quit [Ping timeout: 244 seconds]
<orbitz> Same
<orbitz> Even if I had to switch to bytecode to find this memory leak, that would be ok
<orbitz> But I'd prefer something that insruments the bytecode rather than modifies the compiler, since bytecode changes less often than the compiler code
lamawithonel has quit []
<orbitz> ANyone know the internals enough to think of what would be needed for somethign like dumping the heap of a runnign program and navigating it (knowing the type of objects)?
<adrien> automatic instrumentation of data structures would have helped in your case I think
<adrien> and that's doable afaik
* adrien gets ready for another 30-minutes recompile of Ogre3D
<orbitz> Yes, in Java-land I would have opened up Yourkit, taken a heap dump of my app, saw that I had 10 trillion strings, foudn which container they were referenced from, and known immediatly it was this islly hashtbl
<orbitz> I'm not saying I want to use Java, of coures, just saying a similar workflow would probably be great for Ocaml, more great than debating if we sohuld remove `let` from CoreML :)
Anarchos has joined #ocaml
<thelema> Drakken: ?? if you can make a pull request...
<thelema> orbitz: I think it's doable to investigate an ocaml heap, especially if you know the roots
<adrien> globroots.c has three root lists (but maybe only one is enough) but I don't know if there's an easy way to access them
<adrien> worst case, you'd add a small C stub
<orbitz> thelema: how?
<orbitz> cool
ftrvxmtrx_ has joined #ocaml
<ygrek> memory profiling could be easier (even without extra type info), I though ocamlviz was doing smth in that direction
<ygrek> * thought
mfp has quit [Read error: Connection reset by peer]
ftrvxmtrx has quit [Ping timeout: 240 seconds]
<adrien> I read something about it having an issue recently but I couldn't say for sure; but, yes, it should
<adrien> I'm not sure if it can track hashtables and other structures automatically
<adrien> but then it should be possible to extend the syntax to do it automatically
lamawithonel has joined #ocaml
mfp has joined #ocaml
emmanuelux has quit [Ping timeout: 240 seconds]
emmanuelux has joined #ocaml
emmanuelux has quit [Read error: Connection reset by peer]
emmanuelux has joined #ocaml
BiDOrD has joined #ocaml
BiDOrD_ has quit [Ping timeout: 252 seconds]
ulfdoz has quit [Ping timeout: 260 seconds]
ulfdoz has joined #ocaml
raichoo has joined #ocaml
mcclurmc has quit [Excess Flood]
<hcarty> Would anyone like to test ocamlbrew before I make a formal announcement? https://github.com/hcarty/ocamlbrew
<hcarty> Unfortunately it looks like the latest OCaml trunk does not build on 64bit Linux... at least not my system (Ubuntu 11.04)
ocp has joined #ocaml
mcclurmc has joined #ocaml
<adrien> does it require a lot of brainpower? =)
<hcarty> adrien: The default requires copying and pasting one line into a terminal :-)
<adrien> bash is required?
<hcarty> That will download and build OCaml, findlib, odb, oasis, Batteries, utop, ocamlscript in $HOME/ocamlbrew/ocaml-3.12.1/
<hcarty> adrien: Yes
<adrien> ok; running, I hope it won't kill my computer
<adrien> and slow connection here so it might take some time
<hcarty> adrien: I hope so too. But if it does, you get to keep all the pieces!
<adrien> \o/
<adrien> "Retrieving OCaml" <- any way to have a progress meter?
<adrien> ok, building now
ttamttam has left #ocaml []
<hcarty> adrien: The closest thing you can get to a progress meter at the moment is tailing the log file
<adrien> hcarty: I meant for downloading but it would probably be interesting to know a bit about compilation too
<adrien> tee?
<hcarty> adrien: You should get some progress updates from curl in the log file if you tail it during the download
<adrien> too much work ;p
<adrien> (actually: too many terminals opened)
<hcarty> adrien: I could use tee to redirect the download output, but I wanted to keep the default output fairly terse
<hcarty> adrien: Fair enough :-)
ocp has quit [Quit: Leaving.]
ocp has joined #ocaml
raichoo has quit [Ping timeout: 252 seconds]
Kakadu has joined #ocaml
raichoo has joined #ocaml
<adrien> Enjoy!
<adrien> Something errored out, please check the log file for details:
<adrien> /tmp/ocamlfLpZVm.log
<adrien> Exiting...
ocp has quit [Read error: No route to host]
<adrien> so
ocp has joined #ocaml
<adrien> everything worked and it says it failed =)
<hcarty> adrien: Oops! Thanks, I'll fix that :-)
<hcarty> I'm glad to hear it worked. You should now have (yet another) installation of OCaml 3.12.1 with a handful of libraries and tools to go with it.
<hcarty> adrien: Thank you for testing!
<adrien> # print_endline "You're welcome! =) ";;
<adrien> You're welcome! =)
<adrien> - : unit = ()
philtor has joined #ocaml
<adrien> but I can't use backspace or C-W in utop
<adrien> and I hate C++ ='(
everyonemines has joined #ocaml
<Kakadu> Qrntzz: hi!
ocp has quit [Quit: Leaving.]
ocp has joined #ocaml
<adrien> and I now have an entirely different view on pragmas
<Qrntzz> Kakadu: hello
<Qrntzz> Kakadu: I decided I will probably settle with QML for now
<Kakadu> Qrntzz: what about qml + ocaml?
<Qrntzz> Kakadu: sounds tempting for sure
<hcarty> adrien: Not sure why utop isn't working for you - there may be a missing prerequisite or some kind of terminal handling mismatch.
<Qrntzz> Kakadu: I will need backend code, no matter how much QML I stuff in my app, so it being ocaml would help much :-)
<Qrntzz> any ideas for realization yet?
<adrien> hcarty: iirc it was that; I could "fix" it with by changing xterm's config but that was not the best solution for other reasons (broke other things I think)
<Kakadu> Qrntzz: I dont undestand completely how to bind C++ values to the qml ecmascript engine...
<Kakadu> Qrntzz: I want to develop paladin level 20 for it, I think :D
<Qrntzz> heh
<Qrntzz> binding values e. g. transformating types?
<Kakadu> mmm, no
raichoo has quit [Ping timeout: 248 seconds]
raichoo has joined #ocaml
<Kakadu> If we want to access a field of C++ object from QML we should wrap this field with Q_PROPERT and Q_INVOKABLE macroses...
<Qrntzz> oh.
<Kakadu> It is not very hard but I don't completely understand how it works
<Qrntzz> where should I look in the source if I want to try to figure it out? just to make sure we examine the same thing
Drakken has left #ocaml []
<Kakadu> Qrntzz: I'm talking about qml at all, not lablqt
philtor has quit [Ping timeout: 255 seconds]
<Qrntzz> Kakadu: me too.
<Qrntzz> Kakadu: I can as well investigate the source myself and get back to you, though
Submarine has quit [Quit: Leaving]
dsheets has joined #ocaml
<Qrntzz> Kakadu: thanks (checked out the qml sources already though)
Drup has joined #ocaml
<Qrntzz> seems I don't have Qt3DQuick, hrm
<Kakadu> Qrntzz: I've forget to remove this dependence)
<Qrntzz> oh, so it's actually not needed?
<Kakadu> yes
<Kakadu> it is from old project
<Qrntzz> ok
Drup has quit [Read error: Connection reset by peer]
<Kakadu> Qrntzz: git pull
<Qrntzz> Kakadu: removed references to that, compiles, works
<Qrntzz> heh, a bit too late
<Qrntzz> brb
Drup has joined #ocaml
ocp has quit [Ping timeout: 255 seconds]
dilange888 has joined #ocaml
everyonemines has quit [Quit: Leaving.]
<bobry> Is there an easy way to ignore Python-like comments, when using ocamlyacc / ocamllex?
<Drup> bobry: this kind of comment : "# blabla \n" ?
<bobry> uhuh
<bobry> one way is a regular expression ofc, something like '#' [^'\n']+
<Drup> yeah, I usualy do this for one line comment
<bobry> should the lexer eat up the trailing '\n' as well?
<bobry> or it doesn't matter?
<Drup> it depends if you have another rule to skip whitespace
<bobry> yup, i do
<bobry> it works! thanks Drup :)
<Drup> so the '\n' will be skiped anyway
<Drup> np =)
Snark has quit [Quit: Quitte]
Kakadu has quit [Quit: Konversation terminated!]
sebz has joined #ocaml
dilange888_ has joined #ocaml
dilange888_ has quit [Client Quit]
dilange888 has quit [Ping timeout: 252 seconds]
bobzhang has joined #ocaml
edwin has quit [Remote host closed the connection]
sebz has quit [Quit: Computer has gone to sleep.]
raichoo has quit [Quit: leaving]
sebz has joined #ocaml
bobzhang has left #ocaml []
pilki has quit [Quit: This computer has gone to sleep]
philtor has joined #ocaml
mekeor has joined #ocaml
ygrek has quit [Remote host closed the connection]
Morphous_ has quit [Ping timeout: 244 seconds]
Drakken has joined #ocaml
letrec has joined #ocaml
Morphous_ has joined #ocaml
mekeor has quit [Quit: cu]
ikaros has quit [Quit: Ex-Chat]
EmmanuelOga has quit [Ping timeout: 244 seconds]
<NaCl> How are integers sized in ocaml?
<NaCl> per architecture, that is
<adrien> 31 bits on x86_32; 63 bits on x86_64
letrec has quit [Remote host closed the connection]
<adrien> Int32, Int64 and NativeInt modules available; and different sizes in Bigarrays too
<NaCl> How do I make an Int64, anyway
<NaCl> adrien: go to bed
<adrien> NaCl: 'man Int64' ;-)
<adrien> NaCl: I'm going right now! song finished, album is over, reached the end of the playlist and finished what I wanted to do: perfect timing!
<NaCl> grats
<NaCl> :P
<adrien> ah, good, I can start coding again now :P
* NaCl has been doing Project Euler
* Anarchos just discovers that LC_TYPE=C is mandatory if you do "make world" on a localized computer ...
<adrien> Anarchos: haven't managed to do otherwise?
<Anarchos> NaCl what is project euler ?
<adrien> NaCl: never had the time ='(
<Anarchos> adrien no sorry
<NaCl> Anarchos: http://projecteuler.net
<NaCl> adrien: people at my office are doing it
<NaCl> And I'm the only one who even wants to use ocaml for anything. At all.
<Anarchos> NaCl will we see an ocaml OS ? ;)
<NaCl> adrien might.
<NaCl> He's writing a web browser.
<adrien> but not the engine ='(
<Anarchos> NaCl euler project seems too challenging for me :(
<adrien> NaCl: and today, I had enough C++ for the whole year
<adrien> Anarchos: well, 1- it's about being a challenge, 2- I'm surprised you say that
<Anarchos> adrien why are you surprised ?
<NaCl> adrien: goocanvas?
<NaCl> :P
<adrien> DIE NACL, DIE! ;p
<NaCl> ouch
<adrien> Anarchos: from what I've seen, you should be able to do a good proportion of them
<Anarchos> adrien no : i am a slob in arithmetic !
<adrien> NaCl: goocanvas abuses C too much ='(
<NaCl> A lot of them are just algorithms
<adrien> Anarchos: hah, right, it's true there's that too =)
<NaCl> adrien: lol C abuse
<adrien> NaCl: bitfields abuse is really what made me give up
<adrien> anyway, really going to bed now; good night =)
<Anarchos> adrien good night
<NaCl> When I feel like writing the handwriting recognizer thing, I'll probably do the UI in C++.
<Anarchos> NaCl latest rev of ocaml compiling on my haiku dual core laptop :)
<NaCl> Anarchos: cool
<Anarchos> NaCl next step : porting it to the mmix architecture :)
<philtor> any camlp4 experts around?
<Anarchos> philtor i was always too coward to look at camlp4, sorry not to be able to help you
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
ulfdoz_ has joined #ocaml