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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 6873F7ED45 for ; Mon, 25 Jun 2012 01:52:40 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AikCAFqn509KfVK2kGdsb2JhbABDpSqHbQGIXQgiAQEBAQkJDQcUBCOCGAEBAQMBEgIsARsSCwEDAQsGBQQHAwoNISEBAREBBQEKEgYTEhCHWgEDBgULmioJA4wjgnGEBAoZJwMKV4hxAQUMikRjhgIDiEiMZoESiBSBXIMiPoQd X-IronPort-AV: E=Sophos;i="4.77,468,1336341600"; d="scan'208";a="148605099" Received: from mail-we0-f182.google.com ([74.125.82.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 25 Jun 2012 01:52:39 +0200 Received: by werg1 with SMTP id g1so3746041wer.27 for ; Sun, 24 Jun 2012 16:52:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=UDHOUOCKqnS0u/d/9TC+s6/THPCIJ2L2fDPUO7Xy+sY=; b=iQgBXwVASBdZolZ4Q5iScFA8o04h9Gfunm84pa095TPwYHFxR3Vru7EC5qqROLAvs0 RDcpQ8Va5cWwT5cxXWgQAwu01Qc55TlP7u8TpjeINRc4RECGnmJkxGd24gDCHAFTH51t 6sx9+beku7XktQ3FFM54tfcmtZFttsLhmWdbNFe4niP7XPu5EBg6GCB2lfE81sUNv9qZ c2cSwKeqz8uZ7rnj8lHN+wLhIFddk9HlMvQzu47Hd/Hrzz+VRB7aHc7SuOkyMPSNQQzF 4Mt78KGiWN6SAp8I0BuerSv4z296/XT/8wlyiL5U8D0Tdu5+xQgSVPndwB22TkkW0u+U 8U6A== MIME-Version: 1.0 Received: by 10.180.81.65 with SMTP id y1mr20244442wix.1.1340581959551; Sun, 24 Jun 2012 16:52:39 -0700 (PDT) Received: by 10.223.74.14 with HTTP; Sun, 24 Jun 2012 16:52:39 -0700 (PDT) In-Reply-To: References: <20120624211840.124466j26yxz6rkg@webmail.in-berlin.de> <20120624.220220.2022399462583597382.Christophe.Troestler@umons.ac.be> Date: Sun, 24 Jun 2012 17:52:39 -0600 Message-ID: From: Anthony Tavener To: Lukasz Stafiniak Cc: Diego Olivier Fernandez Pons , OCaml Mailing List Content-Type: multipart/alternative; boundary=f46d044288247dcba204c3408fb3 Subject: Re: [Caml-list] print_int is too slow --f46d044288247dcba204c3408fb3 Content-Type: text/plain; charset=ISO-8859-1 Yeah, this seems surprising. In C I'd often have fflush(stdout); In OCaml I make use of the %! printf feature. Normally I want output to be buffered, for efficiency, but I know points where I want to ensure a "sync" so that I'm not looking at incomplete output. Mind you, I mostly use stdout/stderr for logging/printf traces... On Sun, Jun 24, 2012 at 5:06 PM, Lukasz Stafiniak wrote: > On Mon, Jun 25, 2012 at 12:19 AM, Diego Olivier Fernandez Pons > wrote: > > > > During all the years I have been coding, I had never had to worry > > about flushing I/O (when / why / how) in any language (C/C++, Java, C# > > and OCaml). > > I actually had even forgotten those things existed... > > You haven't needed to flush output when debugging? > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > > --f46d044288247dcba204c3408fb3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Yeah, this seems surprising. In C I'd often have fflush(stdout); In OCa= ml I make use of the %! printf feature. Normally I want output to be buffer= ed, for efficiency, but I know points where I want to ensure a "sync&q= uot; so that I'm not looking at incomplete output. Mind you, I mostly u= se stdout/stderr for logging/printf traces...

On Sun, Jun 24, 2012 at 5:06 PM, Lukasz Staf= iniak <lukstafi@gmail.com> wrote:
On Mon, Jun 25, 2012 at 12:19 AM, Diego Olivier Fernandez= Pons
<dofp.ocaml@gmail.com> wr= ote:
>
> During all the years I have been coding, I had never had to worry
> about flushing I/O (when / why / how) in any language (C/C++, Java, C#=
> and OCaml).
> I actually had even forgotten those things existed...

You haven't needed to flush output when debugging?

--
Caml-list mailing list. =A0Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


--f46d044288247dcba204c3408fb3--