From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Marko Rauhamaa Newsgroups: gmane.lisp.guile.user Subject: Re: Guile bugs Date: Thu, 20 Jul 2017 21:35:09 +0300 Message-ID: <87pocvc5ya.fsf@elektro.pacujo.net> References: <87lgtajpkc.fsf@web.de> <87h8y7ruuz.fsf_-_@gnu.org> <877ez384eu.fsf@elektro.pacujo.net> <87k2333qx9.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1500575743 14046 195.159.176.226 (20 Jul 2017 18:35:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 20 Jul 2017 18:35:43 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , guile-user@gnu.org To: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?=22Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer=22?=) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Jul 20 20:35:37 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYGIT-0003L2-Cu for guile-user@m.gmane.org; Thu, 20 Jul 2017 20:35:37 +0200 Original-Received: from localhost ([::1]:39463 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYGIY-0006A6-NR for guile-user@m.gmane.org; Thu, 20 Jul 2017 14:35:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYGI5-000691-FF for guile-user@gnu.org; Thu, 20 Jul 2017 14:35:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYGI4-0006wT-Hu for guile-user@gnu.org; Thu, 20 Jul 2017 14:35:13 -0400 Original-Received: from [2001:1bc8:1a0:5384:7a2b:cbff:fe9f:e508] (port=42360 helo=pacujo.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYGI4-0006tE-9n; Thu, 20 Jul 2017 14:35:12 -0400 Original-Received: from elektro.pacujo.net (192.168.1.200) by elektro.pacujo.net; Thu, 20 Jul 2017 21:35:09 +0300 Original-Received: by elektro.pacujo.net (sSMTP sendmail emulation); Thu, 20 Jul 2017 21:35:09 +0300 In-Reply-To: <87k2333qx9.fsf@gmail.com> ("Taylan Ulrich =?utf-8?Q?=5C=22Ba?= =?utf-8?Q?y=C4=B1rl=C4=B1=2FKammer=5C=22=22's?= message of "Thu, 20 Jul 2017 20:26:58 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:1bc8:1a0:5384:7a2b:cbff:fe9f:e508 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.lisp.guile.user:13954 Archived-At: taylanbayirli@gmail.com (Taylan Ulrich "Bay=C4=B1rl=C4=B1/Kammer"): > Marko Rauhamaa writes: > >> ludo@gnu.org (Ludovic Court=C3=A8s): >> >>> I=E2=80=99m very skeptical about this use case (I=E2=80=99d use =E2=80= =98mmap=E2=80=99 and get a >>> bytevector.) >> >> Please elaborate. >> >> 1. Does Guile offer mmap to Scheme code? > > It's pretty easy to call C functions from Scheme. Not good enough. I would have to precompile libraries for different target platforms (or require the target environment to have a C compiler). Besides, the need is quite generic and shouldn't require an extension. >> 2. What would prevent Guile's GC from scanning the mmapped area for >> pointers? > > I don't know the details but AFAIK this is no problem with Boehm GC. I don't understand. It can be quite time-consuming to scan gigabytes of RAM for pointers. >> 3. How do I efficiently encode information in a bytevector in Scheme >> code? > > What sort of data? > > I have a library called bytestructures that imitates the C type system > within Scheme, to be used on bytevectors that contain data structures > generated by C code, though the library is built upon a generic core > with which other structures can be declared as well. Not sure if this > helps you: > > https://github.com/TaylanUB/scheme-bytestructures/ That's precisely it. It would be nice to have it as part of standard Guile. I wonder, though, if doing that is fast enough in Scheme code. Marko