Re: gEDA-user: gschem guile scripting

2010-10-31 Thread Maciej Pijanka
On Sat, 30 Oct 2010, Oliver King-Smith wrote:

Maciej,
There is a small development script that allows you to drop into a
guile shell on the gEDA website.  The shell auto completes so you can
see a list of all available commands.  You can also try things live.
I found this very helpful when I was starting out with gnetlist.  Here
is the development script in case you can't find it.
(use-modules (ice-9 readline))
(activate-readline)
 
(define (devel output-filename)
(scm-style-repl)

I already tried this before posting, it don't work even for gnetlist producing
following output:

Backtrace:
In current input:
   1: 0* (ptest output.net)

unnamed port:1:1: In expression (ptest output.net):
unnamed port:1:1: Unbound variable: ptest

for gschem there is even no such output, i have guile-1.8.5 if that changes 
anything.

I read John P. Doty gnetlist tutorial but unfortunatelly packages variable 
seems to be
gnetlist specific, and it is not present in gschem.

Maciej

Oliver


-- 
Maciej Pijanka
I don't fear computers, I fear lack of them -- Isaac Asimov


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


Re: gEDA-user: gschem guile scripting

2010-10-31 Thread John Doty

On Oct 31, 2010, at 5:07 AM, Maciej Pijanka wrote:

 I already tried this before posting, it don't work even for gnetlist producing
 following output:
 
 Backtrace:
 In current input:
   1: 0* (ptest output.net)
 
 unnamed port:1:1: In expression (ptest output.net):
 unnamed port:1:1: Unbound variable: ptest

It means you haven't defined ptest.

 
 for gschem there is even no such output, i have guile-1.8.5 if that changes 
 anything.
 
 I read John P. Doty gnetlist tutorial but unfortunatelly packages variable 
 seems to be
 gnetlist specific, and it is not present in gschem.

You seem to be trying to do a gnetlist task from within gschem. Don't do that. 
Use the right tool for the job.

John Doty  Noqsi Aerospace, Ltd.
http://www.noqsi.com/
j...@noqsi.com




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


Re: gEDA-user: gschem guile scripting

2010-10-31 Thread Maciej Pijanka
On Sun, 31 Oct 2010, John Doty wrote:

 
 On Oct 31, 2010, at 5:07 AM, Maciej Pijanka wrote:
 
  I already tried this before posting, it don't work even for gnetlist 
  producing
  following output:
  
  Backtrace:
  In current input:
1: 0* (ptest output.net)
  
  unnamed port:1:1: In expression (ptest output.net):
  unnamed port:1:1: Unbound variable: ptest
 
 It means you haven't defined ptest.

Yes, but this is what i get when i created gnet-devel with gnet-ptest name, so 
i think i missed
something important, maybe it need also define procedure which name is derived 
from invoked backend
name that is called by gnetlist after processing schematics.

 
  
  for gschem there is even no such output, i have guile-1.8.5 if that changes 
  anything.
  
  I read John P. Doty gnetlist tutorial but unfortunatelly packages variable 
  seems to be
  gnetlist specific, and it is not present in gschem.
 
 You seem to be trying to do a gnetlist task from within gschem. Don't do 
 that. Use the right tool for the job.

Why, i wanted to create some scheme script to be invoked from gschem to 
show/hide pinnumbers on currently opened
schematics, why i would use gnetlist for that?

 
 John Doty  Noqsi Aerospace, Ltd.
 http://www.noqsi.com/
 j...@noqsi.com
 

-- 
Maciej Pijanka
I don't fear computers, I fear lack of them -- Isaac Asimov


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


Re: gEDA-user: gschem guile scripting

2010-10-31 Thread John Doty

On Oct 31, 2010, at 10:18 AM, Maciej Pijanka wrote:

 On Sun, 31 Oct 2010, John Doty wrote:
 
 
 On Oct 31, 2010, at 5:07 AM, Maciej Pijanka wrote:
 
 I already tried this before posting, it don't work even for gnetlist 
 producing
 following output:
 
 Backtrace:
 In current input:
  1: 0* (ptest output.net)
 
 unnamed port:1:1: In expression (ptest output.net):
 unnamed port:1:1: Unbound variable: ptest
 
 It means you haven't defined ptest.
 
 Yes, but this is what i get when i created gnet-devel with gnet-ptest name, 
 so i think i missed
 something important, maybe it need also define procedure which name is 
 derived from invoked backend
 name that is called by gnetlist after processing schematics.

Yes.

 
 
 
 for gschem there is even no such output, i have guile-1.8.5 if that changes 
 anything.
 
 I read John P. Doty gnetlist tutorial but unfortunatelly packages variable 
 seems to be
 gnetlist specific, and it is not present in gschem.
 
 You seem to be trying to do a gnetlist task from within gschem. Don't do 
 that. Use the right tool for the job.
 
 Why, i wanted to create some scheme script to be invoked from gschem to 
 show/hide pinnumbers on currently opened
 schematics, why i would use gnetlist for that?

For the same reason that you wouldn't want to use pliers as a hammer. gschem 
has very little knowledge of what the graphics *mean*. This is a very good 
thing, a key feature of gEDA's design, one that distinguishes it from all the 
fritterware out there.

John Doty  Noqsi Aerospace, Ltd.
http://www.noqsi.com/
j...@noqsi.com




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


Re: gEDA-user: gschem guile scripting

2010-10-31 Thread DJ Delorie

  Why, i wanted to create some scheme script to be invoked from
  gschem to show/hide pinnumbers on currently opened schematics, why
  i would use gnetlist for that?
 
 For the same reason that you wouldn't want to use pliers as a
 hammer. gschem has very little knowledge of what the graphics
 *mean*. This is a very good thing, a key feature of gEDA's design,
 one that distinguishes it from all the fritterware out there.

When a user complains that they can't get their work done, the WRONG
answer is to tell them they're better off that way.

PCB's plugins can iterate through all the foo on the current board.
It's really useful, and something you'd expect a layout app to be able
to do.

Why shouldn't our schematic editor be able to iterate through all the
foo on the current schematic?


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


Re: gEDA-user: gschem guile scripting

2010-10-31 Thread Stefan Salewski
On Sun, 2010-10-31 at 10:41 -0600, John Doty wrote:

 
 For the same reason that you wouldn't want to use pliers as a hammer.
 gschem has very little knowledge of what the graphics *mean*. This is
 a very good thing, a key feature of gEDA's design, one that
 distinguishes it from all the fritterware out there.
 

There are some physicists with very less knowledge of electronics, and
there are electronics engineers with very less knowledge of physics.

That may be OK, but may be a problem in a team doing astronomic space
observation.

For gEDA, a gschem variant with some more knowledge about electronics
may be not too bad, e.g. for detecting wrong wirings during schematic
entry.



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


Re: gEDA-user: gschem guile scripting

2010-10-31 Thread Maciej Pijanka
On Sun, 31 Oct 2010, John Doty wrote:

 
 On Oct 31, 2010, at 10:18 AM, Maciej Pijanka wrote:
 
  On Sun, 31 Oct 2010, John Doty wrote:
  
  
  On Oct 31, 2010, at 5:07 AM, Maciej Pijanka wrote:
  
  I already tried this before posting, it don't work even for gnetlist 
  producing
  following output:
  
  Backtrace:
  In current input:
   1: 0* (ptest output.net)
  
  unnamed port:1:1: In expression (ptest output.net):
  unnamed port:1:1: Unbound variable: ptest
  
  It means you haven't defined ptest.
  
  Yes, but this is what i get when i created gnet-devel with gnet-ptest name, 
  so i think i missed
  something important, maybe it need also define procedure which name is 
  derived from invoked backend
  name that is called by gnetlist after processing schematics.
 
 Yes.

So i understand why simple test failed, but my problem this time isn't even 
near gnetlist for me.

  
  
  
  for gschem there is even no such output, i have guile-1.8.5 if that 
  changes anything.
  
  I read John P. Doty gnetlist tutorial but unfortunatelly packages 
  variable seems to be
  gnetlist specific, and it is not present in gschem.
  
  You seem to be trying to do a gnetlist task from within gschem. Don't do 
  that. Use the right tool for the job.
  
  Why, i wanted to create some scheme script to be invoked from gschem to 
  show/hide pinnumbers on currently opened
  schematics, why i would use gnetlist for that?
 
 For the same reason that you wouldn't want to use pliers as a hammer. gschem 
 has very little knowledge of what the graphics *mean*. This is a very good 
 thing, a key feature of gEDA's design, one that distinguishes it from all the 
 fritterware out there.
 

But i don't want app to *know* what it iterates, just to iterate over all items
and expose that possibility to scheme so i could skip entities containing
attribute graphical=1 and show pin numbers or any other attribute if it exist
on them, or hide them. Why command line tool used to extract/convert/process
schematics into not schematic would be best idea to just alter visibility of
pins or attributes for whole sheet at once, i just want to save time on click
on element, edit-attributes, enable visibility of one, and move cursor to next.


 John Doty  Noqsi Aerospace, Ltd.
 http://www.noqsi.com/
 j...@noqsi.com

-- 
Maciej Pijanka
I don't fear computers, I fear lack of them -- Isaac Asimov


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


Re: gEDA-user: gschem guile scripting

2010-10-31 Thread John Doty

On Oct 31, 2010, at 11:00 AM, DJ Delorie wrote:

 
 Why, i wanted to create some scheme script to be invoked from
 gschem to show/hide pinnumbers on currently opened schematics, why
 i would use gnetlist for that?
 
 For the same reason that you wouldn't want to use pliers as a
 hammer. gschem has very little knowledge of what the graphics
 *mean*. This is a very good thing, a key feature of gEDA's design,
 one that distinguishes it from all the fritterware out there.
 
 When a user complains that they can't get their work done,

Worrying about pin number visibility is not focusing on the work, but focusing 
on minor aspects of the presentation. That, of course, is the strength of 
fritterware.

 the WRONG
 answer is to tell them they're better off that way.

I am extremely grateful that gEDA is not fritterware, but concerned that it 
might become fritterware.

 
 PCB's plugins can iterate through all the foo on the current board.
 It's really useful, and something you'd expect a layout app to be able
 to do.

PCB is the most troubled tool in the gEDA kit, not a good example for the path 
forward for the rest of the tools.

 
 Why shouldn't our schematic editor be able to iterate through all the
 foo on the current schematic?

For the same reason it's bad to put a hammerhead on a pair of pliers. Most 
tools should be specialists. Even creating a Swiss Army knife that's genuinely 
useful requires great discipline in choosing the functions.

gEDA is ideally suited for doing this kind of thing with a script *outside* of 
gschem. I am pleased that gschem remains unusually simple and clean.

John Doty  Noqsi Aerospace, Ltd.
http://www.noqsi.com/
j...@noqsi.com




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


Re: gEDA-user: gschem guile scripting

2010-10-31 Thread DJ Delorie

 Worrying about pin number visibility is not focusing on the work,
 but focusing on minor aspects of the presentation. That, of course,
 is the strength of fritterware.

If fritterware is the best way to give the user an environment in
which they can be productive, then fritterware is what we'll provide.
gEDA is all about getting work done.  If the user can work faster
without pin numbers distracting them, let's give them a way of hiding
the pin numbers.

When editing a board, the user has the option of showing pin numbers
or not.  They're not usually needed, so you can hide them to keep them
from being a distraction, but you can show then when you need to see
them.  Editing a schematic is no different.  Saying that hiding pin
numbers while editing is a task for a script *outside* of gschem
means you truly don't understand how people edit schematics.


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


Re: gEDA-user: gschem guile scripting

2010-10-31 Thread Stefan Salewski
On Sun, 2010-10-31 at 14:15 -0600, John Doty wrote:

 
 Worrying about pin number visibility is not focusing on the work, but
 focusing on minor aspects of the presentation. That, of course, is the
 strength of fritterware.
 

Presentation may be the work, if you are writing a textbook. Indeed I
asked for something similar long time ago, but my desire was not big
enough to start hacking.

 
 PCB is the most troubled tool in the gEDA kit, not a good example for
 the path forward for the rest of the tools.
 

In my opinion PCB is much more complicated as gaf. My current
estimation: Writing a gschem/gnetlist clone may take about 1000 hours
for a smart guy employing modern tools like GTK/QT/Cairo/Pango and an OO
language like C++/Java/Puby/Python...
Writing a PCB clone should take much more time and needs really smart
guys -- DRC (realtime), all the exporters (Gerber), autorouters, and
fast 3D drawing.




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


Re: gEDA-user: gschem guile scripting

2010-10-31 Thread Bert Timmerman
Hi,

 -Original Message-
 From: geda-user-boun...@moria.seul.org 
 [mailto:geda-user-boun...@moria.seul.org] On Behalf Of Stefan Salewski
 Sent: Sunday, October 31, 2010 10:50 PM
 To: gEDA user mailing list
 Subject: Re: gEDA-user: gschem guile scripting
 
 On Sun, 2010-10-31 at 14:15 -0600, John Doty wrote:
 

... Some deleted stuff was here

 
 In my opinion PCB is much more complicated as gaf. My current
 estimation: Writing a gschem/gnetlist clone may take about 
 1000 hours for a smart guy employing modern tools like 
 GTK/QT/Cairo/Pango and an OO language like C++/Java/Puby/Python...
 Writing a PCB clone should take much more time and needs 
 really smart guys -- DRC (realtime), all the exporters 
 (Gerber), autorouters, and fast 3D drawing.
 
 

 
FYI according to ohloh.net:

gEDA approx. 31 person years effort (http://www.ohloh.net/p/gEDA)

Pcb approx. 32 person years effort (http://www.ohloh.net/p/pcb)

The difference in LOC is not much larger:

gEDA approx. 126k LOC (excluding blanks and comments).

Pcb approx. 127K LOC (excluding blanks and comments).

I think it's a draw ;-)

Kind regards,

Bert Timmerman



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


Re: gEDA-user: gschem guile scripting

2010-10-31 Thread Stefan Salewski
On Sun, 2010-10-31 at 22:12 +0100, Bert Timmerman wrote:

  
 FYI according to ohloh.net:
 
 gEDA approx. 31 person years effort (http://www.ohloh.net/p/gEDA)
 
 Pcb approx. 32 person years effort (http://www.ohloh.net/p/pcb)
 
 The difference in LOC is not much larger:
 
 gEDA approx. 126k LOC (excluding blanks and comments).
 
 Pcb approx. 127K LOC (excluding blanks and comments).
 
 I think it's a draw ;-)
 

Really interesting, I was not aware of such a page.

Of course I was talking about writing a clone, which is much less work
than writing the original. And for things like an schematic editor or
netlist generation we have today much support by OO languages and useful
libraries like cairo. For PCB stuff like DRC, autorouter  and Gerber
there is not much support. Personally I consider gaf bloated, by mixing
C/guile and splitting into so many parts. Why can gschem not do netlist
generation (optional in a non GUI mode) and do symbol checking. And
gattrib -- should be part of gschem too. Having PCB editor and
schematics editor separated is really a good choice, both tasks are very
different.

Best regards

Stefan Salewski




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


Re: gEDA-user: gschem guile scripting

2010-10-31 Thread bobo
On Sunday 31 October 2010, John Doty wrote:
 I am extremely grateful that gEDA is not fritterware, but
 concerned that it might become fritterware.

to fritter (third-person singular simple present fritters, 
present participle frittering, simple past and past participle 
frittered)
1. To occupy oneself idly or without clear purpose, to tinker 
with an unimportant part of a project, to dally, sometimes as a 
form of procrastination. 


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


gEDA-user: gschem guile scripting

2010-10-30 Thread Maciej Pijanka
Hello

I wanted to traverse all symbols placed on current sheet from some script
preferably invoked via ft, but so far found that even 
(add-menu) which worked before for example from pcb.scm, seems to not work on
gEDA/gschem version 1.6.1.20100214

any hints where to look?

i tried some simple scheme functions like adding (file-new) to my test.scm
and this works fine, but i didn't found any routine allowing to get list of 
items
neither some others which seem to require argument aren't working or i am not 
able
to find right arguments for them.


best regards
Maciej

-- 
Maciej Pijanka
I don't fear computers, I fear lack of them -- Isaac Asimov


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


Re: gEDA-user: gschem guile scripting

2010-10-30 Thread Oliver King-Smith
   Maciej,
   There is a small development script that allows you to drop into a
   guile shell on the gEDA website.  The shell auto completes so you can
   see a list of all available commands.  You can also try things live.
   I found this very helpful when I was starting out with gnetlist.  Here
   is the development script in case you can't find it.
   (use-modules (ice-9 readline))
   (activate-readline)

   (define (devel output-filename)
   (scm-style-repl)
   Oliver
 __

   From: Maciej Pijanka maciej.pija...@gmail.com
   To: geda-u...@seul.org
   Sent: Sat, October 30, 2010 4:50:43 PM
   Subject: gEDA-user: gschem guile scripting
   Hello
   I wanted to traverse all symbols placed on current sheet from some
   script
   preferably invoked via ft, but so far found that even
   (add-menu) which worked before for example from pcb.scm, seems to not
   work on
   gEDA/gschem version 1.6.1.20100214
   any hints where to look?
   i tried some simple scheme functions like adding (file-new) to my
   test.scm
   and this works fine, but i didn't found any routine allowing to get
   list of items
   neither some others which seem to require argument aren't working or i
   am not able
   to find right arguments for them.
   best regards
   Maciej
   --
   Maciej Pijanka
   I don't fear computers, I fear lack of them -- Isaac Asimov
   ___
   geda-user mailing list
   [1]geda-u...@moria.seul.org
   [2]http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

References

   1. mailto:geda-user@moria.seul.org
   2. http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


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