From: Johan Hidding <johannes.hidding@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guile-user@gnu.org
Subject: Re: array vs. bytevector
Date: Thu, 15 Sep 2011 18:19:46 +0200 [thread overview]
Message-ID: <CAEz5FLYDdW+KXOVaZL1zNU8cYbhbJ5QXvmdu=8jyepJA0VYs2Q@mail.gmail.com> (raw)
In-Reply-To: <87wrd9g7x8.fsf@gnu.org>
Hi,
I think I found the answer in that I should use (array-contents ...) as such:
(import (rnrs io ports))
(put-bytevector (%make-void-port "w") (array-contents #2f64((1 2) (3 4))))
Cheers, Johan
2011/9/15 Ludovic Courtès <ludo@gnu.org>:
> Hi,
>
> Johan Hidding <johannes.hidding@gmail.com> 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"):
>
> scheme@(guile-user)> (use-modules(rnrs io ports))
> scheme@(guile-user)> (put-bytevector (%make-void-port "w") #u8(1 2 3))
>
> Does it help?
>
> Ludo’.
>
>
>
prev parent reply other threads:[~2011-09-15 16:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-15 14:45 array vs. bytevector Johan Hidding
2011-09-15 15:08 ` Ludovic Courtès
2011-09-15 16:19 ` Johan Hidding [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEz5FLYDdW+KXOVaZL1zNU8cYbhbJ5QXvmdu=8jyepJA0VYs2Q@mail.gmail.com' \
--to=johannes.hidding@gmail.com \
--cc=guile-user@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).