www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2011/12/04/17:19:56

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=JQm/IfX9jUL1D9fMqUCgtxmeUCh4JnJHcyLdzq7dcOo=;
b=xl+YhwNSg8QScUcFOKw+hcRO2xmxAzjqxuYn6WDUDDeH79L+RK5BfB6uq0WbUBa26V
PP6VE5A35oZAgU+GB+4F9eRJyS6/Sx2WAhKMTNvL36y109JbB2FaAx8rhr9sRj3h30Ts
c5JQOi7UTAcug9karFRyN5g14r2JRakXHu46g=
MIME-Version: 1.0
In-Reply-To: <20111203215549.238A581D5424@turkos.aspodata.se>
References: <CAAVSQ3vnFZkWdWn=LCbf+WSM0vOx9pwW+OaeTs47EdO8nfmC_w AT mail DOT gmail DOT com>
<20111130211002 DOT 32B5081F6275 AT turkos DOT aspodata DOT se>
<CAAVSQ3tkg3es-uBn+yFroysi5xAOtNqW5hTs2yAWQfo47rUaVQ AT mail DOT gmail DOT com>
<20111203133340 DOT E09A181D541B AT turkos DOT aspodata DOT se>
<CAAVSQ3tQLSsBoCjzDE+qAGrVAzCJKzocACyMOkxVBPUqyLBD7Q AT mail DOT gmail DOT com>
<20111203215549 DOT 238A581D5424 AT turkos DOT aspodata DOT se>
Date: Sun, 4 Dec 2011 23:19:21 +0100
Message-ID: <CAAVSQ3uJh64W9wxMof1FS4swK3amYrX0eAqyS+e-nd1vOGJSQA@mail.gmail.com>
Subject: Re: [geda-user] Dynamic loading personal components (with subfolder)
into the search component tree of gschem
From: Luigi Salvatore Palese <ultrabit AT gmail DOT com>
To: geda-user AT delorie DOT com
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

--0016363b7f600a648a04b34b9871
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Sat, Dec 3, 2011 at 10:55 PM, Karl Hammar <karl AT aspodata DOT se> wrote:

> Luigi:
> > On Sat, Dec 3, 2011 at 2:33 PM, Karl Hammar <karl AT aspodata DOT se> wrote:
> ...
> > To manage $HOME substitution you need getenv:
> >   (component-library-add-tree "cvs" (build-path (getenv "HOME")
> "/Net/cvs/
> > cvs.gedasymbols.org/www/user"))
>
> Hmm, my c version [1] got that for free. How should I do to take a
> string and substitute all $VAR's, it's annoying to do that manually
> in the gafrc file ?
>

libgeda already has s_expand_env_variables() method to do this, but is not
exported to scm (as i can see).
Before start writing new code someone could ask to developers if is it
possible to export it for use in guile.


> ...
> > > "personal/Generic capacitors"
> > > "personal/Generic capacitors/AVX Capacitors"
> > >
> > >
> > The version in attachment builds description in that way.
> > Now the first parameter is a prefix which adds to the folders.
> > The second parameter is the main folder and will be excluded from the
> > description string.
> >
> > so as example a line such:
> > (component-library-add-tree "cvs" (build-path (getenv "HOME") "/Net/cvs=
/
> > cvs.gedasymbols.org/www/user"))
> >
> > will produce as result:
> > cvs/Capacitors
> > cvs/Capacitors/AVX
> > ...
>
> Your script works fine, except that there can be a lot of directories
> without .sym files, see attachment to see what can happen.
>

I know this issue. I'm working on a fast method to solve this...


> BTW, wouldn't it be easier to write 'directory instead of
> (string->symbol "directory") ?
>

Sometimes i need strong mental concentration (especially when my children
are playing near me ) ;-)



Your script is much faster than mine [2], how could I speed it up?
>
>
Maybe the hash computation for each file could be the problem.


> Regards,
> /Karl Hammar
>
> [1] http://archives.seul.org/geda/user/May-2011/msg00556.html
> [2]
> http://www.delorie.com/archives/browse.cgi?p=3Dgeda-user/2011/12/03/15:41=
:27
>
> -----------------------------------------------------------------------
> Asp=F6 Data
> Lilla Asp=F6 148
> S-742 94 =D6sthammar
> Sweden
> +46 173 140 57
>
>
Regards,
Luigi

--0016363b7f600a648a04b34b9871
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Sat, Dec 3, 2011 at 10:55 PM, Karl Ha=
mmar <span dir=3D"ltr">&lt;<a href=3D"mailto:karl AT aspodata DOT se">karl AT aspodat=
a.se</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Luigi:<br>
<div class=3D"im">&gt; On Sat, Dec 3, 2011 at 2:33 PM, Karl Hammar &lt;<a h=
ref=3D"mailto:karl AT aspodata DOT se">karl AT aspodata DOT se</a>&gt; wrote:<br>
</div>...<br>
<div class=3D"im">&gt; To manage $HOME substitution you need getenv:<br>
&gt; =A0 (component-library-add-tree &quot;cvs&quot; (build-path (getenv &q=
uot;HOME&quot;) &quot;/Net/cvs/<br>
&gt; <a href=3D"http://cvs.gedasymbols.org/www/user" target=3D"_blank">cvs.=
gedasymbols.org/www/user</a>&quot;))<br>
<br>
</div>Hmm, my c version [1] got that for free. How should I do to take a<br=
>
string and substitute all $VAR&#39;s, it&#39;s annoying to do that manually=
<br>
in the gafrc file ?<br></blockquote><div><br>libgeda already has s_expand_e=
nv_variables() method to do this, but is not exported to scm (as i can see)=
. <br>Before start writing new code someone could ask to developers if is i=
t possible to export it for use in guile.<br>
<br></div><blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.=
8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
...<br>
<div class=3D"im">&gt; &gt; &quot;personal/Generic capacitors&quot;<br>
&gt; &gt; &quot;personal/Generic capacitors/AVX Capacitors&quot;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; The version in attachment builds description in that way.<br>
&gt; Now the first parameter is a prefix which adds to the folders.<br>
&gt; The second parameter is the main folder and will be excluded from the<=
br>
&gt; description string.<br>
&gt;<br>
&gt; so as example a line such:<br>
&gt; (component-library-add-tree &quot;cvs&quot; (build-path (getenv &quot;=
HOME&quot;) &quot;/Net/cvs/<br>
&gt; <a href=3D"http://cvs.gedasymbols.org/www/user" target=3D"_blank">cvs.=
gedasymbols.org/www/user</a>&quot;))<br>
&gt;<br>
&gt; will produce as result:<br>
&gt; cvs/Capacitors<br>
&gt; cvs/Capacitors/AVX<br>
&gt; ...<br>
<br>
</div>Your script works fine, except that there can be a lot of directories=
<br>
without .sym files, see attachment to see what can happen.<br></blockquote>=
<div><br>I know this issue. I&#39;m working on a fast method to solve this.=
..<br>=A0<br></div><blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0=
pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;=
">

BTW, wouldn&#39;t it be easier to write &#39;directory instead of<br>
(string-&gt;symbol &quot;directory&quot;) ?<br></blockquote><div>=A0</div><=
div>Sometimes i need strong mental concentration (especially when my childr=
en are playing near me ) ;-) <br><br></div><blockquote class=3D"gmail_quote=
" style=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, =
204); padding-left: 1ex;">

=A0</blockquote><blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt =
0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Your script is much faster than mine [2], how could I speed it up?<br>
<br></blockquote><div><br>Maybe the hash computation for each file could be=
 the problem.<br>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin=
: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-lef=
t: 1ex;">

Regards,<br>
/Karl Hammar<br>
<br>
[1] <a href=3D"http://archives.seul.org/geda/user/May-2011/msg00556.html" t=
arget=3D"_blank">http://archives.seul.org/geda/user/May-2011/msg00556.html<=
/a><br>
[2] <a href=3D"http://www.delorie.com/archives/browse.cgi?p=3Dgeda-user/201=
1/12/03/15:41:27" target=3D"_blank">http://www.delorie.com/archives/browse.=
cgi?p=3Dgeda-user/2011/12/03/15:41:27</a><br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
-----------------------------------------------------------------------<br>
Asp=F6 Data<br>
Lilla Asp=F6 148<br>
S-742 94 =D6sthammar<br>
Sweden<br>
<a href=3D"tel:%2B46%20173%20140%2057" value=3D"+4617314057">+46 173 140 57=
</a><br>
<br>
</div></div></blockquote></div><br>Regards,<br>Luigi<br>

--0016363b7f600a648a04b34b9871--

- Raw text -


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