From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 0F9727F0F9 for ; Wed, 25 Nov 2015 16:28:11 +0100 (CET) IronPort-PHdr: 9a23:tGKoihD3We/PwbUVLqoYUyQJP3N1i/DPJgcQr6AfoPdwSP78osbcNUDSrc9gkEXOFd2CrakU1qyJ4+u/CSQp2tWojjMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpQAbFhi3DwdpPOO9QteU1JTqkb/isMKDKyxzxxODIppKZC2sqgvQssREyaBDEY0WjiXzn31TZu5NznlpL1/A1zz158O34YIxu38I46Fp34d6XK77Z6U1S6BDRHRjajhtpZ6jiR6WbBWG4DMzVXkRjBFIAhTepEX7QJjZsyb3u6x6wibMbuPsSrVhdjm44+9QVBjskCIOMThxpGDRhMtYg69BrFe6uxt724vdZofTOPcoLfCVRs8TWWcUBpUZbCdGGI7pKtJXV+c= Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=info@gerd-stolpmann.de; spf=None smtp.mailfrom=info@gerd-stolpmann.de; spf=None smtp.helo=postmaster@mout.kundenserver.de Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=pra; client-ip=212.227.126.133; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=mailfrom; client-ip=212.227.126.133; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.kundenserver.de) identity=helo; client-ip=212.227.126.133; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="postmaster@mout.kundenserver.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AkAABb01VWlIV+49Regw9/b75CAQ2BZhcGhXICgUA4FAEBAQEBAQEBEAEBAQEHCwsJHzCCLYIIAQEEVSQQCw44VwYTCYgmAwm+CQEBAQEBAQQBAQEBARUJhVmFeYRmglUMQYExBYdKjw2BCQKMKokck0IfAQGCUxYHgVdxAYUrAQEB X-IPAS-Result: A0AkAABb01VWlIV+49Regw9/b75CAQ2BZhcGhXICgUA4FAEBAQEBAQEBEAEBAQEHCwsJHzCCLYIIAQEEVSQQCw44VwYTCYgmAwm+CQEBAQEBAQQBAQEBARUJhVmFeYRmglUMQYExBYdKjw2BCQKMKokck0IfAQGCUxYHgVdxAYUrAQEB X-IronPort-AV: E=Sophos;i="5.20,343,1444687200"; d="asc'?scan'208";a="189081466" Received: from mout.kundenserver.de ([212.227.126.133]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Nov 2015 16:27:53 +0100 Received: from office1.lan.sumadev.de ([94.219.117.134]) by mrelayeu.kundenserver.de (mreue001) with ESMTPSA (Nemesis) id 0LmzUL-1aX5mP1Gl3-00hKBL; Wed, 25 Nov 2015 16:27:52 +0100 Received: from [IPv6:fd54:fbcf:6598:7e::1001] (unknown [IPv6:fd54:fbcf:6598:7e::1001]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id 60358DC05D; Wed, 25 Nov 2015 16:27:51 +0100 (CET) Message-ID: <1448465264.23576.11.camel@e130.lan.sumadev.de> From: Gerd Stolpmann To: Ivan Gotovchits Cc: John Whitington , "caml-list@inria.fr" Date: Wed, 25 Nov 2015 16:27:44 +0100 In-Reply-To: References: <5655AE66.6000307@coherentgraphics.co.uk> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-J80TuUgiZ2fuHSuoAy8t" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 X-Provags-ID: V03:K0:7RmuXL5QIOekbbLS3qCZlDYRsbjnyK7X30CjcDPFR2hmXO5c18j 46rmOXS9pdH6mURLQPGEQ3vUOkXlyegJ4FWJ2RsGYqd5V+IqNbupdSArw5QALFKwXBN2m/O +Jm1I+ezL+bQ4q0+UZMmCwhhgvpz5ttXI7dbq6+DNzSmqAb0E5/WCNMUAVOJGhn9PpCNfeE bZS9z6iB59NM0sHY14iOw== X-UI-Out-Filterresults: notjunk:1;V01:K0:WjFNWgyVTm0=:U53egd8H+sv0MpFdl7wFYP Ve57Sj34l10ZnRa+p3rR57X/ePf3vwCUcLbvlL3mvRiUpj1TGhOgR4dkscs97Js+/8C/E5Joi RLDrCvgWSkYxeaUn6ytu4La4cdPSCV5Qy8fo9FTUQiucxs0T6yOImkIfhIgFoK6F0PZ6ezr5m Wk8ntV5C3uSVbRNIx05H8zAUjqaIUEkoyPGExwcNsiy6nJhrz5AIHAJKoRtgAAOgk7Q79s86Z dLHmkNxB/WiKKLQNg6yhDsYuak/c1tgdITMR04GJH58CQ0I1+BNQ4UXQFlZ7Iz87fHEjZF5CF lGzxc4RolBNsn/8JnY8xv+yf588DarDPnKlgJHw31I2sugw7hyNbAsd8gJ1D1xOzbDJNHzF1Y 7NUUOjOgjh4LJolA/ZQWHFQy7e9aQdQMVFZKyXDzMkY6EUuc9soLMZnGVHxSY3SU6zQicWmAC iq0NaWE2Cv5jIOucQFbqcI61+al+knlXDAO63CgLKiZtZJzqJj2Sij+bQXBaTyBoo64Ck3GSP QIG2t8dek7mmPJYkbDguJ66rPeBHfQthmRC5J5wUWucjaw5gB8pBYSb6Fr2ddKtIJOVkPQIwV GPdw8ql7YQo1kvYrw9n8Xg9YwQO3dfEnq/zj0kHWjCqAT2JfB+GIxjIrZgZoZOi/yy49BD4s8 th5Tk+lW3nwrLTfrEFxhmPiEKEDqQSUHtDJFTU25iD6KNHaoYSbxnFGzuPwoBuahR6K8= Subject: Re: [Caml-list] Do you use a debugger with OCaml? If not, why not? --=-J80TuUgiZ2fuHSuoAy8t Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Am Mittwoch, den 25.11.2015, 08:23 -0500 schrieb Ivan Gotovchits: > The use of a debugger usually indicates that a programmer lost a > control of its own program and has no idea whats going on.=20 > If a programmer doesn't own a program, and tries to understand > existing program, written by someone else, then it means to me,=20 > that the program is written so poorly, that it is too hard to recover > its semantics by reading its source code representation. That's a little bit too hard. Actually, I like one aspect of the debugger, namely that you can easily print deeply nested values. This is also very helpful for exploring a well-written existing program. (And it would even be more helpful if the debugger could look through abstractions.) Actually, I recently used that for writing unit tests for a complex algebraic transformation (developed by myself). Just create some input for the transformation, run it, fire up the debugger, and stop the test at the point where the transformation call returns. Then check whether you like the result by printing it in the debugger, and if so, develop a check that matches against the expected pattern. (You could also do this with the toploop, but using the debugger is easier when you have a closed executable.) That said, I also prefer the printf method for debugging program flow issues. Gerd --=20 ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------ --=-J80TuUgiZ2fuHSuoAy8t Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJWVdNwAAoJEAaM4b9ZLB5TUNQH/3pL2+SYPtGNQTtaE5+dx4vi WIBlVcFcEJEtq4RgLcYYlCN7ETrauqaruLc1kduUqQepHPWT8M+aozZU1RfSUnDn Q3V73e0XNO1yFWJqx5hSUz4Z20DjUTVMdUuq8HAjpRtxDo1V6nL650Afn0fwQRji lEA9wNozAnlh4mq8vtN0Mv54BNsyD17pK5TmkcQkORHlknzR6JDjiDRe577xJwPh 2KP2EgQN7UMdP+7kj/zeQtJhByYetB9ah7fcjuJxL8AAb3ej6IeXHKlrzQXYXftV jtrrsHkoBqzSPGI457aRQEoQkjGilkbyQPeNLlXvKLe89CGDbabwA9liYosFCEc= =7/qy -----END PGP SIGNATURE----- --=-J80TuUgiZ2fuHSuoAy8t--