From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer?=) Newsgroups: gmane.lisp.guile.user Subject: Re: Bytestructures: a "type system" for bytevectors Date: Tue, 21 Jun 2016 00:05:43 +0200 Message-ID: <87k2hjseh4.fsf@T420.taylan> References: <87r3mkg2iy.fsf@T420.taylan> <87y460gfhd.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1466460464 12496 80.91.229.3 (20 Jun 2016 22:07:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2016 22:07:44 +0000 (UTC) Cc: guile-user@gnu.org To: Andy Wingo Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Jun 21 00:07:39 2016 Return-path: Envelope-to: guile-user@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 1bF7M1-000628-2L for guile-user@m.gmane.org; Tue, 21 Jun 2016 00:07:37 +0200 Original-Received: from localhost ([::1]:46797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF7M0-0002bW-Cw for guile-user@m.gmane.org; Mon, 20 Jun 2016 18:07:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF7KF-0001ug-MW for guile-user@gnu.org; Mon, 20 Jun 2016 18:05:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bF7KE-0008Nu-Bo for guile-user@gnu.org; Mon, 20 Jun 2016 18:05:47 -0400 Original-Received: from mail-lb0-x22c.google.com ([2a00:1450:4010:c04::22c]:34598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF7KE-0008Nm-3e for guile-user@gnu.org; Mon, 20 Jun 2016 18:05:46 -0400 Original-Received: by mail-lb0-x22c.google.com with SMTP id oe3so1969657lbb.1 for ; Mon, 20 Jun 2016 15:05:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=L3cjACJ9i8iOVrWrNUcdzLvcgbfrQ+I9zpYPfS1DAlc=; b=gGr1FaluPz81N3BLcIh+qamEx01jowhF1LsVwdGdKFLKHLWvQbtYFzJ+h2u0LXw7rD HSliACCD6U2RtfrdZMV+oea+tPvDgfJeuT6QWJiUKjQ34DEgHHMTKl58WLmqtD4xzc0K TbW7NWndJjv0o38RfukzojsufG68+aRbIMPBE0KftIZxcdPSU9AlMBWNKxgAuKBbuoIc FwvXjpAxmVUvJc3pHopjbgAKp0x8Ag25ISNJ6hwP+0LiCYb3v1jgVmBxtao9zAwg7y3V QONd/xMgqR0HjNx+wHln1grtFMKuPv5eMhvcp6NNhN9RkjXCdZXnqKrk8y3xVndl0sMp jR9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=L3cjACJ9i8iOVrWrNUcdzLvcgbfrQ+I9zpYPfS1DAlc=; b=UY8TWQg+NOYBAYHx3z0DgLCoOuiqY2mb5t9lo9EmKDkCMNO8O2nt+P9fVWzqhKVgju E1YTxVfingcbfogprleRvOiefwtb9If/GR6e7se8BIk0liVulFUn+kxXK61Lk4emGcVS ZEOLbWwhG+qUIpWFTkXAdf4zzbDz4+yMe2e8F3ogKR7KzlnPMc+eXBZMctRriCl5AlZH 1hOc0LABX9HOmUGkocBixcjN0EScBgxER7BXQDJ7WS5vfA8R/Xz+uj8ydN63aXdO3/Gd qgdrUrzjVWRRFdMuGfr7nRlZC30zBdphjh2IZktPNIziComl/tY6wVX+e87lT4tW+gTV f9gA== X-Gm-Message-State: ALyK8tIH8GSo2A/VA+NptVM0q5L/XWFu68I58Upbxd2F5Btd+AO7JfKNNmt4vX4vRecwkg== X-Received: by 10.194.108.4 with SMTP id hg4mr10531842wjb.140.1466460345191; Mon, 20 Jun 2016 15:05:45 -0700 (PDT) Original-Received: from T420.taylan ([2a02:908:c30:3540:221:ccff:fe66:68f0]) by smtp.gmail.com with ESMTPSA id p6sm8075339wme.22.2016.06.20.15.05.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jun 2016 15:05:43 -0700 (PDT) In-Reply-To: <87y460gfhd.fsf@pobox.com> (Andy Wingo's message of "Mon, 20 Jun 2016 15:24:46 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c04::22c 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:12669 Archived-At: Andy Wingo writes: > On Sun 30 Aug 2015 18:32, taylanbayirli@gmail.com (Taylan Ulrich "Bay=C4= =B1rl=C4=B1/Kammer") writes: > >> https://github.com/taylanub/scheme-bytestructures >> >> (I don't endorse GitHub, but I gave in after Gitorious went down.) >> >> I had started working on this project around two years ago but it had a >> pretty strange and complex API, an unreadable README, high overhead for >> something you might want to use in high-performance settings (byte >> crunching), and a bit too hung up on being standards compliant. >> >> I resumed working on it around a week ago, and solved all these issues! >> >> (I still do my best to keep R7RS compliance, but Guile is my prime >> *real* target.) >> >> So what is it? >> >> =3D=3D=3D Structured access to bytevector contents =3D=3D=3D > > I really want something like this BTW :) I was thinking that we can do > this on a proper low level, applying type tags to bytevectors. I want > something like http://luajit.org/ext_ffi.html for Guile, and data access > is part of it. > > Andy Hi Andy :-) Have you also seen the thread titled "Bytestructures, FFI"? (Maybe I should have dug up this thread and replied to it instead of creating that one.) In light of that new feature that lets one easily wrap C functions from Scheme, the missing features relative to Lua's FFI that I can spot are: - parsing of C syntax - automatic handling of strings Is there more? The second should be relatively easy. The first is something I think would be *great* and always had in mind, but it scares me. :-) Any tips on how to begin to implement it welcome. Would I have to write a C parser in Scheme, or can we cheat somehow? Taylan