--- On Tue, 9/1/09, Hans-Christoph Steiner <h...@at.or.at> wrote:

> From: Hans-Christoph Steiner <h...@at.or.at>
> Subject: Re: [PD] Pd META: Author/Help Patch Authors
> To: "Jonathan Wilkes" <jancs...@yahoo.com>
> Cc: pd-list@iem.at
> Date: Tuesday, September 1, 2009, 7:15 PM
> 
> On Sep 1, 2009, at 1:08 PM, Jonathan Wilkes wrote:
> 
> > --- On Tue, 9/1/09, Jonathan Wilkes <jancs...@yahoo.com>
> wrote:
> >
> >> From: Jonathan Wilkes <jancs...@yahoo.com>
> >> Subject: Re: [PD] Pd META: Author/Help Patch
> Authors
> >> To: "Hans-Christoph Steiner" <h...@at.or.at>
> >> Cc: pd-list@iem.at
> >> Date: Tuesday, September 1, 2009, 5:47 PM
> >>
> >>
> >> --- On Tue, 9/1/09, Hans-Christoph Steiner <h...@at.or.at>
> >> wrote:
> >>
> >>> From: Hans-Christoph Steiner <h...@at.or.at>
> >>> Subject: Re: [PD] Pd META: Author/Help Patch
> Authors
> >>> To: "Jonathan Wilkes" <jancs...@yahoo.com>
> >>> Cc: pd-list@iem.at
> >>> Date: Tuesday, September 1, 2009, 4:05 PM
> >>>
> >>> On Sep 1, 2009, at 12:41 AM, Jonathan Wilkes
> wrote:
> >>>
> >>>>
> >>>>
> >>>> --- On Tue, 9/1/09, Hans-Christoph Steiner
> <h...@at.or.at>
> >>> wrote:
> >>>>
> >>>>> From: Hans-Christoph Steiner <h...@at.or.at>
> >>>>> Subject: Re: [PD] Pd META: Author/Help
> Patch
> >>> Authors
> >>>>> To: "Jonathan Wilkes" <jancs...@yahoo.com>
> >>>>> Cc: pd-list@iem.at
> >>>>> Date: Tuesday, September 1, 2009, 5:00
> AM
> >>>>>
> >>>>> It is Pd, so I think we should at
> least make
> >> an
> >>> effort to
> >>>>> make things easy to parse in Pd. 
> I tried
> >>> your parser
> >>>>> using data that is probably closer to
> what
> >> we
> >>> might use, and
> >>>>> it didn't work at
> all.   If someone
> >>> can get a
> >>>>> Pd parser working that can handle the
> commas
> >> well,
> >>> then I
> >>>>> would be OK using commas in the meta
> data
> >> format.
> >>>>>
> >>>>> Here's my data:
> >>>>> tags - pure data, frequency
> modulation,
> >> synthesis
> >>>>
> >>>> Hi Hans,
> >>>>      I wouldn't expect my
> example
> >>> to work as a general solution.  If you
> >>>> want a general solution, I'd be happy to
> take a
> >> stab
> >>> at it, but you
> >>>> haven't said what you want Pd to do with
> the
> >> data
> >>> example you've provided
> >>>> above.
> >>>
> >>> Ah, sorry, I thought you'd followed the
> object_db.tcl
> >>> plugin discussion and the [pd META] discussion
> with
> >>> Frank.  Basically, the object_db.tcl
> plugin builds a
> >>> multilevel menu for finding objects based on
> tags.
> >> I'm
> >>> am sure people will think of other uses for
> the
> >> tags.
> >>> Frank suggested using comma separated tags in
> his [pd
> >>> REFERENCE] format, the PDDP group came to the
> >> conclusion
> >>> that the meta data should be easily parsable
> by Pd,
> >> and I
> >>> still think that's a good idea.
> >>>
> >>> So the idea is to have every help patch have a
> [pd
> >> META]
> >>> subpatch, and in it, have a comment with
> tags.
> >>>
> >>> .hc
> >>
> >> Oh, ok.  I'll have a look at that
> discussion.
> >>
> >> -Jonathan
> >
> > Yes, I have seen this discussion.  But I'm still
> confused: are commas
> > a problem in tcl?  If not, I still don't
> understand the problem (see
> > attached).
> >
> >
> > <file.pd><parser.pd>
> 
> 
> Tcl's not the problem, its Pd's parser.  It interprets
> commas as a  
> separator between messages.  Since there isn't an
> escape mechanism, it  
> means handling commas, semi-colons, etc. is difficult
> unless you are  
> wanting the behavior of Pd's parser.
> 
> If we use commas as the delimiter for individual tags, then
> just  
> removing the commas means you don't know if you have
> multi-word tags  
> or just single word tags.  So if you have:
> 
>     tags - frequency modulation, synth
> 
> and its parsed as:
> 
>     tags frequency modulation synth
> 
> then key information is lost.

Ok. (see attached)

-Jonathan

> 
> .hc
> 
> 
> ----------------------------------------------------------------------------
> 
> Programs should be written for people to read, and only
> incidentally  
> for machines to execute.
>   - from Structure and Interpretation of Computer
> Programs
> 
>


      
#N canvas 261 110 450 300 12;
#X text 46 42 TAG - foo \, bar \, blah blah \, blee blow blay \, bank
;
#N canvas 585 102 344 549 12;
#X obj 12 35 textfile;
#X msg 12 10 read file.pd \, rewind \, bang \, bang;
#X obj 12 60 route #X;
#X obj 12 85 route text;
#X obj 12 110 list split 2;
#X obj 52 278 list split 1;
#X obj 124 60 file;
#X text 170 60 <- file to be parsed;
#X obj 52 309 t b a;
#X obj 67 346 list;
#X obj 84 377 sel \,;
#X obj 109 442 t a;
#X obj 76 475 list;
#X obj 84 251 print before;
#X obj 52 224 t a a;
#X obj 109 415 list prepend;
#X obj 52 170 route TAG;
#X obj 52 197 route -;
#X obj 52 141 list trim;
#X obj 76 505 print parsed;
#X connect 0 0 2 0;
#X connect 1 0 0 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 1 18 0;
#X connect 5 0 8 0;
#X connect 5 1 9 1;
#X connect 5 2 12 0;
#X connect 5 2 15 1;
#X connect 8 0 9 0;
#X connect 8 1 10 0;
#X connect 9 0 5 0;
#X connect 10 0 15 1;
#X connect 10 0 12 0;
#X connect 10 1 15 0;
#X connect 11 0 12 1;
#X connect 11 0 15 1;
#X connect 12 0 19 0;
#X connect 14 0 5 0;
#X connect 14 1 13 0;
#X connect 15 0 11 0;
#X connect 16 0 17 0;
#X connect 17 0 14 0;
#X connect 18 0 16 0;
_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to