From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA00149; Mon, 19 May 2003 11:41:51 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA31783 for ; Mon, 19 May 2003 11:41:50 +0200 (MET DST) Received: from avalon.ens-lsh.fr (mailhost.ens-lsh.fr [193.51.131.2]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h4J9fnH20120 for ; Mon, 19 May 2003 11:41:50 +0200 (MET DST) Received: from avalon.ens-lsh.fr (localhost [127.0.0.1]) by avalon.ens-lsh.fr (8.12.8/8.12.8) with ESMTP id h4JAexgQ003027 for ; Mon, 19 May 2003 11:40:59 +0100 (WEST) Received: from ens-notes1.ens-lsh.fr (ens-notes1.ens-lsh.fr [10.2.1.44]) by avalon.ens-lsh.fr (8.12.8/8.12.8) with ESMTP id h4JAexV9003024 for ; Mon, 19 May 2003 11:40:59 +0100 (WEST) Received: from mostha ([10.3.20.3]) by ens-notes1.ens-lsh.fr (Lotus Domino Release 5.0.10) with SMTP id 2003051911414631:16181 ; Mon, 19 May 2003 11:41:46 +0200 Date: Mon, 19 May 2003 11:39:07 +0200 From: Damien To: caml-list@inria.fr Subject: Re: [Caml-list] Printf question Message-Id: <20030519113907.07074d4a.Damien.Pous@ens-lyon.fr> In-Reply-To: <16071.8904.507961.569277@hector.lesours> References: <16071.8904.507961.569277@hector.lesours> Organization: mosthagloups X-Mailer: Sylpheed version 0.8.11claws141 (GTK+ 1.2.10; i386-debian-linux-gnu) Mime-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on ens-notes1/ENS-LSH(Release 5.0.10 |March 22, 2002) at 19/05/2003 11:41:46, Serialize by Router on ens-notes1/ENS-LSH(Release 5.0.10 |March 22, 2002) at 19/05/2003 11:41:46 Content-Type: multipart/mixed; boundary="Multipart_Mon__19_May_2003_11:39:07_+0200_0845d420" X-Spam: no; 0.00; damien:01 ens-lyon:01 caml-list:01 printf:01 poesia:01 camlp:01 newbie:01 binaries:01 basile:01 disadvantage:01 debugging:01 ocamlc:01 debug:01 recompile:01 byte:01 X-Attachments: type="application/octet-stream" name="Makefile" name="Makefile" type="application/octet-stream" name="msg.ml" name="msg.ml" type="application/octet-stream" name="msg.mli" name="msg.mli" type="application/octet-stream" name="toto.ml" name="toto.ml" type="application/octet-stream" name="EXAMPLE" name="EXAMPLE" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk --Multipart_Mon__19_May_2003_11:39:07_+0200_0845d420 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII > You might have a look into the tracing facilities I developed for > Poesia. These are tracing macros for camlp4. looks really fine ! but also really complicated... I personally use the less powerful attached code : advantages are : * you don't need to recompile the code each time you change debug options * it can _easily_ be adapted to the newbie needs * it doesn't need camlp4 (is this an actual advantage !?) disadvantages are : * you can't automagically display the location in the source code * you need to remove debug statements by hand when compiling efficient binaries * Basile will certainly find more :-) note : for the first disadvantage, why not to modify the assert function in order it also prints the execution stack. I don't know if this is possible in both byte and native code, but I guess it should be when debugging informations are saved (ocamlc -g). from my mind, this would be really useful. hope this help, damien -- --Multipart_Mon__19_May_2003_11:39:07_+0200_0845d420 Content-Type: application/octet-stream; name="Makefile" Content-Disposition: attachment; filename="Makefile" Content-Transfer-Encoding: base64 dG90bzogbXNnLmNtbyB0b3RvLm1sCglvY2FtbGMgbXNnLmNtbyB0b3RvLm1sIC1vIHRvdG8KCm1z Zy5jbW86IG1zZy5jbWkgbXNnLm1sCglvY2FtbGMgLWMgbXNnLm1sCgptc2cuY21pOiBtc2cubWxp CglvY2FtbGMgLWMgbXNnLm1saQoKY2xlYW46IAkKCXJtIC1mIHRvdG8gKi5jbT8K --Multipart_Mon__19_May_2003_11:39:07_+0200_0845d420 Content-Type: application/octet-stream; name="msg.ml" Content-Disposition: attachment; filename="msg.ml" Content-Transfer-Encoding: base64 KCogd2FybmluZyBjbGFzc2VzICAqKQp0eXBlIHdhcm5pbmdfdCA9IFsgCnwgYEZvbwp8IGBCYXIg CnwgYEFyZgpdCgpsZXQgbWFwIHMgPSAKICBtYXRjaCBTdHJpbmcudXBwZXJjYXNlIHMgd2l0aAog ICAgfCAiRk9PIiAtPiBgRm9vCiAgICB8ICJCQVIiIC0+IGBCYXIKICAgIHwgIkFSRiIgLT4gYEFy ZgogICAgfCBfICAgICAtPiBmYWlsd2l0aCAoIlVua25vd24gd2FybmluZyA6ICJecykKCigqIHdh cm5pbmdzIGhhbmRsZWQgYXMgZXJyb3JzICopCmxldCBlcnJfbCA9IHJlZiBbXQpsZXQgYXNfZXJy b3IgdyA9IGVycl9sIDo9IChtYXAgdykgOjogIWVycl9sCgooKiBpZ25vcmVkIHdhcm5pbmdzICop CmxldCB3YXJuX2wgPSByZWYgW10KbGV0IGFkZF93YXJuaW5nIHcgPSB3YXJuX2wgOj0gKG1hcCB3 KSA6OiAhd2Fybl9sCgoKbGV0IGVycm9yICgpID0gUHJpbnRmLmtwcmludGYgKGZ1biBzIC0+IHBy ZXJyX2VuZGxpbmUgczsgZXhpdCAxKQpsZXQgd2FybmluZyB3ID0gT2JqLm1hZ2ljICgKICBpZiBM aXN0Lm1lbSB3ICFlcnJfbCB0aGVuIAogICAgZXJyb3IgKCkKICBlbHNlIGlmIExpc3QubWVtIHcg IXdhcm5fbCB0aGVuCiAgICBQcmludGYua3ByaW50ZiAoZnVuIHMgLT4gcHJlcnJfZW5kbGluZSBz OyAiIikKICBlbHNlCiAgICBQcmludGYua3ByaW50ZiAoZnVuIF8gLT4gIiIpKQooKiBPYmoubWFn aWMgaXMgdXNlZCB0byBjYXN0IGEgc3RyaW5nIHRvIHVuaXQgYW5kIGF2b2lkICJ0aGlzIGV4cHJl c3Npb24gc2hvdWxkIGhhdmUgdHlwZSB1bml0IiB3YXJuaW5ncy4uLiAqKQo= --Multipart_Mon__19_May_2003_11:39:07_+0200_0845d420 Content-Type: application/octet-stream; name="msg.mli" Content-Disposition: attachment; filename="msg.mli" Content-Transfer-Encoding: base64 KCogd2FybmluZyBjbGFzc2VzICAqKQp0eXBlIHdhcm5pbmdfdCA9IFsgCnwgYEZvbwp8IGBCYXIg CnwgYEFyZgpdCgooKiB3YXJuaW5ncyB0byBhY3RpdmF0ZSBvciB0byBoYW5kbGUgYXMgZXJyb3Jz ICopCnZhbCBhc19lcnJvciAgICA6IHN0cmluZyAtPiB1bml0CnZhbCBhZGRfd2FybmluZyA6IHN0 cmluZyAtPiB1bml0CgooKiB3YXJuaW5ncyAvIGVycm9ycyAqKQp2YWwgd2FybmluZyA6IHdhcm5p bmdfdCAtPiAoJ2EsIG91dF9jaGFubmVsLCB1bml0KSBmb3JtYXQgLT4gJ2EgCnZhbCBlcnJvciAg IDogICAgICB1bml0IC0+ICgnYSwgdW5pdCwgc3RyaW5nKSBmb3JtYXQgLT4gJ2EKCg== --Multipart_Mon__19_May_2003_11:39:07_+0200_0845d420 Content-Type: application/octet-stream; name="toto.ml" Content-Disposition: attachment; filename="toto.ml" Content-Transfer-Encoding: base64 bGV0IF8gPSAKICBBcmcucGFyc2UgCiAgICBbICItVyIsIEFyZy5TdHJpbmcgTXNnLmFkZF93YXJu aW5nLCAiIDx3Plx0ZW5hYmxlIHdhcm5pbmdzIG9mIGtpbmQgdyI7IAogICAgICAiLUUiLCBBcmcu U3RyaW5nIE1zZy5hc19lcnJvciwgICAgIiA8dz5cdGhhbmRsZSB3YXJuaW5ncyBvZiBraW5kIHcg YXMgZXJyb3JzIiBdCiAgICAoZnVuIF8gLT4gcmFpc2UgKEFyZy5CYWQgInRvbyBtYW55IGFyZ3Vt ZW50cyIpKQogICAgInRvdG8gW29wdGlvbnNdIjsKICAKICBNc2cud2FybmluZyBgRm9vICJmb289 JWQiIDUxOwogIE1zZy53YXJuaW5nIGBCYXIgImJhciVzIiAiam8iOwogIE1zZy53YXJuaW5nIGBB cmYgImdsb3U6ICVmIiAzLjM7CiAgTXNnLmVycm9yKCkgImJvb20gISIKICAgIAoK --Multipart_Mon__19_May_2003_11:39:07_+0200_0845d420 Content-Type: application/octet-stream; name="EXAMPLE" Content-Disposition: attachment; filename="EXAMPLE" Content-Transfer-Encoding: base64 Pi4vdG90bwpib29tICEKCj4uL3RvdG8gLVcgRk9PCmZvbz01MQpib29tICEKCj4uL3RvdG8gLVcg Rk9PIC1XIEJBUgpmb289NTEKYmFyam8KYm9vbSAhCgo+Li90b3RvIC1XIEZPTyAtRSBCQVIKZm9v PTUxCmJhcmpvCg== --Multipart_Mon__19_May_2003_11:39:07_+0200_0845d420-- ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners