[jamming] Command built-in questions (was Re: Executing shellcommand, save results to variable)
Brian Osman
osman at vvisions.com
Wed Mar 21 12:20:09 PST 2007
True, but from that point, my argument would be that 'lines' should be the
default behavior. It's trivial to parse a given line (from an array of
lines) into the words using the Match rule.
It's VERY difficult to take an array of words (that might have been multiple
lines), and split them into sub-lists that are the original lines.
-Brian
----- Original Message -----
From: "John Waugh" <john.waugh at gmail.com>
To: "Sanel Zukan" <sanelz at gmail.com>
Cc: <jamming at perforce.com>
Sent: Wednesday, March 21, 2007 3:55 PM
Subject: Re: [jamming] Command built-in questions (was Re: Executing
shellcommand, save results to variable)
> What are examples of when people would use 'words' ?
>
> I can imagine many examples of using 'lines' since so many commandline
> tools are line-oriented, and as Sanel mentioned, you often know on
> what line the info you want exists, though not necessarily what
> particular word(s).
>
> That said, I'm fairly ambivalent - the 'words' behavior seems more
> elegant and jam-esque.
> Either one can be accomplished by setting environment variables from a
> wrapper script.
>
> Too bad Jam doesn't have multidimensional arrays, then you could have
> an array of lines, each being an array of words...
>
> -John
>
>
>
> On 3/21/07, Sanel Zukan <sanelz at gmail.com> wrote:
>> > ok, I've tested it yesterday night on my build. It seems that "popen"
>> > is
>> > an issue in Win32 with at least Watcom C++ and Digital Mars C++ which
>> > don't
>> > I think we're going to need a proper Win32 implementation in the
>> > sources.
>>
>> AFAIK, it is been problem on Win32 for an ages, and no one provided an
>> good
>> alternative for unix implementation. I didn't used it on Win32 side and
>> not sure what are pros/cons of current implementation, but after quick
>> search I found some alternative on qt list:
>> http://lists.trolltech.com/qt-interest/1999-09/thread00282-0.html
>>
>> I am not able to decipher german comments, but hoping this can be good
>> starting point.
>>
>> > - is there some serious use to the "mixed" and "lines" cases ? we
>> > really don't want
>> > to turn Jamfiles into parsing programs, don't we.
>>
>> For "lines" (thought): for example we know that program outputs our
>> interested data on second or third line (gcc -v for example). But this
>> is probably better to be handled via external script, keeping jam source
>> simple.
>>
>> > - which default behaviour would you prefer ? (I'm for "words", but
>> > YMMV)
>>
>> I am for "words" too (and only "words" :)).
>>
>> --
>> Sanel
>> _______________________________________________
>> jamming mailing list - jamming at perforce.com
>> http://maillist.perforce.com/mailman/listinfo/jamming
>>
> _______________________________________________
> jamming mailing list - jamming at perforce.com
> http://maillist.perforce.com/mailman/listinfo/jamming
>
>
More information about the jamming
mailing list