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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id C4DC07F0F9 for ; Wed, 25 Nov 2015 15:05:36 +0100 (CET) IronPort-PHdr: 9a23:P8seTR3iTx+TLEs2smDT+DRfVm0co7zxezQtwd8ZsegTLvad9pjvdHbS+e9qxAeQG96LtrQb26GL4+jJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd6PyZvnnL3is7ToICx2xxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP5Xz247bXianhL7+9vitMU7q3cY6Lod8JtLWKD+OqA5VqBwDTI8Mmlz6te4mwPESF6p538HGk8bmRlFGUCR6hD+RdH7vyD5u/BV0iidJND/S6xyRDKjqqdmSRPljC0KLTF//GyB2Z84t75SvB/0/083+IXTeozAbPc= Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=nils.becker@bioquant.uni-heidelberg.de; spf=Pass smtp.mailfrom=gclci-caml-list@m.gmane.org; spf=Pass smtp.helo=postmaster@plane.gmane.org Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of nils.becker@bioquant.uni-heidelberg.de) identity=pra; client-ip=80.91.229.3; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gclci-caml-list@m.gmane.org"; x-sender="nils.becker@bioquant.uni-heidelberg.de"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of gclci-caml-list@m.gmane.org designates 80.91.229.3 as permitted sender) identity=mailfrom; client-ip=80.91.229.3; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gclci-caml-list@m.gmane.org"; x-sender="gclci-caml-list@m.gmane.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of postmaster@plane.gmane.org designates 80.91.229.3 as permitted sender) identity=helo; client-ip=80.91.229.3; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gclci-caml-list@m.gmane.org"; x-sender="postmaster@plane.gmane.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AVAwAyv1VWgQPlW1BehDjITDwQAQEBAQEBAQEQAQEWMy6CLYIIAQQBfgsLRhAtGhMIAQGIIggEAb4thlSEfoQpfoQSBZZXllGTQjiBdQELOx2BV4YdAQEB X-IPAS-Result: A0AVAwAyv1VWgQPlW1BehDjITDwQAQEBAQEBAQEQAQEWMy6CLYIIAQQBfgsLRhAtGhMIAQGIIggEAb4thlSEfoQpfoQSBZZXllGTQjiBdQELOx2BV4YdAQEB X-IronPort-AV: E=Sophos;i="5.20,342,1444687200"; d="scan'208";a="155094111" Received: from plane.gmane.org ([80.91.229.3]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 25 Nov 2015 15:05:35 +0100 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1a1ahH-0001XJ-6m for caml-list@inria.fr; Wed, 25 Nov 2015 15:05:23 +0100 Received: from bqdyn253_067.bioquant.uni-heidelberg.de ([129.206.253.147]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Nov 2015 15:05:23 +0100 Received: from nils.becker by bqdyn253_067.bioquant.uni-heidelberg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Nov 2015 15:05:23 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Nils Becker Date: Wed, 25 Nov 2015 15:05:28 +0100 Message-ID: References: <5655AE66.6000307@coherentgraphics.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: bqdyn253_067.bioquant.uni-heidelberg.de X-Enigmail-Draft-Status: N1110 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: <5655AE66.6000307@coherentgraphics.co.uk> X-Validation-by: nils.becker@bioquant.uni-heidelberg.de Subject: Re: [Caml-list] Do you use a debugger with OCaml? If not, why not? hi, > The use of a debugger usually indicates that a programmer lost a > control of its own program and has no idea whats going on. this is one reason, but it is also completely valid to debug algorithms i.e. find bugs in the logic of an algorithm, not the implementation. these are not caught by the type system. in simulation code for example, mutable state is often the most natural representation, and it is sometimes necessary to follow a mutable value through the algorithm to verify. > debugging process differ when writing OCaml compared with other > languages you use? when comparing with python, i often use the python debugger as integral part of checking the correctness of the algorithm, and i have full access to all values, and even evaluation of code, which makes that easy. i feel in control. that said, often i need to use it to find nasty bugs due to type-unsafety. in ocamldebug, i find it great that i can back-step. however, the need to work so much to install printers for my types is a severe drawback; what's worse is that it seems to be even impossible to install printers for types defined inside functor bodies. so, i sometimes hit a brick wall with ocamldebug, which is frustrating, and i feel like i'm fighting the system rather than using a productive tool. for me, some way to auto-print some crude representation of _all_ types in the debugger would help a lot. n.