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 PAA28176; Thu, 9 Sep 2004 15:44:44 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA28056 for ; Thu, 9 Sep 2004 15:44:43 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i89Diglp003515 for ; Thu, 9 Sep 2004 15:44:43 +0200 Received: from bourg.inria.fr (bourg.inria.fr [128.93.11.100]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA25876 for ; Thu, 9 Sep 2004 15:44:42 +0200 (MET DST) Received: from basile by bourg.inria.fr with local (Exim 4.34) id 1C5PDg-0007Eq-IL for caml-list@inria.fr; Thu, 09 Sep 2004 15:44:12 +0200 Date: Thu, 9 Sep 2004 15:44:12 +0200 To: caml-list@inria.fr Subject: Re: [Caml-list] date - waiting for 64-bit Message-ID: <20040909134412.GA27789@bourg.inria.fr> References: <20040909122103.GA27255@bourg.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040803i From: "Basile Starynkevitch [local]" X-Miltered: at nez-perce with ID 41405E4A.003 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 basile:01 basile:01 2004:99 samuel:01 nativeint:01 ocaml's:01 cristal:01 cristal:01 -bit:01 ocaml:01 ocaml:01 camllight:01 imho:01 int:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, Sep 09, 2004 at 03:20:38PM +0200, Samuel Lelievre wrote: > Basile Starynkevitch wrote: > >I suggest to switch to Ocaml (even on a 32 bits machine) ... > > Do you mean that the integers of type int are not mod 2^31 in Ocaml? You have four integer types in Ocaml: int (on 31 bits), Int32.t (on 32 bits) and Int64.t (on 64 bits) and NativeInt.t (32 bits on 32 bits machine, 64 bits on 64 bits machines). The details and tradeoffs are documented. But the current date & time, as returned by Unix.time, is a *floating point* number, and Unix.gmtime take a floating point number as an arguments (so there won't be any Y2K or 2038 problem because of Ocaml's fault in the foreseeable future, long after we are all back to dust - not even bare bones). Floating point are enough for time representation on both 32 and 64 bits machine. > That's certainly an argument to make me make my mind to switch, > which I was postponing forever, having failed to translate my > simple programs to Ocaml (I have to confess I did not try hard). I am suggesting to try harder. Using Ocaml is IMHO much better than using CamlLight. OReilly has a very good french book on Ocaml programming. -- Basile STARYNKEVITCH -- basile dot starynkevitch at inria dot fr Project cristal.inria.fr - temporarily. http://cristal.inria.fr/~starynke --- all opinions are only mine ------------------- 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