From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Grothoff Subject: Re: [GNUnet-developers] GSoC: Binary package distribution through GnuNet (report 1) Date: Wed, 03 Jun 2015 21:12:42 +0200 Message-ID: <556F51AA.8050708@gnunet.org> References: <243548697.39354454.1433338686832.JavaMail.root@zimbra53-e8.priv.proxad.net> <87vbf4u8l3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tbR08jGROhEXg32ra2j5jvTxbhD2nIHEx" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0E5m-00043D-8k for guix-devel@gnu.org; Wed, 03 Jun 2015 15:12:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0E5i-0004TA-Vw for guix-devel@gnu.org; Wed, 03 Jun 2015 15:12:46 -0400 In-Reply-To: <87vbf4u8l3.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: gnunet-developers@gnu.org, guix-devel@gnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --tbR08jGROhEXg32ra2j5jvTxbhD2nIHEx Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/03/2015 05:15 PM, Ludovic Court=C3=A8s wrote: > Hi! >=20 > asgeir@free.fr skribis: >=20 >> This first week started with cleaning and organizing the draft >> bindings I=E2=80=99ve been working on previously (set up of a proper d= irectory >> structure, a small Makefile, etc.), then most of the work has been on >> mapping GnuNet=E2=80=99s data structures. >> >> This week, I=E2=80=99m heading for the remaining =E2=80=9Cmost-needed=E2= =80=9D functions (URI >> handling, scheduling) and some testing, and also writing a simplified >> version of the `gnunet-search` utility, as it could be a good test and= >> example of usage for the bindings. >=20 > OK, sounds like a good plan! >=20 > Are you already using a public repo that we could look at? If not, we > should set up a Git repository at gnunet.org or Savannah, whichever is > more convenient. gnunet.org isn't quite setup for *public* Git's yet... >> Options handling: the standard way of writing software that uses >> GnuNet=E2=80=99s API is to let GnuNet handle the command line options:= the >> API=E2=80=99s entry point, must be fed directly with the C arguments v= ector >> `argv`; it assures that all GnuNet programs have a uniform CLI. The >> first difficulty I encountred is: how to properly handle these >> options? After some work, I decided to manually craft a fake `argv` as= >> a quick temporary fix. >=20 > OK. Question for the GNUnet people: What=E2=80=99s the recommended way= to > handle argc/argv if we want to provide a library? Well, libgnunetutil contains a wrapper around getopt for our own convenience, but I'm totally fine with using a language-specific argv-parser for command-line tools. Note that GNUnet *libraries* obviously also don't take command-line arguments, so I'm not sure what the question is. > Typically a Guile > module cannot be passed any arguments, and the initialization that > happens is just that its top-level forms are evaluated when it=E2=80=99= s loaded. > Having to explicitly call an initialization function that takes an argv= > would look unidiomatic. Right, same applies for (most) GNUnet APIs, with the exception of our "service" and "program" abstractions which are there to make it easy to write a 'main' function. But I don't see a need to expose those two APIs to Guile. Happy hacking! Christian --tbR08jGROhEXg32ra2j5jvTxbhD2nIHEx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVb1GqAAoJEJOea+Hin8PM7GYP/1WYbp4lYQWpmixx6cmvOiGc S9FLcVXLd4Ug0nZ9cK18/YVD0sFpF4/B7T3KaBl+aDjgMpfepZfPWPzZfaaZCWxJ 18KoFgvtagyHEibUUt8sqEbTPI2EVX91c5LUwOVFJ8OIUFWIC0S42HgJgosjbJXd 9b2ZMNQ6gi9iDd1vvn4QFZvDzrNNIgT6cxaKd6LpDqDw4iOPZWli5sj+I2lJuIqI mP0MDIEu+45DnpPR+i3ATEFWdyiEQRqaKv0UcGWYrAm/1/mBbHpTcF/vyrifrAYk sM9Hp5RAPczBp4P6TbjayTajAV45/5Khta9ZqudA8d3wkRSUYtezRgjYP0tyQnj8 rV2yKSXaWP+HoPtNfJzUwSrczwHsAqlK+/sHh4fMtqYc7tMnrN8WKHX744G+/6JO un7bZNcZJGN1ZY36aD+YhHReAmZtZxooW6yCO+76XQul9aebMRZ4OW88X5ElOkIC hss4Y3e9wPKWzbkx+510MgDsFINtnon0gS064sTOeZp7aeMEG6fuv0ZfDo7xNUq8 QSlMqrbH/FbEFfIEvB0OOIlXkQP8wLBMs1/qkhATNEYQBlpNBmI1NsvfSwPEe0sg vTapZUnKu2q82xROY3KED9MKSbWBizZl6jauD2tULStzChHWZSj42DSSID1/4LTp qG+6qhGfC814a9vJnzLi =pBz8 -----END PGP SIGNATURE----- --tbR08jGROhEXg32ra2j5jvTxbhD2nIHEx--