From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: Attempt to create an inline assembler for Guile Date: Thu, 16 Jul 2015 21:17:47 +0200 Message-ID: <878uafdi90.fsf@gnu.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1437074289 22248 80.91.229.3 (16 Jul 2015 19:18:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Jul 2015 19:18:09 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jul 16 21:18:03 2015 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZFofT-0001CQ-1T for guile-devel@m.gmane.org; Thu, 16 Jul 2015 21:18:03 +0200 Original-Received: from localhost ([::1]:41601 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFofS-0000ap-5B for guile-devel@m.gmane.org; Thu, 16 Jul 2015 15:18:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFofP-0000aj-CQ for guile-devel@gnu.org; Thu, 16 Jul 2015 15:18:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFofM-0005dp-Mo for guile-devel@gnu.org; Thu, 16 Jul 2015 15:17:59 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:48340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFofM-0005dd-GD for guile-devel@gnu.org; Thu, 16 Jul 2015 15:17:56 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZFofI-00018X-3H for guile-devel@gnu.org; Thu, 16 Jul 2015 21:17:53 +0200 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Jul 2015 21:17:52 +0200 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Jul 2015 21:17:52 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 18 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 28 Messidor an 223 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x3D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:S9lzxo9HxcsDr48IkN9QzvVO8VI= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17768 Archived-At: Sjoerd van Leent skribis: > I put my repository here: > > https://github.com/santidhammo/guile-assembler Regarding executable pages, I think you can avoid C altogether by using ‘mmap’ from libc via the FFI: (define mmap (let* ((ptr (dynamic-func "mmap" (dynamic-link))) (proc (pointer->procedure '* ptr (list ...)))) (lambda (x y z) (pointer->bytevector (proc x y z) ...)))) Besides, that looks like a nice project! Ludo’.