unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: M <maximedevos@telenet.be>
To: "Dr. Arne Babenhauserheide" <arne_bab@web.de>,
	 "guile-devel@gnu.org" <guile-devel@gnu.org>
Subject: RE: Minimal example of extending Guile with Rust?
Date: Mon, 29 Jan 2024 16:49:27 +0100	[thread overview]
Message-ID: <20240129164928.gfpN2B00Q2sdiUi01fpTMS@xavier.telenet-ops.be> (raw)
In-Reply-To: <878r48jhwt.fsf@web.de>

[-- Attachment #1: Type: text/plain, Size: 662 bytes --]

> (similar to the
>native C arrays numpy exposes to C that allow getting the >speed of C).

For this in particular, there is pointer->bytevector, bytevector->pointer and bytevector-TYPE-ref, bytevector-TYPE-set! (it’s not limited to only bytes, also floats are available IIRC).

Don’t do bytevector->pointer + pointer->bytevector + … in long sequences though, or else this loop will use memory proportional to the length to this sequence. (This is intentionally undocumented (*).)

Best regards,
Maxime Devos

(*) For its application bytevector-slice, see https://lists.gnu.org/archive/html/guile-devel/2023-01/msg00042.html, which was ignored.

[-- Attachment #2: Type: text/html, Size: 2136 bytes --]

  parent reply	other threads:[~2024-01-29 15:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29 15:04 Minimal example of extending Guile with Rust? Dr. Arne Babenhauserheide
2024-01-29 15:33 ` Olivier Dion
2024-01-29 15:49 ` M [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-01-29 15:31 Jean Abou Samra

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=20240129164928.gfpN2B00Q2sdiUi01fpTMS@xavier.telenet-ops.be \
    --to=maximedevos@telenet.be \
    --cc=arne_bab@web.de \
    --cc=guile-devel@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).