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 5BC7A7EE99 for ; Sun, 5 Jan 2014 10:49:59 +0100 (CET) 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.17.9; 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.17.9; 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: Pass (mail2-smtp-roc.national.inria.fr: domain of postmaster@moutng.kundenserver.de designates 212.227.17.9 as permitted sender) identity=helo; client-ip=212.227.17.9; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="postmaster@moutng.kundenserver.de"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkwBAA4qyVLU4xEJm2dsb2JhbABYg0O6AIEMFg4BAQEBAQYLCwkUKIImAQEEVSQQC0ZXBhMJh38Jw1kXiUWFJCYHgi+CCASPBopBhRAFhAaKeA X-IPAS-Result: AkwBAA4qyVLU4xEJm2dsb2JhbABYg0O6AIEMFg4BAQEBAQYLCwkUKIImAQEEVSQQC0ZXBhMJh38Jw1kXiUWFJCYHgi+CCASPBopBhRAFhAaKeA X-IronPort-AV: E=Sophos;i="4.95,606,1384297200"; d="asc'?scan'208";a="51756781" Received: from moutng.kundenserver.de ([212.227.17.9]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 05 Jan 2014 10:49:58 +0100 Received: from office1.lan.sumadev.de (dslb-188-107-199-141.pools.arcor-ip.net [188.107.199.141]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MRhYD-1VoUzn1yZ7-00T985; Sun, 05 Jan 2014 10:49:58 +0100 Received: from [192.168.0.192] (546BEFE6.cm-12-4d.dynamic.ziggo.nl [84.107.239.230]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id 039A4C00D3; Sun, 5 Jan 2014 10:49:57 +0100 (CET) Message-ID: <1388915392.2999.26.camel@e130> From: Gerd Stolpmann To: Martin DeMello Cc: OCaml List Date: Sun, 05 Jan 2014 10:49:52 +0100 In-Reply-To: References: Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-uBzsQcSeYhLLhdy+2Paz" X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 X-Provags-ID: V02:K0:WW2xZ89D15iU9h8Mh4LBIeHm7wHzH6aAchYBEHlQkil imui8RC/LQqaQ/H8PpLOwub+VdXs62CxHbZu29MEGrSucxKOjC cX+qVImW+ZYIWAQpXvsB55LGOB94JmcsYb2WiwSv2LwWn0vElb awoNmbVbY0EvcGr2zE1lfVdA4E6c2rNYORL7NrzVa245QDVgDq RxBsPawLCy3aPpt7XjFrRLNSJuImy1KVquiQMaYlwi2uREezI7 QgNEe1jwrzzQRYV3m8gKnSfqFkeUaHFNmr8Hbb/H8/xChKIR2G 87fBDmoz/OLC74jYHIaVgO/O9gWsYB3s5u9wn0wmCjNM3ykjUg 93/aTbaFjLNe8OHneKNRK5Cbej5MFn9/tKRdkP1Oq Subject: Re: [Caml-list] wrapping a string in an in_channel --=-uBzsQcSeYhLLhdy+2Paz Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Am Sonntag, den 05.01.2014, 00:23 -0800 schrieb Martin DeMello: > Does OCaml have any equivalent to ruby's StringIO, to wrap an > in_channel around a string and then treat it as if it were a file? With the standard library this is not possible. When I need such a feature, I normally use OCamlnet's channel objects: http://projects.camlcity.org/projects/dl/ocamlnet-3.7.3/doc/html-main/Netch= annels_tut.html http://projects.camlcity.org/projects/dl/ocamlnet-3.7.3/doc/html-main/Netch= annels.html http://www.ocaml-programming.de/rec/IO-Classes.html 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 ------------------------------------------------------------ --=-uBzsQcSeYhLLhdy+2Paz 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.4.11 (GNU/Linux) iQEcBAABAgAGBQJSySrAAAoJEAaM4b9ZLB5T5TUIAIhkCT3OEDo83jAY3bSwsVGm ax56T9KQsdRs87KMoYf6QhRJz5I+Naa4qryH2yrh3gUInZFzPqVkRBdDwt4nf3Y/ 5gQUrLYsPCDrLNTolZ6VCqMZ0hq1akArULX6seHJ/IxglF1QUnVc94sHYOqZbX0S +qJRc7MTchWyKq8udIkAPv24hUTY4Y8dmEqhpDR8f2qcsXua2I9/DngCVVWLBB2Q 3d7XhhHNoqwExUMT34vOUMDgn6ct/ItobIqrpi1+0ynsfWU0v+jZNGcSpcmtvEkv Zp6b4dSIIxTc/BHTFw7uGwz6Z/1UMF3ar/3S3TgYkU7E5Z3LRDHqnnWwx8+qOBA= =PnAf -----END PGP SIGNATURE----- --=-uBzsQcSeYhLLhdy+2Paz--