X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-TCPREMOTEIP: 207.224.51.38 X-Authenticated-UID: jpd AT noqsi DOT com From: John Doty Content-Type: multipart/alternative; boundary="Apple-Mail=_ACFADAD3-D5D8-4E71-BC38-DDCD45E147F8" Message-Id: <0F3A77B2-E19E-4D38-A955-E7EF9E147ABB@noqsi.com> Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: [geda-user] Guile snippets Date: Fri, 11 Sep 2015 18:06:52 -0600 References: <20150911215322 DOT GC7946 AT localhost DOT localdomain> To: geda-user AT delorie DOT com In-Reply-To: X-Mailer: Apple Mail (2.1878.6) 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 Precedence: bulk --Apple-Mail=_ACFADAD3-D5D8-4E71-BC38-DDCD45E147F8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Sep 11, 2015, at 4:53 PM, Svenn Are Bjerkem = (svenn DOT bjerkem AT googlemail DOT com) [via geda-user AT delorie DOT com] = wrote: > On 12 September 2015 at 00:22, John Doty wrote: >=20 > On Sep 11, 2015, at 3:53 PM, Vladimir Zhbanov (vzhbanov AT gmail DOT com) = [via geda-user AT delorie DOT com] wrote: >=20 > > I'm trying to make Guile more interesting / less awful for gEDA = users. > > > > As a first attempt, I've added some example scripts at [1]. > > > > Please look at them, try them and ask questions if something is = unclear. > > > > I'm planning to add other info since I have some (I hope) useful > > scripts, e.g. making symbols using Guile or transforming hierarchy = into > > a symbol (grown from from the geda_sch2sym shell script on = Launchpad). > > > > Any feedback is appreciated. >=20 > Really cool stuff! >=20 > The only thing I=92d change is the header "Scripting examples=94. It = should be =93Gschem Scripting Examples=94. The gschem and gnetlist Guile = API=92s are very different, so it could confuse readers. >=20 >=20 > 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. They=92re not special, just part of names, often used to indicate = something about a function. For example, the name of a function that = tests some condition conventionally ends with =93?=94. But that=92s only = a convention. Similarly, functions that work =93in place=94, modifying = their arguments, conventionally have names ending in =93*=94. Scheme = does not enforce these conventions. >=20 > 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. >=20 > 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 = distribution. =93gnetlist -i=94 now gives you all of the gnet-devel functionality = (thanks, Peter B.), so that would be redundant. > Playing around on the REPL command line reminds me of the CIW window = in Cadence. Does the same exist for gschem too? >=20 > --=20 > Svenn John Doty Noqsi Aerospace, Ltd. http://www.noqsi.com/ jpd AT noqsi DOT com --Apple-Mail=_ACFADAD3-D5D8-4E71-BC38-DDCD45E147F8 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252

On 12 September 2015 at 00:22, John Doty <jpd AT noqsi DOT com> wrote:

On Sep 11, 2015, at 3:53 PM, Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com] <geda-user AT delorie DOT com> = wrote:

> I'm trying to make Guile more interesting / less awful for gEDA = users.
>
> As a first attempt, I've added some example scripts at [1].
>
> Please look at them, try them and ask questions if something is = unclear.
>
> I'm planning to add other info since I have some (I hope) = useful
> scripts, e.g. making symbols using Guile or transforming hierarchy = into
> a symbol (grown from from the geda_sch2sym shell script on = Launchpad).
>
> Any feedback is appreciated.

Really cool stuff!

The only thing I=92d change is the header "Scripting examples=94. It = should be =93Gschem Scripting Examples=94. The gschem and gnetlist Guile = API=92s are very different, so it could confuse = readers.


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.

They=92re not = special, just part of names, often used to indicate something about a = function. For example, the name of a function that tests some condition = conventionally ends with =93?=94. But that=92s only a convention. = Similarly, functions that work =93in place=94, modifying their = arguments, conventionally have names ending in =93*=94. Scheme does not = enforce these conventions.


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 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 distribution. =

=93gnetlist -i=94 now gives you all of = the gnet-devel functionality (thanks, Peter B.), so that would be = redundant.

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

--
Svenn

John = Doty        =       Noqsi = Aerospace, Ltd.

http://www.noqsi.com/

jpd AT noqsi DOT com



= --Apple-Mail=_ACFADAD3-D5D8-4E71-BC38-DDCD45E147F8--