www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/09/11/19:44:40

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=date:from:to:subject:message-id:mail-followup-to:references
:mime-version:content-type:content-disposition:in-reply-to
:user-agent;
bh=tCihdjpc/dGEmdyFjgwu+rUvp4GUlIIvMPaWqBLqx0U=;
b=mnjlXO8Jf09xI7/R6VIW5we3yb8GW47yz5CpcsR9lbc15sr+txPHosPufE7sZdWBKd
WTlYzEjO2TF3McoW2DXouMIaqud/4m89M55xA00lnBhgMtERj8yc/0/1L3OLrpawDkDF
v+Mr5Htb0rH1GHkqTCKuXP/zGparWALZVNwilo7Sn8EkonEBa8lUfwstj3dOsQrO0lW3
hg4aZwfVAiCaCKBycEQPXRd+lFPVHyTXoVJ5o0cRosMQEPFDO3Fhhj330bDOmn+cT2gD
OH5hcP0cHY4sbUPkkmfsfDprJa3BG/V5hiM8JUIWGFxkpJrfNOaCBHlXMdz585Rv8Ukw
HTqw==
X-Received: by 10.152.27.100 with SMTP id s4mr1306088lag.122.1442015060552;
Fri, 11 Sep 2015 16:44:20 -0700 (PDT)
Date: Sat, 12 Sep 2015 02:44:18 +0300
From: "Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user <geda-user AT delorie DOT com>
Subject: Re: [geda-user] Guile snippets
Message-ID: <20150911234418.GF7946@localhost.localdomain>
Mail-Followup-To: geda-user <geda-user AT delorie DOT com>
References: <20150911215322 DOT GC7946 AT localhost DOT localdomain>
<D1C8547E-A899-4865-8416-EB7F03958C1C AT noqsi DOT com>
<CAGde_xPiL8Y7Cp2XcOpnwzk1bY9e0TYRaxii71MkThO=TNsqkQ AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CAGde_xPiL8Y7Cp2XcOpnwzk1bY9e0TYRaxii71MkThO=TNsqkQ@mail.gmail.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, Sep 12, 2015 at 12:53:18AM +0200, Svenn Are Bjerkem (svenn DOT bjerkem AT googlemail DOT com) [via geda-user AT delorie DOT com] wrote:
...
Hi, Svenn.
Thank you for your feedback.

> Currently the language confuse me. I wrote a lot of helper scripts during
> my Cadence days. SKILL is also a kind of LISP, but it strikes me how
> different the notation is. Where SKILL hardly used any other magic
> characters but ', guile seems to use *,? and ! in ways I am not able to
> grok by just looking at the code.
No, in the code on the mentioned page there are no such magic symbols.
They are just parts of procedure names and have a special meaning
accepted in order to make things more clear.

The '*' at the end of a function name means the function has been
evolved from some more special one and is more 'smart', e.g., let* vs
let, where let* can be represented as a combination of several let's.

The '?' at the end of a function says it is a predicate, that is a
function having boolean value. It is convenient to say (string? arg) to
check if it is a string.

The '!' at the function end means it is a function that changes its
argument. For instance, (page-remove! page-name objects) removes the
named objects from the page named page-name, thus changing it.

Perhaps, the problem is the highlighting used in dokuwiki which shows
some symbols as special. I could change it, but then the text in
procedures will look not such bright :)

If you think this info is important enough, I could include it in the
document.

> 
> I would be happy if the scripts were elaborated a bit more regarding 'how
> to think when programming guile in geda' for people who has programmed
> before, but not in guile.
I don't think there are any means in guile which would make it as
special. If you have any question wrt the differences between your
habits and the functions you see, let's discuss them here. And of
course, you can send your questions to me privately.

> 
> I just got started with John's example for back-end programming in
> gnetlist, and I really think that gnet-devel.scm should be a part of the
:) 
You can have it in your local lib. And it's a great stuff to learn by
example. That is why it is not in the main distribution, I think.

> distribution. Playing around on the REPL command line reminds me of the CIW
> window in Cadence. Does the same exist for gschem too?

I haven't used Cadence. There is a limited command line support in
gschem. You have a command line and its output in the log or in the
console, depending on what commands you use. There is also the 'gaf
shell' command providing the same features for libgeda API that gnetlist
does for its own functions in the interactive mode. I believe, gschem
should use the same model, and provide interactive mode for users to
play with its functions.

Cheers,
  Vladimir

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019