[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Switch gschem to another scripting language?



On Nov 22, 2009, at 7:24 PM, Kai-Martin Knaak wrote:

> On Sun, 22 Nov 2009 19:03:29 -0500, Dave McGuire wrote:
>
>> On Nov 22, 2009, at 6:24 PM, you wrote:
>>> 1.  There are lots of folks who whine about learning another  
>>> language.
>>> "I already know TCL, so why should I learn Scheme?"  As John Doty  
>>> says,
>>> this attitude stinks.
>
> The very same John D. complains about obscure C code in gnetlist  
> and how
> this prevents him from fixing what he diagnoses a major shortcoming...

Penetrating that code is *much* harder than, say, a gnetlist back  
end, despite the fact that I must have 1000X more experience with C  
than with Scheme. I've tried: it takes more time than I've been able  
to afford. And you've noted the difficulty here too, but you  
persevered and got through it. I appreciate that, and I wish we could  
collaborate on doing the fix right. Unfortunately, that involves  
laying the difficult part on you: I only understand the easy (Scheme)  
part.

Penetrating something that is excessively complex takes a lot of time  
that I simply don't have. On the other hand, the attitude I object to  
is the refusal to learn a simple tool merely because it's  
superficially unfamiliar. I'm also much more willing to spend time on  
a versatile tool than just a piece of code.

>
>
>>> It implies that the person with this attitude
>>> doesn't want to learn, which is a terrible attitude for a practicing
>>> engineer.
>
> Diagnosing groups of users wholesale a terrible attitude is not very
> constructive.

Unfortunately this attitude is common. I was taught never to take  
this attitude (by some rather arrogant physicists), but engineering  
professors apparently seem to implicitly teach students to accept  
narrow specialization.

>
>
>>>  I ignore those people since they whine about gEDA, but don't
>>> actually contribute code.
>
> Scaring away potential contributers is not a nice attitude either.
>
>
>>    Agreed 100%.  I don't want my tools dumbed-down because some of
>
> When it comes to scripting in geda, there is not much to  dumb down in
> the first place.

Oh, how wrong you are. gnetlist is the jewel of gEDA because it's so  
scriptable (even though it's not what it could be). And gEDA in  
general enables this physicist who's only a part-time electronics  
designer to tackle big projects largely because it's so scriptable in  
the Makefile sense.

>
>
>> the users are lazy and don't want to think.  We're not talking about
>> video games here...we're talking about tools required to do one of  
>> the
>> toughest forms of engineering in existence.
>
> We are talking about an application whose competitors have manged  
> to deal
> with scripting in a way that users actually can and do use. IMO it is
> fair to ask the same from geda and pcb.

Narrow, inflexible tools, not up to the gEDA standard.

>
>
>>> 2.  Some people think Scheme is hard.  It's not.  It *is* a  
>>> functional
>>> programming language (as opposed to a procedural language),
>
> Ack, this is a major reason why none of the various lisp dialects  
> never
> made it very far beyond academia. After all, it is much more  
> natural to
> think of a script as a procedure, that does something, rather than a
> function, that acts on something.

Thinking that way makes the job harder. Real professionals adapt  
their thinking to the job, rather than adapting the job to their  
ignorance.

>
>
>>> so it requires the programmer to think in a different way than
>>> the usual "step 1, do this, step 2, do that" way they are probably
>>> used to.
>
> You want to educate users on how to think properly. What an attitude!
>
> It is fine, if you think of scripts like functions rather than
> procedures. It is OK, if you build the geda tools to suit your  
> needs. But
> please don't even try impose your way of thinking on everyone else.

As I pointed out earlier, layering a BASIC atop Scheme would be  
pretty easy if that's really the problem. Of course, you should  
remember that many have sought a better notation for Lisp, but given  
up when it proved harder to use in practice than simple s- 
expressions. KISS.

>
>
>>    I experienced exactly this.
>
> I did not ;-)
> Yes, I used a RPN calculator a lot at a time. However, I didn't miss
> postfix too much when the calculator went legs up and got replaced  
> with
> an ordinary TI.
>
>
>>    To restate the point I made above in a different way, if someone
>> is confused by Scheme's parentheses, they'll probably be confused by
>> Ohm's law...and as such probably shouldn't be messing with an  
>> electronic
>> design automation suite in the first place.  Leave them behind.
>
> Let me frown on this attitude again.
> Developers should never, ever think of users as dumb creatures whose
> feedback needs to be ignored.

I'm at best a minor developer: a few gnetlist back ends. Pretty  
trivial (which is why I appreciate the real developers' work). As a  
user, I object to the sort of user who wants to dumb down the  
toolkit: channel it to match their narrowness.

>
>
>>> Nowadays, 10 years after gEDA was started, there are other  
>>> interpreters
>>> & languages available
>
> perl, php, or python were already popular back in 1999.

Where they embeddable in a toolkit then? I don't remember, but in any  
case I'm sure Ales was influenced by his MIT education here. Not a  
bad influence (but I'm prejudiced after two degrees and 25 years on  
the research staff).

>
>
>>> However, since nobody has actually stepped up to embedd one of
>>> those other interpreters into gEDA, we continue to use Scheme.
>
> Nobody will step up to achieve something the current developers  
> actively
> discourage.

I'd like to collaborate with you to get the attribute censorship fix  
right.

>
>
>> If someone pops up and replaces gEDA's Scheme with, say Python,
>
> Stefans question was not "Why scheme rather than Python?".
> It was: "Why scheme rather than C"?

OK, I'll answer that one. I like C, been using it for decades, but  
it's a "machine-independent assembly language", unsuited for high- 
level code.

>
>
>>    As far as the Scheme vs. Perl/Python/Ruby/whatever-is-cool-this-
>> week I say "don't fix it if it isn't broken"
>
> Did I miss something? Are there scripting capabilities in geda at all?

All those gnetlist back ends, and you ask?

> Yes, I mean real scripting -- A framework that allows me to write an
> algorithm that produces a working schematic when fed to gschem. Or a
> script that inserts a bandwidth reduction cap between every opamp  
> in the
> circuit, if its refdes is in the range U200-U500. Or a way to output a
> list of refdeses of the current selection? Or ...

The situation in gschem needs great deal of improvement. For  
gnetlist, the situation is better, but not yet optimal. Your fix for  
the attribute censorship bug would make this worse, which is why I  
oppose it. But if you really want to improve scriptability here, why  
won't you work with me to do this right?

>
>
>> ...and people whining about Scheme should grow a pair and spend the
>> whopping twenty minutes it'll take them to pick up enough Scheme to
>
> Would you mind come down from this elitist attitude?

Perhaps gEDA is EDA for elitists. Perhaps TeX is word processing for  
elitists. Perhaps actually studying the physical, mathematical, and  
logical foundations of what we're doing here is elitist. If that's  
so, I'm glad there remain tools for elitists.

>
>
>> be able to go nuts with their gEDA config files.
>
> Again, this is not about scheme-like syntax in dumb config files.  
> This is
> about the reason why large portions of geda internals are written in
> scheme. Please elaborate on this aspect.

The problem here is that not enough can be done in Scheme. See your  
"real scripting" complaint above.

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




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