git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Don Slutz <Don.Slutz@SierraAtlantic.com>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Johannes Sixt <j.sixt@viscovery.net>, Jeff King <peff@peff.net>,
	Hannu Koivisto <azure@iki.fi>,
	git@vger.kernel.org
Subject: Re: Tests in Cygwin
Date: Fri, 08 May 2009 10:19:42 -0400	[thread overview]
Message-ID: <4A043F7E.5070702@SierraAtlantic.com> (raw)
In-Reply-To: <81b0412b0905080228j6b114631p35395464c0c98540@mail.gmail.com>

Here is some testing that does not require a sub-shell and does support 
options:

rhf2-1:~/tmp>foof() { local IFS='       ,+';local args="$*"; for i in 
$args; do echo i=$i; done; }
rhf2-1:~/tmp>foo1() { for i; do echo i=$i; done; }
rhf2-1:~/tmp>foo2() { for i in $*; do echo i=$i; done; }
rhf2-1:~/tmp>foo1 'a b c' d e+f g,h 'j  k'
i=a b c
i=d
i=e+f
i=g,h
i=j k
rhf2-1:~/tmp>foo2 'a b c' d e+f g,h 'j  k'
i=a
i=b
i=c
i=d
i=e+f
i=g,h
i=j
i=k
rhf2-1:~/tmp>foof 'a b c' d e+f g,h 'j  k'
i=a
i=b
i=c
i=d
i=e
i=f
i=g
i=h
i=j
i=k
rhf2-1:~/tmp>uname -a
CYGWIN_NT-5.1 rhf2-1 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin

Note: that should be IFS=$' \t+,' and $'j\tk' in case the mailer messes 
this up.   I did not use this bash special syntax.

So which should we go with? foo2() which does the original way or foof() 
which allows you to use ',' and '+', and spaces?
    -Don

-------- Original Message --------
Subject: Re: Tests in Cygwin
From: Alex Riesen <raa.lkml@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Date: 5/8/2009 5:28 AM
> 2009/5/8 Junio C Hamano <gitster@pobox.com>:
>   
>> Johannes Sixt <j.sixt@viscovery.net> writes:
>>
>>     
>>>>   +for prerequisite in $(echo "$1" | tr , ' ')
>>>>         
>>> So, you dislike the space separator, but you also dislike the IFS games
>>> that save a few new processes? ;) (Think of Windows, where fork is expensive).
>>>       
>> You can play IFS=, game, then ;-)
>>
>> I have to admit that it feels so 80'ish, back when our UNIX machines were
>> so slow that we tried to shave every fork+exec from our shell scripts by
>> using built-ins when possible, though.
>>     
>
> Well, on Windows (at least with Cygwin), it is 80's still. My workstation
> (a 2.4GHz P4, 70C hot, 2Gb Dell monster) is about 100x slower than my
> old Asus laptop (a 384Mb, 1200Ghz Pentium-M) in starting a trivial program
> ("int main() { return 0; }").
>
> I'm trying to save where possible on cygwin, whatever cost.
>   


__________________________________________________________________________________________________________________
DISCLAIMER:"The information contained in this message and the attachments (if any) may be privileged and confidential and protected from disclosure. You are hereby notified that any unauthorized use, dissemination, distribution or copying of this communication, review, retransmission, or taking of any action based upon this information, by persons or entities other than the intended recipient, is strictly prohibited. If you are not the intended recipient or an employee or agent responsible for delivering this message, and have received this communication in error, please notify us immediately by replying to the message and kindly delete the original message, attachments, if any, and all its copies from your computer system. Thank you for your cooperation." 
________________________________________________________________________________________________________________

  reply	other threads:[~2009-05-08 14:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-17  9:47 Tests in Cygwin Hannu Koivisto
2009-05-06 19:34 ` Don Slutz
2009-05-06 20:42   ` Junio C Hamano
2009-05-07  7:13     ` Johannes Sixt
2009-05-07 15:47       ` Don Slutz
2009-05-07 18:29         ` Don Slutz
2009-05-08  0:02         ` Junio C Hamano
2009-05-08  6:03           ` Johannes Sixt
2009-05-08  2:00         ` Jeff King
2009-05-08  6:02           ` Johannes Sixt
2009-05-08  6:41             ` Junio C Hamano
2009-05-08  9:28               ` Alex Riesen
2009-05-08 14:19                 ` Don Slutz [this message]
2009-05-08 14:28                   ` Johannes Sixt
2009-05-08 16:45                   ` Alex Riesen
2009-05-08  0:00       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A043F7E.5070702@SierraAtlantic.com \
    --to=don.slutz@sierraatlantic.com \
    --cc=azure@iki.fi \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    --cc=peff@peff.net \
    --cc=raa.lkml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).