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
eikke has quit [Ping timeout: 240 seconds]
ulfdoz has quit [Ping timeout: 240 seconds]
ulfdoz has joined #ocaml
datkin has joined #ocaml
_habnabit has quit [Ping timeout: 245 seconds]
smerz has quit [Remote host closed the connection]
avsm has quit [Quit: Leaving.]
cdidd has joined #ocaml
lihaitao has joined #ocaml
mrvn has quit [Ping timeout: 245 seconds]
mrvn has joined #ocaml
Tianon has quit [Ping timeout: 245 seconds]
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
emmanuelux has quit [Read error: Connection reset by peer]
ulfdoz has quit [Ping timeout: 265 seconds]
ankit9 has joined #ocaml
BiDOrD has joined #ocaml
ankit9 has quit [Quit: Leaving]
BiDOrD has quit [Ping timeout: 240 seconds]
pango is now known as pangoafk
Submarine has joined #ocaml
BiDOrD has joined #ocaml
eikke has joined #ocaml
cago has joined #ocaml
Submarine has quit [Ping timeout: 244 seconds]
djcoin has joined #ocaml
ftrvxmtrx has joined #ocaml
thomasga has joined #ocaml
ankit9 has joined #ocaml
Snark has joined #ocaml
Kakadu has joined #ocaml
avsm has joined #ocaml
rossberg has joined #ocaml
jakobro has joined #ocaml
arquebus has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
rwmjones has joined #ocaml
arquebus has quit [Remote host closed the connection]
xlq has joined #ocaml
jakobro has quit [Quit: leaving]
yezariaely has joined #ocaml
<yezariaely> in the ocaml toplevel: is there a command to clear all of its memory? (I had some problems with #use that old definitions where - of course - still there)
<yezariaely> (other than #quit;; ;-))
<flux> yezariaely, hmm, there might be a trick involving the Toplevel-module. if not, perhaps enhtop or utop come with a builtin trick.
<pippijn> I think it would be trivial to implement that "#clear" command
<yezariaely> already on my todo list for this evening ;-)
<pippijn> if the toplevel is implemented the way I think it is
<flux> pippijn, but, one might not want that either
<flux> what would be useful to have return the state to some previous one
<flux> some state for example after loading batteries and ocamlfind, for example
<pippijn> that would require a little more change, but would also be possible
<mrvn> ctrl-d<pg-up><ret> :)
<yezariaely> flux: #clear returns to a previous state. the very first one :-p
<pippijn> #snapshot
<diml> you can play with Toploop.toplevel_env
<flux> ah, Toploop, I was searching for Toplevel..
<flux> this is probably relevant: val toplevel_env : Env.t ref
<flux> and perhaps: val initialize_toplevel_env : unit -> unit
<flux> yep, Toploop.initialize_toplevel_env () seems to clear at least something :)
<yezariaely> tx
<yezariaely> thx
_andre has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
cyphase has quit [Ping timeout: 240 seconds]
thelema_ has joined #ocaml
thelema has quit [Read error: Connection reset by peer]
iago has joined #ocaml
cyphase has joined #ocaml
Tobu has joined #ocaml
cyphase has quit [Read error: Connection reset by peer]
Submarine has joined #ocaml
kaustuv has joined #ocaml
<adrien> when I write ocamldoc comments in vim, it always wraps my text which is over 80 chars
<xlq> :set tw=0
<zorun> or switch to emacs :)
<adrien> the issue is that it adds a "*" at the beginning of the new lines and this "*" appears in ocamldoc's output; has anyone solved that?
<xlq> :help fo
<xlq> err
<xlq> :help formatoptions
<kaustuv> ocamldoc -stars
<adrien> kaustuv: ah, thanks, that should do it :-)
<adrien> xlq: thanks too; I didn't know about that, it's pretty interesting and I'll probably change my vimrc a bit =)
<adrien> zorun: NEVER! :P
<adrien> (it hurts my fingers)
<xlq> C-x C-crunch M-pain
<kaustuv> setxkbmap -option ctrl:nocaps
<xlq> Oh? Does that set caps lock as control?
<xlq> I fiddled with xmodmap for that :-\
<adrien> I can't do the required gymnastic
<mrvn> you might not believe it but I've managed to close my xemacs by accident a few times
<kaustuv> "xemacs" <-- there's your problem
<mrvn> C-x C-c is too easy to hit
<adrien> :x in emacs too (instead of :w, on azerty keyboards)
<kaustuv> mrvn: (setq confirm-kill-emacs y-or-n-p)
<mrvn> and I hate that C-w is close window in firefox instead of cut text
<adrien> same :-)
<adrien> I've lost a few things in text fields because of that
<flux> ctrl-alt-t
<flux> this will blow your mind!
<adrien> what does it do?
<flux> although I suppose it might not always restore text fields if there's javascript hackery involved?
<flux> it undoes a tab closing
<mrvn> doesn't work often
<adrien> I've used Ctrl+Shift+t in firefox/seamonkey to reopen tabs but that almost never gives me the text bac
<adrien> k
<kaustuv> ITYM ctrl *shift* t
<kaustuv> unless it's platform-specific
<kaustuv> (also doesn't work on the last tab)
<adrien> but imho it's pointless to give it back in the field; just provide a way to access what has been typed
snearch has joined #ocaml
iago has quit [Ping timeout: 248 seconds]
cyphase has joined #ocaml
iago has joined #ocaml
ankit9 has quit [Ping timeout: 246 seconds]
<kaustuv> adrien: re your recent caml-list post, is it because the string was moved by the gc which doesn't update the pointers in the ld-produced wrapper?
<adrien> kaustuv: the string shouldn't be an ocaml-string
<adrien> the function has both ocaml-arguments and other ones; could that be an issue?
<adrien> hmmm, I think I forgot to mention something in that email
<adrien> right, I didn't say I had tried to make the function like an ocaml-callable C function and got the exact same issue
<kaustuv> OK, I guess I don't immediately see the problem in your link.ml
<kaustuv> Can you add the "initializing ..." string in the __wrap_caml%s_value function itself? That way you can be sure that the corruption happens in the real_entry() itself
<kaustuv> s/add/pring/
<adrien> thanks for having taken a look :-)
<kaustuv> err, print
<adrien> that's a good idea, I'll try it in a few minutes
<kaustuv> although I guess since only the "done initializing" strings are corrupted that is pretty much guaranteed to be the case
lihaitao has quit [Quit: Ex-Chat]
<adrien> I also need to make the string pointer constant and try to have it put in a read-only section of the executable so that modifying it crashes (and I'll know what modifies it I hope)
<kaustuv> why not inline mod_wrap inside the __wrap_caml%s_entry functions and not use string variables to hold the names at all?
<adrien> I'm currently using it to time initialization of hundreds of modules; otoh it's true this is generated code and that could remove some issue so it's worth a try
<kaustuv> are you sure that these silly strings are not there in MODULES itself?
<adrien> once the executable has been generated, MODULES doesn't play any role so it shouldn't impact anything at runtime
<adrien> I've checked the addresses of the module_name string and it changes after the module initialization (used printf's %p argument for that)
testcocoon has quit [Quit: Coyote finally caught me]
<adrien> some addresses were close to the original and some became 0x7fff...
<kaustuv> can you also print the addresses to the various entry functions also? Maybe some of the functions are being relocated by the gc?
<kaustuv> but this problem is above my pay grade. Maybe one of the GC implementers will respond to your post.
BeastCaml has joined #ocaml
testcocoon has joined #ocaml
<adrien> I'm thinking that there might be some serious constraints around there (the code calling the initialization functions is written in asm
<adrien> it's not something people tend to play with everyday ;-)
<BeastCaml> hi, who can help me to implant Karnaugh in OCaml please ?
<adrien> (I mean, the early startup of ocaml, not asm)
<BeastCaml> help me !!! (ノ^_^)ノ┻━┻
<kaustuv> Does your code run correctly otherwise? If so, just pring the "("^name at entry, followed by timestamp, then timestamp^")" at exot. amd then do some post-processing
<BeastCaml> ¯\_(ツ)_/¯
<kaustuv> (oops at all the typos -- getting used to new keyboard still)
<BeastCaml> sup son !!!!!
<BeastCaml> guys, be nice !
xlq has quit [Ping timeout: 260 seconds]
<BeastCaml> Peace !
avsm1 has joined #ocaml
Kakadu has quit [Quit: Page closed]
BeastCaml has quit [Quit: Page closed]
avsm has quit [Ping timeout: 260 seconds]
<adrien> kaustuv: the program works properly except for the pointer corruption and the crash; but until it crashes, it seems fine
emmanuelux has joined #ocaml
<adrien> (it crashes quite quickly but it has had time to do a lot of work in the hundreds of modules, and that includes C bindings, objects, ...)
<adrien> I'm going to do some tries; but first, I need to eat
oriba has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
kaustuv has left #ocaml []
Tobu has joined #ocaml
gnuvince has quit [Ping timeout: 248 seconds]
avsm1 has quit [Quit: Leaving.]
avsm has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
iago has quit [Ping timeout: 244 seconds]
Tobu has joined #ocaml
smondet has joined #ocaml
iago has joined #ocaml
|Lupin| has joined #ocaml
<|Lupin|> Hello, everybooooooody.I'm stuck with a compilation error and would greatly appreciate any help...
<|Lupin|> Error: Error while linking /usr/lib/ocaml/batteries/batteries.cma(BatMutex):
<|Lupin|> Reference to undefined global `Mutex'
<thelema_> link with threads
<thelema_> -threads
<|Lupin|> any clue, please ?
<|Lupin|> thelema_: /me tries, thanks
<|Lupin|> thelema_: where does -threads have to go, please ?
<thelema_> how are you compiling? ocmalbuild? ocamlmake? omake?
<|Lupin|> thelema_: does it need to be passed as an arguemnt to a program ? which one ?
snearch has quit [Quit: Verlassend]
<thelema_> -threads needs to be passed as an argument to ocamlopt/ocamlc
<thelema_> oops, -thread
<|Lupin|> thelema_: a handwrittenmakefile...
<thelema_> using ocamlfind, I hope?
<|Lupin|> ah, no s
<|Lupin|> -thread
eikke has quit [Ping timeout: 248 seconds]
<|Lupin|> thelema_: yes, at least that... :/
<thelema_> Things are bit more complex than necessary in batteries 1.x - with threads: "open Batteries", -threads. Without threads: "open Batteries_uni", no -threads
<thelema_> batteries 2.0 fixes this, with "open Batteries" for both and "open BatteriesThreads", -threads for thread extensions
<|Lupin|> thelema_: looks indeed more straightforward!
<|Lupin|> It's 1.4.1-1 here...
<thelema_> and it shouldn't cause crazy error messages for people that don't understand everything
<thelema_> 2.0 is still in beta, hopefully released this summer
<|Lupin|> thelema_: cool
<|Lupin|> thelema_: yes, at soome point I was a ot too bad Caml programmer, so I think that if it puzzles me it must puzzle other persons...
<thelema_> I'm looking forward to 2.0 being released, but need to finish some grunt work before this should happen
Tobu has quit [Ping timeout: 260 seconds]
<thelema_> merging the stdlib docs and functionality back into the BatFoo modules
djcoin has quit [Quit: WeeChat 0.3.2]
<|Lupin|> thelema_: are you a developer of batteries ?
<thelema_> yes
cago has quit [Quit: Leaving.]
<|Lupin|> thelema_: okay. Cool job.
<|Lupin|> have to goo now but really thanks a lot for the help
<thelema_> thanks. Let me know any ideas you have for improvements
<thelema_> cheers
<thelema_> or just any comments on batteries in general
<|Lupin|> would probably have needed a lot of time to find out the -thread trick by myself, if I'd ever found it.
<|Lupin|> thelema_: will sure do !
<thelema_> another fix is to just "open Batteries_uni", but this is *very* non-obvious
<|Lupin|> thelema_: yeah and will have to be changed back when 2.0 is released...
<thelema_> yup.
<|Lupin|> okay
<|Lupin|> till soon then!
<|Lupin|> goodbye.
|Lupin| has quit [Quit: leaving]
iago has quit [Ping timeout: 246 seconds]
<mehdid> thelema_: is pa_where still part of batteries?
<thelema_> no
<mehdid> it is mentioned in some documentation files.
<mehdid> (html files)
<thelema_> those documentation files refer to pre-1.0 batteries and should not be referred to
<mehdid> they are still in the repo though :)
<mehdid> (and installed by default, iirc)
<thelema_> please send patch to fix
<mehdid> will do. where should I send the patch?
<mehdid> k, thanks
<adrien> is a GC root never moved?
<thelema_> I think so, yes.
<adrien> hmmm, that could be a very good thing, thanks
Tobu has joined #ocaml
<adrien> however I can only pass arguments of type "value" to caml_register_global_root
<thelema_> correct, no registering ints as roots
<adrien> but that has shown that the wrap function was "compatible" with a value while the real function wasn't
eikke has joined #ocaml
ulfdoz has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
xlq has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
oriba has quit [Quit: oriba]
andreypopp has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Tobu has joined #ocaml
eikke has quit [Ping timeout: 264 seconds]
pangoafk is now known as pango
eikke has joined #ocaml
eikke has quit [Ping timeout: 264 seconds]
Tobu has quit [Ping timeout: 272 seconds]
robocop has joined #ocaml
Tobu has joined #ocaml
eikke has joined #ocaml
andreypopp has joined #ocaml
ftrvxmtrx has joined #ocaml
metasyntax|work has quit [Quit: The Spark of Deity ignites in our hands!]
oriba has joined #ocaml
avsm has quit [Quit: Leaving.]
robocop has quit [Ping timeout: 245 seconds]
robocop has joined #ocaml
eikke has quit [Ping timeout: 248 seconds]
robocop has quit [Remote host closed the connection]
cdidd has quit [Ping timeout: 260 seconds]
bkheops has joined #ocaml
cdidd has joined #ocaml
eni has joined #ocaml
Zedrikov has joined #ocaml
my_nick_was_take has joined #ocaml
my_nick_was_take has quit [Client Quit]
ggherdov has joined #ocaml
iago has joined #ocaml
ggherdov has left #ocaml []
_andre has quit [Quit: leaving]
bkheops has quit [Ping timeout: 245 seconds]
cdidd has quit [Ping timeout: 272 seconds]
ulfdoz has quit [Ping timeout: 260 seconds]
Tobu has quit [Ping timeout: 260 seconds]
Tobu has joined #ocaml
Tobu has quit [Changing host]
Tobu has joined #ocaml
<eni> what is ocaml-core?
<thelema_> eni: jane-street-core is an extended stdlib for ocaml
<hcarty> eni: Do you mean the library or the company/website(s)?
<eni> what does it include more?
<hcarty> Ah, library - sorry for the noise
<hcarty> eni: Most of the available information is there on that site. Batteries is a similar community-driven project.
<thelema_> wow, that's bad luck for ocamlcore to have jane street core use the module name "ocaml-core" for their project
<hcarty> thelema_: I agree, although with gildor's shift in focus it may not be an issue any longer.
<hcarty> Or not for much longer
<thelema_> hcarty: true
rwmjones has quit [Ping timeout: 265 seconds]
Zedrikov has quit [Quit: Bye all, see you next time!]
Snark has quit [Quit: Quitte]
rwmjones has joined #ocaml
<alpounet> hcarty, uh? what shift in focus?
<thelema_> alpounet: gildor is working for google now
<alpounet> oh yeah right
<alpounet> so he isn't working on any of the ocamlcore related stuffs anymore?
<thelema_> alpounet: he's still working on oasis, but it's a bit slower.
<alpounet> ok
othiym23 has quit [Ping timeout: 246 seconds]
<eni> how does ocaml know that when all cases are being matched or no?
<thelema_> eni: static analysis
<thelema_> it checks all possible cases
<eni> yeah but how
<eni> let's say for the case match l with [] -> true;;
<thelema_> it knows that l is a list, and knows that lists are either [] or a :: b
<eni> makes sense
khaled has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
thelema_ has quit [Read error: Connection reset by peer]
khaled has quit [Quit: Quitte]
bkheops has joined #ocaml
thelema has joined #ocaml
Tobu has joined #ocaml
avsm has joined #ocaml
bkheops has quit [Quit: Quitte]
Submarine has quit [Remote host closed the connection]
<adrien> consider this command:
<adrien> OCAMLFIND_DESTDIR=/tmp/daw/package-lablgtk/usr/lib64/ocaml/ ocamlfind query lablgtk2
<adrien> /opt/ocaml/lib/ocaml/pkg-lib/lablgtk2
<adrien> is there something to tell ocamlfind where to look for the "query" subcommand?
<thelema> yes, not DESTDIR, just OCAMLPATH
<adrien> testing
avsm has quit [Quit: Leaving.]
<adrien> thelema: working, thanks :-)
<adrien> OCAMLPATH won't change the default install dir, will it?
<adrien> probably not
xlq has quit [Ping timeout: 260 seconds]
<adrien> packager warning: next lablgtk2 will use ocamlfind for installation, and with its own META file of course :-)
* adrien ponders using caps
<hcarty> adrien: That's a nice warning to receive
<adrien> :-)
<adrien> and it does: cd `ocamlfind query lablgtk2` && ranlib liblablgtk2.a liblablglade2.a [...]
<adrien> in "make install", which is why it needs to have a matching OCAMLPATH
ftrvxmtrx has quit [Ping timeout: 246 seconds]
ftrvxmtrx has joined #ocaml
smondet has quit [Remote host closed the connection]
thomasga has quit [Quit: Leaving.]
tufisi has quit [Ping timeout: 246 seconds]
oriba has quit [Quit: oriba]
<thelema> adrien: ocamlpath is a list of directories, like PATH
tufisi has joined #ocaml
eikke has joined #ocaml
othiym23 has joined #ocaml
andreypopp has quit [Quit: Computer has gone to sleep.]
tufisi has quit [Ping timeout: 252 seconds]
tufisi has joined #ocaml
tufisi has quit [Ping timeout: 260 seconds]
emmanuelux has quit [Read error: No route to host]
emmanuelux has joined #ocaml
<eni> # type i = Foo of int;;
<eni> type i = Foo of int
<eni> # Foo(2)==Foo(2);;
<eni> - : bool = false
<eni> but with = it gives true.
eni has quit [Quit: Leaving]
ggherdov has joined #ocaml
ggherdov has left #ocaml []