From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id E3A9FBC68 for ; Tue, 17 Oct 2006 16:32:42 +0200 (CEST) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id k9HEWg6V011331 for ; Tue, 17 Oct 2006 16:32:42 +0200 Received: from [84.58.139.235] (helo=gate.lan.gerd-stolpmann.de) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis), id 0ML25U-1GZpzW3DQS-0007i3; Tue, 17 Oct 2006 16:32:39 +0200 Received: from flakew.lan.gerd-stolpmann.de (fw.lan.gerd-stolpmann.de [192.168.1.1]) by gate.lan.gerd-stolpmann.de (Postfix) with ESMTP id 62D14C35C; Tue, 17 Oct 2006 16:32:17 +0200 (CEST) Subject: Re: [Caml-list] Re: Reading 16 bit floats from stream? From: Gerd Stolpmann To: Maurizio Colucci Cc: caml-list@yquem.inria.fr In-Reply-To: References: <20061017.082528.59485463.garrigue@math.nagoya-u.ac.jp> Content-Type: text/plain Date: Tue, 17 Oct 2006 16:32:16 +0200 Message-Id: <1161095536.18038.35.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de login:a6865a839c0178d9aa0ce41878507ea2 X-Miltered: at discorde with ID 4534E98A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; gerd:01 stolpmann:01 o'caml:01 high-level:01 programmer's:01 3.08:01 o'caml:01 gerd:01 stolpmann:01 viktoriastr:01 64293:01 darmstadt:01 6151:01 6151:01 dienstag:98 Am Dienstag, den 17.10.2006, 16:02 +0200 schrieb Maurizio Colucci: > BTW, I am a bit surprised the standard library does not offer a way to > do that. A simple task can become frustrating. I must say that I do not see the point. Although O'Caml is for high-level tasks it is unavoidable that you must sometimes look at the details and understand what's going on under the hood. This is more a matter of the programmer's general knowledge, and not about how good or bad a certain library is (which includes what _other_ people consider as important). Just to scare you. Before release 3.08 there was no Int32.float_of_bits in O'Caml, and one had to program such a function with bit shifting primitives. See how ugly this is (look for the now commented-out function fp8_of_fp4): https://gps.dynxs.de/svn/lib-ocamlnet2/trunk/code/src/rpc/rtypes.ml Gerd -- ------------------------------------------------------------ Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de Phone: +49-6151-153855 Fax: +49-6151-997714 ------------------------------------------------------------