From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Catonano Newsgroups: gmane.lisp.guile.user Subject: Re: a foreign struct: a shameless request Date: Sun, 18 Jun 2017 08:22:15 +0200 Message-ID: References: <87wp8bsqmn.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 1497766963 4426 195.159.176.226 (18 Jun 2017 06:22:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 18 Jun 2017 06:22:43 +0000 (UTC) Cc: guile-user@gnu.org To: =?UTF-8?B?VGF5bGFuIFVscmljaCBCYXnEsXJsxLEvS2FtbWVy?= Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Jun 18 08:22:39 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 1dMTba-0000qs-M0 for guile-user@m.gmane.org; Sun, 18 Jun 2017 08:22:38 +0200 Original-Received: from localhost ([::1]:37267 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMTbf-00022v-SB for guile-user@m.gmane.org; Sun, 18 Jun 2017 02:22:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMTbG-00022e-MP for guile-user@gnu.org; Sun, 18 Jun 2017 02:22:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMTbF-0003tm-HN for guile-user@gnu.org; Sun, 18 Jun 2017 02:22:18 -0400 Original-Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]:37134) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dMTbF-0003sq-94 for guile-user@gnu.org; Sun, 18 Jun 2017 02:22:17 -0400 Original-Received: by mail-wm0-x22f.google.com with SMTP id d73so50383264wma.0 for ; Sat, 17 Jun 2017 23:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=rRxjikPJVr6gY9/lokgsdgZ/Np3vdiSFoajMmyp9t8A=; b=G/UHOVWWk+Sc8mdxRf+CW41szDmUEwe45EPcfYtrIH5c7nor9bIIN718chglsyNofk p6lve1tCffwBy48Sgdl0sAUbORgDnDbTmLKYkf/9rtrPNXmYSdIiNlXMuJngXRE6WZQh 7a9ZEqC9ygXdz0C8mMBq4Sd7sIWiFtUnUocfxwu+yWZmunkzpW68l84mOmr1UIMNw/2E aOPQKx8MrQaDT7pAAhUhI4fdBcQ+y6N1JyuJM+rHp+5/yo2hvEtGfz1W0ndyCmkvGdf2 ixmgvKSSrQKwJPvWpHn6n9SrfTdMq3LXQMbCgFSH8zTsxb8ytazHd7BRpmX7H8kWLCPM Vzog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=rRxjikPJVr6gY9/lokgsdgZ/Np3vdiSFoajMmyp9t8A=; b=CnNGII8Jc/VvjCjOz4yLLgXcd8oVAioHG7VkLQxZhmd5vfVxnpA7fH7iIIm8Y6ewPU jxRM2jX74vUjod7sqa3Q5gy9lOUuS2u5s2v1CVE8JatyRLoa+4jIHNrW3gM539IzKkJr PUmFhbt6NswsBVkw7S8bma3kUhoPus231uiRp+rgtCzTxMImM00RcetCyG9aHgVUuoLG WAgZO0RAq/VwJe087/GEoHBOaMGrWiwMH/1xV+0Nc365dUpTIsHULrjHlBR+TnCBpAr+ /d6uHyXn8H1+WcDJZ9E6mwty9KwAM1hu8/jJBtCsIsVsuvDcJaUygrRTIG+EttS2kceo cPNA== X-Gm-Message-State: AKS2vOz9YtwLPvMkeZ8TcQP6WSBvo+KoV3FpfVocoF+cZn+ew6s+AO5c RglBk4JWm8DMgG/8X2/ZtKTAiXQkL0Ta X-Received: by 10.80.149.132 with SMTP id w4mr12644034eda.82.1497766935921; Sat, 17 Jun 2017 23:22:15 -0700 (PDT) Original-Received: by 10.80.131.4 with HTTP; Sat, 17 Jun 2017 23:22:15 -0700 (PDT) In-Reply-To: <87wp8bsqmn.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22f X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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:13843 Archived-At: Taylan, 2017-06-16 21:02 GMT+02:00 Taylan Ulrich Bay=C4=B1rl=C4=B1/Kammer < taylanbayirli@gmail.com>: > > > If you decide to use bytestructures, feel free to e-mail me privately or > use the GitHub issues system for questions. I don't actively monitor > the Guile ML these days so I may miss your questions and feedback here. > > [0] https://github.com/TaylanUB/scheme-bytestructures/ > > Than you for your offer ! I am impressed that Bytestructures works on so many different scheme implementations I am a bit concerned that it as no proper packaging so it'd be hard to port it in Guix. That's an issue for me I took a look at the code, though I think I understand now The size of the union'ed field has to be the maximum of the sizes of the types of the things the field could be populated with That's all I need, I think, to use make-c-struct Then I can pass the thing to Ffreexl functions and they will populate it Then, depending on the contents of the type field, I can parse the thing accordingly, to get back scheme things This is the master plan I can't do it today, though. I'll be busy I'll get back to you, with this Thanks for showing me scheme-bytestructures !