Re: gEDA-user: ANNOUNCE: New gEDA Scheme extension API

2010-11-06 Thread Peter TB Brett
On Saturday 06 November 2010 01:28:42 John Griessen wrote:
 How do I fix this build error?

 [snip]

 Seems like a simple usage problem of the cp program...  maybe it goes away
 the second time through?

I can't reproduce this... what are the exact configure options and sequence of 
commands you're using to get this error?

Thanks,

Peter

-- 
Peter Brett pe...@peter-b.co.uk
Remote Sensing Research Group
Surrey Space Centre


signature.asc
Description: This is a digitally signed message part.


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: ANNOUNCE: New gEDA Scheme extension API

2010-11-06 Thread Stephan Boettcher
John Griessen j...@ecosensory.com writes:

 copying scheme files
 cp: target `./gnetlist.scm' is not a directory

 Seems like a simple usage problem of the cp program...  maybe it goes away 
 the second time through?

This looks as if a variable that defines the target directory is
undefined or empty.

-- 
Stephan



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: ANNOUNCE: New gEDA Scheme extension API

2010-11-06 Thread Armin Faltl

Stephan Boettcher wrote:

John Griessen j...@ecosensory.com writes:

  

copying scheme files
cp: target `./gnetlist.scm' is not a directory

Seems like a simple usage problem of the cp program...  maybe it goes away the 
second time through?



This looks as if a variable that defines the target directory is
undefined or empty.

  

If this were the case, cp would complain about missing 2nd argument.
The message really looks like cp sees 3 or more non-option arguments,
suggesting the target must be a directory. Either the variable defining
the source is wrong (contains 2 or more entities) or it could be a
quoting problem combined with whitespace in a filename.


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: ANNOUNCE: New gEDA Scheme extension API

2010-11-06 Thread John Griessen

On 11/06/2010 12:12 PM, Armin Faltl wrote:

Stephan Boettcher wrote:

John Griessen j...@ecosensory.com writes:


copying scheme files
cp: target `./gnetlist.scm' is not a directory

Seems like a simple usage problem of the cp program... maybe it goes away the 
second time through?


This looks as if a variable that defines the target directory is
undefined or empty.


If this were the case, cp would complain about missing 2nd argument.


I had a problem of not following the directions.  Back on track now.
The error was caused by running make on git branch *master instead of the 
checkout we were told to do.
Nevermind...

JG


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: ANNOUNCE: New gEDA Scheme extension API

2010-11-06 Thread Peter Brett
 I had a problem of not following the directions.     Back on track now.
 The error was caused by running make on git branch *master instead of
 the checkout we were told to do. Nevermind...

Glad to hear it's now working.

To those of you who're playing with the API -- I pushed out some important 
bugfixes yesterday that you'll probably want to make sure you have. If you 
checked out the code using the instructions I gave in my original e-mail, you 
can update by running:

       git pull

And I've got some useful additional features on the way over the next couple of 
days, too. :-)

                         Peter

-- 
Peter Brett pe...@peter-b.co.uk
Remote Sensing Research Group
Surrey Space Centre



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: ANNOUNCE: New gEDA Scheme extension API

2010-11-05 Thread Stephan Boettcher
Peter TB Brett pe...@peter-b.co.uk writes:

 Obviously, since this is an unofficial branch, please don't submit
 patches or bugs to the official gEDA trackers. ;-)

What is the reason why this cannot be merged soon/immediately?  From the
description is seems to be a clean addition, that should not interfere
significantly with anything already available.

And it is very usefull now.

-- 
Stephan



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: ANNOUNCE: New gEDA Scheme extension API

2010-11-05 Thread Gareth Edwards
On 4 November 2010 23:53, Peter TB Brett pe...@peter-b.co.uk wrote:
 After almost 18 months of design, preliminary work, and research, I am
 pleased present my latest gEDA Big Project.

           ###   A COMPREHENSIVE SCHEME API FOR gEDA   ###


I think it would be better in Tcl.

I'M KIDDING

Great work Peter, I'm travelling to Dallas for a meeting next week and
I'm going to take this branch with me for a play during the dull
moments - hoping to be able to contribute patches.

Cheers
Gareth


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: ANNOUNCE: New gEDA Scheme extension API

2010-11-05 Thread Peter TB Brett
On Friday 05 November 2010 11:09:39 Stephan Boettcher wrote:
 Peter TB Brett pe...@peter-b.co.uk writes:
  Obviously, since this is an unofficial branch, please don't submit
  patches or bugs to the official gEDA trackers. ;-)
 
 What is the reason why this cannot be merged soon/immediately?  From the
 description is seems to be a clean addition, that should not interfere
 significantly with anything already available.
 
 And it is very usefull now.

There are still (potentially) a lot of bugs -- since sending my original e-
mail I have already found a couple of corner cases that weren't covered by the 
testsuite -- and there are quite a lot of features that are still required to 
make it properly useful.  Also, the existing legacy API in gschem (i.e. hooks 
etc.) currently can't be used alongside the new Scheme API, so it needs to be 
ported and the relevant functions re-implemented on top of the new primitives.

Still a way to go, I'm afraid. ;-)

  Peter

-- 
Peter Brett pe...@peter-b.co.uk
Remote Sensing Research Group
Surrey Space Centre


signature.asc
Description: This is a digitally signed message part.


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: ANNOUNCE: New gEDA Scheme extension API

2010-11-05 Thread Dave McGuire

On 11/4/10 7:12 PM, Peter TB Brett wrote:

After almost 18 months of design, preliminary work, and research, I am
pleased present my latest gEDA Big Project.


###   A COMPREHENSIVE SCHEME API FOR gEDA   ###


  Ok, this is amazingly, incredibly cool.  Thanks for the awesome work! 
 I look forward to hacking with this soon.


   -Dave

--
Dave McGuire
Port Charlotte, FL


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: ANNOUNCE: New gEDA Scheme extension API

2010-11-05 Thread John Griessen

On 11/05/2010 07:06 AM, Peter TB Brett wrote:

Obviously, since this is an unofficial branch, please don't submit


What is a good simple way to to install these alongside the usual geda programs?
Change program names?  Change path to find one set of them or the other?

John


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: ANNOUNCE: New gEDA Scheme extension API

2010-11-05 Thread Peter TB Brett
On Friday 05 November 2010 22:11:50 John Griessen wrote:
 On 11/05/2010 07:06 AM, Peter TB Brett wrote:
  Obviously, since this is an unofficial branch, please don't submit
 
 What is a good simple way to to install these alongside the usual geda
 programs? Change program names?  Change path to find one set of them or
 the other?

Usually, the latter (although you'll need to change LD_LIBRARY_PATH as well as 
PATH because libgeda is a shared library).  One common way is to use 
environment-modules to switch between alternative versions of a package.

Note that if you just want to play with my code, you don't need to install it 
to run the testsuite and play with the libgeda/shell/geda-shell program.  
It'll run quite happily in the source tree.  gschem etc. won't, though.

Cheers,

 Peter


-- 
Peter Brett pe...@peter-b.co.uk
Remote Sensing Research Group
Surrey Space Centre


signature.asc
Description: This is a digitally signed message part.


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: ANNOUNCE: New gEDA Scheme extension API

2010-11-05 Thread John Griessen

How do I fix this build error?

make[3]: Entering directory `/moredata/src/peter-b/gnetlist/lib'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/moredata/src/peter-b/gnetlist/lib'
Making all in scheme
make[3]: Entering directory `/moredata/src/peter-b/gnetlist/scheme'
sed \
-e 's;@m4@;/usr/bin/m4;g' \
-e 's;@pcbm4dir@;/opt/geda-pb/share/pcb/m4;g' \
-e 's;@pcbconfdir@;/opt/geda-pb/etc/pcb;g' \
./gnet-gsch2pcb.scm.in  gnet-gsch2pcb.scm
if test . !=  ; then \
echo copying scheme files ; \
cp -f ./*.scm  ; \
else \
echo source directory = build directory ; \
fi
copying scheme files
cp: target `./gnetlist.scm' is not a directory
make[3]: *** [all-local] Error 1
make[3]: Leaving directory `/moredata/src/peter-b/gnetlist/scheme'
make[2]: *** [all-recursive] Error 1


Seems like a simple usage problem of the cp program...  maybe it goes away the 
second time through?

John
--
Ecosensory   Austin TX


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: ANNOUNCE: New gEDA Scheme extension API

2010-11-04 Thread Peter TB Brett
Dear all,

After almost 18 months of design, preliminary work, and research, I am
pleased present my latest gEDA Big Project.


   ###   A COMPREHENSIVE SCHEME API FOR gEDA   ###

One of the most common problems encountered by gschem users is the
difficulty of adding new tools and commands for altering the schematic
or symbol being edited.

Now, thanks to being able to rely on the advanced features of Guile 1.8,
and with the aid of lots of excellent work done by Peter Clifton, this
problem has been solved.

Since my last gEDA upgrade project -- the integrated build system
released in gEDA 1.6.0, which I know many found to be a step improvement
over what came before -- I have been working on a new Scheme API for
libgeda, that allows for arbitrary inspection and manipulation of the
schematic document model, while maintaining clean separation between the
libgeda and the code that interfaces with Guile.

And it's now ready to try out!


 ###   HOWTO: INSTALL  USE THE SCHEME API BRANCH   ###

You will need to obtain my `guile-scheme-api' branch from my public git
repository.  The following commands should get you a copy of the source
code:

# Clone the repository
git clone git://repo.or.cz/geda-gaf/peter-b.git
cd peter-b

# Checkout the branch
git checkout -t origin/guile-scheme-api

# Configure  compile
./autogen.sh
./configure your-configure-arguments
make
make install

You can run the test suite for the Scheme API:

# (cd libgeda  make check)

As an example of how gschem plugins can be written using this API, the
attached `hide-pinseq.scm' file is a plugin for hiding all pinseq
attributes on the current page.  To use it, place it in the same
directory as the symbol you want to edit, and create a gschemrc in that
directory with the following contents:

;; Load `hide-pinseq' plugin
(load hide-pinseq.scm)

Run gschem, and open the symbol.  Press `:' to bring up the Scheme
prompt, and type:

(hide-pinseq)

This will set all pinseq= attributes of all pin objects in the symbol
to be invisible.  If you want to make them visible again, you can run:

(hide-pinseq #t)


###   THE DETAILS   ###

The majority of the new code is located in libgeda.

The C language binding is implemented in libgeda/src, in the new
`scheme_*.c' files.  As far as possible, it uses the libgeda public C
API, and it is written in idiomatic Guile C -- i.e. it uses Scheme
exceptions for reporting errors, it is designed to be tolerant of
non-local exits, and it uses the `guile-snarf' tool to generate the
Guile boilerplate.  It relies heavily on the new weak reference
mechanism added to the unstable branch of gEDA since the 1.6.0 release
to allow the C code to destroy heap-allocated structures safely.  Most
of the functions defined in the C language binding are inaccessible from
programs which use libgeda; the public API can be found in
`libgeda/libgedaguile.h'.

At the moment, the language binding is as minimal as possible.  The
emphasis has been on correctness rather than high performance or broad
functionality.  The low-level modules that are available are as follows:

(geda core smob)
(geda core toplevel)
(geda core page)
(geda core object)
(geda core complex)
(geda core attrib)

This API (and any function or variable beginning with a `%' is
considered an implementation detail, and may be subject to change.
Normally, you should use the functions in the following modules, written
in Scheme and found in the `libgeda/scheme/geda' directory.  At the
moment, the documentation is limited to the comments in those Scheme
files.

(geda page)
(geda object)
(geda attrib)
(gschem window)

All of the functions in these files are unit tested.  The unit tests can
be found in the `libgeda/scheme/unit-tests' directory.


###   CONTRIBUTING   ###

Even though it's already obviously useful as it currently is, there's
still a lot that can be done to flesh out and otherwise improve the API
before it will be ready to merge into the main gEDA unstable branch.
Please help out!  I've tried to document all of the relevant code as
fully as possible, and I recommend the excellent Guile reference manual.

Please also test the code to destruction!  Any bug reports will be very
gratefully accepted!

From now on my `guile-scheme-api' branch will not be rebased, so it
should be a safe base for developing your own code.  I accept `git
format-patch' patches by e-mail -- please e-mail with [PATCH] in the
subject line.  I also will accept merge requests -- please e-mail me
with [MERGE] in the subject line.  Patches should be fully
documented/commented and must include unit tests where possible.

Obviously, since this is an unofficial branch, please don't submit
patches or bugs to the official gEDA trackers. ;-)


Happy hacking!

Peter

-- 
Peter Brett pe...@peter-b.co.uk
Remote Sensing 

gEDA-user: ANNOUNCE: New gEDA Scheme extension API

2010-11-04 Thread Peter TB Brett

Dear all,

After almost 18 months of design, preliminary work, and research, I am
pleased present my latest gEDA Big Project.


   ###   A COMPREHENSIVE SCHEME API FOR gEDA   ###

One of the most common problems encountered by gschem users is the
difficulty of adding new tools and commands for altering the schematic
or symbol being edited.

Now, thanks to being able to rely on the advanced features of Guile 1.8,
and with the aid of lots of excellent work done by Peter Clifton, this
problem has been solved.

Since my last gEDA upgrade project -- the integrated build system
released in gEDA 1.6.0, which I know many found to be a step improvement
over what came before -- I have been working on a new Scheme API for
libgeda, that allows for arbitrary inspection and manipulation of the
schematic document model, while maintaining clean separation between the
libgeda and the code that interfaces with Guile.

And it's now ready to try out!


 ###   HOWTO: INSTALL  USE THE SCHEME API BRANCH   ###

You will need to obtain my `guile-scheme-api' branch from my public git
repository.  The following commands should get you a copy of the source
code:

# Clone the repository
git clone git://repo.or.cz/geda-gaf/peter-b.git
cd peter-b

# Checkout the branch
git checkout -t origin/guile-scheme-api

# Configure  compile
./autogen.sh
./configure your-configure-arguments
make
make install

You can run the test suite for the Scheme API:

# (cd libgeda  make check)

As an example of how gschem plugins can be written using this API, the
attached `hide-pinseq.scm' file is a plugin for hiding all pinseq
attributes on the current page.  To use it, place it in the same
directory as the symbol you want to edit, and create a gschemrc in that
directory with the following contents:

;; Load `hide-pinseq' plugin
(load hide-pinseq.scm)

Run gschem, and open the symbol.  Press `:' to bring up the Scheme
prompt, and type:

(hide-pinseq)

This will set all pinseq= attributes of all pin objects in the symbol
to be invisible.  If you want to make them visible again, you can run:

(hide-pinseq #t)


###   THE DETAILS   ###

The majority of the new code is located in libgeda.

The C language binding is implemented in libgeda/src, in the new
`scheme_*.c' files.  As far as possible, it uses the libgeda public C
API, and it is written in idiomatic Guile C -- i.e. it uses Scheme
exceptions for reporting errors, it is designed to be tolerant of
non-local exits, and it uses the `guile-snarf' tool to generate the
Guile boilerplate.  It relies heavily on the new weak reference
mechanism added to the unstable branch of gEDA since the 1.6.0 release
to allow the C code to destroy heap-allocated structures safely.  Most
of the functions defined in the C language binding are inaccessible from
programs which use libgeda; the public API can be found in
`libgeda/libgedaguile.h'.

At the moment, the language binding is as minimal as possible.  The
emphasis has been on correctness rather than high performance or broad
functionality.  The low-level modules that are available are as follows:

(geda core smob)
(geda core toplevel)
(geda core page)
(geda core object)
(geda core complex)
(geda core attrib)

This API (and any function or variable beginning with a `%' is
considered an implementation detail, and may be subject to change.
Normally, you should use the functions in the following modules, written
in Scheme and found in the `libgeda/scheme/geda' directory.  At the
moment, the documentation is limited to the comments in those Scheme
files.

(geda page)
(geda object)
(geda attrib)
(gschem window)

All of the functions in these files are unit tested.  The unit tests can
be found in the `libgeda/scheme/unit-tests' directory.


###   CONTRIBUTING   ###

Even though it's already obviously useful as it currently is, there's
still a lot that can be done to flesh out and otherwise improve the API
before it will be ready to merge into the main gEDA unstable branch.
Please help out!  I've tried to document all of the relevant code as
fully as possible, and I recommend the excellent Guile reference manual.

Please also test the code to destruction!  Any bug reports will be very
gratefully accepted!

From now on my `guile-scheme-api' branch will not be rebased, so it
should be a safe base for developing your own code.  I accept `git
format-patch' patches by e-mail -- please e-mail with [PATCH] in the
subject line.  I also will accept merge requests -- please e-mail me
with [MERGE] in the subject line.  Patches should be fully
documented/commented and must include unit tests where possible.

Obviously, since this is an unofficial branch, please don't submit
patches or bugs to the official gEDA trackers. ;-)


Happy hacking!

Peter


-- 
Peter Brett pe...@peter-b.co.uk
Remote Sensing 

Re: gEDA-user: ANNOUNCE: New gEDA Scheme extension API

2010-11-04 Thread Peter TB Brett
On Thursday 04 November 2010 23:53:25 Peter TB Brett wrote:
 Dear all,
 
 After almost 18 months of design, preliminary work, and research, I am
 pleased present my latest gEDA Big Project.

I thought this hadn't got through the first time, so I sent it again.  Sorry 
about spamming you all!

Peter

-- 
Peter Brett pe...@peter-b.co.uk
Remote Sensing Research Group
Surrey Space Centre


signature.asc
Description: This is a digitally signed message part.


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: ANNOUNCE: New gEDA Scheme extension API

2010-11-04 Thread Peter Clifton
On Thu, 2010-11-04 at 23:12 +, Peter TB Brett wrote:
 Dear all,
 
 After almost 18 months of design, preliminary work, and research, I am
 pleased present my latest gEDA Big Project.
 
 
###   A COMPREHENSIVE SCHEME API FOR gEDA   ###

:)

I knew you were working on some scheme stuff, but I had no idea it was
so near ready. Well done!


-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user