From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Johan Hidding Newsgroups: gmane.lisp.guile.user Subject: Re: array vs. bytevector Date: Thu, 15 Sep 2011 18:19:46 +0200 Message-ID: References: <87wrd9g7x8.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1316103604 13521 80.91.229.12 (15 Sep 2011 16:20:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 15 Sep 2011 16:20:04 +0000 (UTC) Cc: guile-user@gnu.org To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Sep 15 18:19:56 2011 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R4EfL-0003aN-QM for guile-user@m.gmane.org; Thu, 15 Sep 2011 18:19:55 +0200 Original-Received: from localhost ([::1]:49735 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4EfL-0008UL-AK for guile-user@m.gmane.org; Thu, 15 Sep 2011 12:19:55 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:43574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4EfI-0008UD-48 for guile-user@gnu.org; Thu, 15 Sep 2011 12:19:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4EfE-0006qe-8j for guile-user@gnu.org; Thu, 15 Sep 2011 12:19:52 -0400 Original-Received: from mail-gw0-f48.google.com ([74.125.83.48]:60378) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4EfE-0006qY-56; Thu, 15 Sep 2011 12:19:48 -0400 Original-Received: by gwj22 with SMTP id 22so2922127gwj.35 for ; Thu, 15 Sep 2011 09:19:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=r3osPEtF+x/VZd4rw/iv5MSy6EZdlvx+UsbZBT+aIGU=; b=YhBGCgQq/K1oGlbLBpuRlJ4PzX/B/lTAaXs2/CUHVeIgvsFElsmfX+3crDzdtwTUUS lyibeXNOo811H/nP1qc95lHpHK62m6j7a7CQ0CM6Kgijz09lGC47vD3khQLZBlN7y5uz Ckz2m+2T+XsOq6E3MoQ0LxRo7HY/0ehQkh9OE= Original-Received: by 10.68.17.9 with SMTP id k9mr2374316pbd.278.1316103587120; Thu, 15 Sep 2011 09:19:47 -0700 (PDT) Original-Received: by 10.68.56.65 with HTTP; Thu, 15 Sep 2011 09:19:46 -0700 (PDT) In-Reply-To: <87wrd9g7x8.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.83.48 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8791 Archived-At: Hi, I think I found the answer in that I should use (array-contents ...) as suc= h: (import (rnrs io ports)) (put-bytevector (%make-void-port "w") (array-contents #2f64((1 2) (3 4)))) Cheers, Johan 2011/9/15 Ludovic Court=C3=A8s : > Hi, > > Johan Hidding skribis: > >> It would be simplest if (put-bytevector ...) would >> accept an array as argument, but this gives a type-error > > It actually works with SRFI-4 vectors (info "(guile) SRFI-4 and > Bytevectors"): > > =C2=A0scheme@(guile-user)> (use-modules(rnrs io ports)) > =C2=A0scheme@(guile-user)> (put-bytevector (%make-void-port "w") #u8(1 2 = 3)) > > Does it help? > > Ludo=E2=80=99. > > >