From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Samuel Barreto Newsgroups: gmane.lisp.guile.user Subject: Re: snarfing docstrings in c extensions Date: Mon, 09 Apr 2018 09:24:34 +0200 Message-ID: References: <20180408022727.GA5638@joshua.dnsalias.com> Reply-To: samuel.barreto8@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 1523258602 10857 195.159.176.226 (9 Apr 2018 07:23:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 9 Apr 2018 07:23:22 +0000 (UTC) User-Agent: mu4e 0.9.19; emacs 26.0.91 Cc: "guile-user@gnu.org" To: Mike Gran Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Apr 09 09:23:18 2018 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 1f5R93-0002jW-Qq for guile-user@m.gmane.org; Mon, 09 Apr 2018 09:23:17 +0200 Original-Received: from localhost ([::1]:42811 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5RB9-0003lC-ET for guile-user@m.gmane.org; Mon, 09 Apr 2018 03:25:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5RAN-0003dg-K2 for guile-user@gnu.org; Mon, 09 Apr 2018 03:24:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5RAK-0008Qq-9g for guile-user@gnu.org; Mon, 09 Apr 2018 03:24:39 -0400 Original-Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:40505) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5RAK-0008P4-3R for guile-user@gnu.org; Mon, 09 Apr 2018 03:24:36 -0400 Original-Received: by mail-wm0-x22b.google.com with SMTP id x4so14297218wmh.5 for ; Mon, 09 Apr 2018 00:24:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:reply-to:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=K9yfhQZg4k52lNObcQNjSvJSOimU+9K0EsABd3ls3dU=; b=VtxUsNPj6uDaDhcjxQ6Q6qXtgoXEUJmsTPx8iQ4G9aOT57rZej161Sb2fIvhSEVJQ5 BXRgsZPzaLxZvaXUyvv2I5cS/pe65caBcaVn7KPxW7fjWZxFKkr4aaw3BifJ6YRCW8Xm PPTa2Ocmtit5VUBSBOm6YdlEH2sbjWoRY/NRQx+P7urMXTt1V0dS1bWUSgZhjDIQPx2C Jij761/cKaDleltpp0jnRtneBX+k+aKcc1ueXhtn6Jx9ob4Y7FJp4cDikpKBBztN8kPI mM/7yQH4b/GdutS/i0Mk1+CxXV7lqtePuacffI8Z5HQ8rszLAN+w7srp4AyCnYUYwokI 5xnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :reply-to:in-reply-to:date:message-id:mime-version :content-transfer-encoding; bh=K9yfhQZg4k52lNObcQNjSvJSOimU+9K0EsABd3ls3dU=; b=QYqUCcQm+OsXFZDxUqNnCKWHLIt/M9l0sRA/8c+ReXJhe7FKSAaUErTcUgrjSmToFv JVfpTeKMOHXsL2Nb6cg5v9pcbnAm6oH1XjW2gOn0hf3C1MpNqdwv5OCV1som0p5sqbpQ hRFh+zw4uo1b5kK+pHScAdrk1u6tsbkjxN/aPWqZTyLmEhBJmteV6yU8T/YbVNmEASAz 3cHNcJOLyddwYBQkP+Ku3RJmxNOgy+iYZt5QiB6mhvU8wbxaz4hKcMQL0JZz1PcTdVW3 Z6W9JWPdw1jROEh58iNS88Hx2i5Y4+r/ukWxOd3is3Rr+guGIFW0CG+/Ek61Cl6hWgpm PzcA== X-Gm-Message-State: ALQs6tBC+fcxWslJfJ+WpU20rc4AKjVORnjJXQTxyQr8uXn1/XqTHu1J 5eCPq/IQbyA4x7wlxiWDQmw= X-Google-Smtp-Source: AIpwx48DpVAt9QpVqWiyarZK4IUhCB7Z14rK4EEna5iPokggh9MXaVvP6u3zXY/KufZxGFnyN6SLog== X-Received: by 10.28.236.152 with SMTP id h24mr18814890wmi.92.1523258674878; Mon, 09 Apr 2018 00:24:34 -0700 (PDT) Original-Received: from localhost (umr5557-mendel-sbar.univ-lyon1.fr. [134.214.32.130]) by smtp.gmail.com with ESMTPSA id q138sm10335wmd.1.2018.04.09.00.24.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Apr 2018 00:24:34 -0700 (PDT) In-reply-to: <20180408022727.GA5638@joshua.dnsalias.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22b 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:14542 Archived-At: > On Sat, Apr 07, 2018 at 08:59:32PM +0200, Samuel Barreto wrote: > >> So I do am able to generate the info files that I want. My two problems >> are: >> >> 1. how to use guile-snarf-docs portably ? (I have hardcoded them in my >> Makefile for now.) > > Since they don't get installed, it is hard to know the most robust method. > They are used as internal tools to Guile. > >> ... > >> And from a broader perspective, is it the way it is supposed to work ? I >> mean, am I doing it the right way or are other "guile-extension-writers" >> doing it otherwise ? > > That is the way it is supposed to work. But, I stopped doing it that way. > I had the same sort of problems you are having now. > > Instead, I started writing scheme wrappers around my C functions. In C, > let's say I had a library with a function named %foo. In scheme, I would > make a procedure > > (define (foo x) > "docstring" > (%foo x)) > > It is a lot of wasted effort that way, but, it is easier to understand > for me. I'm not sure I should recommend it, tho. > > -Mike Gran Thanks for your answer, I was having the feeling that defining scheme wrappers was the way to go. I agree that it is a lot of wasted effort, but then a lot of boilerplate code can be written in scheme that way (taking care of arguments validity, simpler docstrings, stuffs like that)=C2=A0! Thanks again ! sam