<div dir="ltr">I don't understand.<div>You want a real scripting example that will work on linux but not on cygwin.</div><div>Is that correct?</div><div><br></div><div>Thanks,</div><div>Tal.</div><div><br><div class="gmail_quote">
On Mon, Nov 2, 2009 at 1:02 PM, Shahar Dag <span dir="ltr"><<a href="mailto:dag@cs.technion.ac.il">dag@cs.technion.ac.il</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Hello all</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">mix & match is just a buzzword.</font></div>
<div><font face="Arial" size="2">we need a real example that shows that 10 minutes
of shell scripting will save half a day of programming.</font></div>
<div><font face="Arial" size="2">(no, grep -v is not an example)</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">as for scripts & Windows</font></div>
<div><font face="Arial" size="2">Windows have many scripting capabilities. It is
true that we mostly ignore them (maybe becase they are complicated)</font></div>
<div><font face="Arial" size="2">1. batch files</font></div>
<div><font face="Arial" size="2">2. visual basic scrips (if you know how, you can
use any dll in the system to do a job for you)</font></div>
<div><font face="Arial" size="2">3. power shell</font></div>
<div><font face="Arial" size="2">4. and of course cygwin</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">make can be run on windows & even if you create
source dependencis, you still have to handle the dependency on header files.
</font><font face="Arial" size="2">The problem (almost) does not exist in IDE
environment (which is the windows way)</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Valgrind is an execelt tool (and it helped me a
lote) but it is relevant only for languages that do not have memory manegment
(C, C++, ...). Java programmers can laugth all the way to the
dedline</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Sorry, please think harder and come out with
somthing more convincing</font></div><div class="im">
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Thanks in advanced</font></div>
<div><font face="Arial" size="2">Shahar Dag</font></div>
<div><font face="Arial" size="2"></font> </div>
</div><blockquote style="padding-right:0px;padding-left:5px;margin-left:5px;border-left:#000000 2px solid;margin-right:0px"><div><div></div><div class="h5">
<div style="font:10pt arial">----- Original Message ----- </div>
<div style="background:#e4e4e4;font:10pt arial"><b>From:</b>
<a title="ladypine@gmail.com" href="mailto:ladypine@gmail.com" target="_blank">Orna Agmon
Ben-Yehuda</a> </div>
<div style="font:10pt arial"><b>To:</b> <a title="vadim.eisenberg@gmail.com" href="mailto:vadim.eisenberg@gmail.com" target="_blank">Vadim Eisenberg</a> </div>
<div style="font:10pt arial"><b>Cc:</b> <a title="haifux@haifux.org" href="mailto:haifux@haifux.org" target="_blank">Haifux</a> ; <a title="dag@cs.technion.ac.il" href="mailto:dag@cs.technion.ac.il" target="_blank">Shahar Dag</a> </div>
<div style="font:10pt arial"><b>Sent:</b> Monday, November 02, 2009 11:55
AM</div>
<div style="font:10pt arial"><b>Subject:</b> Re: [Haifux] advanced of
programming in Linux</div>
<div><br></div>
<div dir="ltr">I think the strong point is "The Unix Way", which is a mix and
match of tools, each good at doing a specific thing, by using shell , pipe and
make. Linux did not invent "The Unix Way", but like other FOSS, it provides
more options for the mix and match. Indeed many Unix systems are closed
source, and the Unix Way works there, too (better than it would work on
Windows, I expect). <br><br>A point specific to Linux and Intel/AMD is
valgrind, with which I nowadays solve memory issues within seconds of
programmer time. Solving similar problems before I had Linux took me weeks
sometimes (for a code I was not familiar with, of tens of thousands of lines),
and sometimes I just gave up.<br><br>
<div class="gmail_quote">On Mon, Nov 2, 2009 at 11:16 AM, Vadim Eisenberg <span dir="ltr"><<a href="mailto:vadim.eisenberg@gmail.com" target="_blank">vadim.eisenberg@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="padding-left:1ex;margin:0pt 0pt 0pt 0.8ex;border-left:rgb(204,204,204) 1px solid">
<div lang="EN-US" vlink="purple" link="blue">
<div>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31,73,125)">I
would like to present some points of a devil's advocate (some smart students
can raise these counterclaims during the lecture) :</span></p>
<p><span style="font-size:11pt;color:rgb(31,73,125)"><span>1.<span style="font:7pt 'Times New Roman';font-size-adjust:none;font-stretch:normal">
</span></span></span><span dir="ltr"></span><span style="font-size:11pt;color:rgb(31,73,125)">You can run batch files also
on Windows (it for sure is less convenient than shell scripts on Unix, but
it is not impossible)</span></p>
<p><span style="font-size:11pt;color:rgb(31,73,125)"><span>2.<span style="font:7pt 'Times New Roman';font-size-adjust:none;font-stretch:normal">
</span></span></span><span dir="ltr"></span><span style="font-size:11pt;color:rgb(31,73,125)">You can use Ant instead of
makefile (it is also less convenient than makefile + shell scripts, but is
still possible)</span></p>
<p><span style="font-size:11pt;color:rgb(31,73,125)"><span>3.<span style="font:7pt 'Times New Roman';font-size-adjust:none;font-stretch:normal">
</span></span></span><span dir="ltr"></span><span style="font-size:11pt;color:rgb(31,73,125)">You can use Perl on
Windows</span></p>
<p><span style="font-size:11pt;color:rgb(31,73,125)"><span>4.<span style="font:7pt 'Times New Roman';font-size-adjust:none;font-stretch:normal">
</span></span></span><span dir="ltr"></span><span style="font-size:11pt;color:rgb(31,73,125)">UNIX remark: I guess all the
tools you mention pertain to Unix also, so in general you provide points for
learning Unix tools, not necessary Linux ones. In particular, you probably
can use them on cygwin on Windows.</span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31,73,125)"></span> </p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31,73,125)">In
general, my suspicion is that anything you can do in Unix, you can do also
in Windows, but in a less convenient/less productive way. </span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31,73,125)"></span> </p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31,73,125)">I
hope not to make anybody here angry by providing such heretic
remarks.</span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31,73,125)"></span> </p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31,73,125)">Regards,</span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31,73,125)">Vadim</span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31,73,125)"></span> </p>
<div style="border-right:medium none;padding-right:0cm;border-top:medium none;padding-left:4pt;padding-bottom:0cm;border-left:1.5pt solid;padding-top:0cm;border-bottom:medium none">
<div>
<div style="border-right:medium none;padding-right:0cm;border-top:rgb(181,196,223) 1pt solid;padding-left:0cm;padding-bottom:0cm;border-left:medium none;padding-top:3pt;border-bottom:medium none">
<p class="MsoNormal"><b><span style="font-size:10pt">From:</span></b><span style="font-size:10pt"> <a href="mailto:haifux-bounces@haifux.org" target="_blank">haifux-bounces@haifux.org</a> [mailto:<a href="mailto:haifux-bounces@haifux.org" target="_blank">haifux-bounces@haifux.org</a>] <b>On Behalf Of </b>Orna Agmon
Ben-Yehuda<br><b>Sent:</b> Monday, November 02, 2009 10:51 AM<br><b>To:</b>
Shahar Dag<br><b>Cc:</b> Haifux<br><b>Subject:</b> Re: [Haifux] advanced of
programming in Linux</span></p></div></div>
<div>
<div></div>
<div>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal" style="margin-bottom:12pt">I often see people spending
approximately an hour each time, trying to understand why their change was
not included in the executable. The answer is usually - because they forgot
to insert the source into the list of sources in the makefile. When I show
them how to automatically create a list of sources and compile them all,
with the correct dependencies, the problem is forever solved.<br><br>I use a
makefile to build Haifux's site automatically in two languages, while
compiling lists of lectures in different pages.<br><br>I use make to
properly build latex files, including the second pass required for
bibtex.<br><br>I use make ,diff, head to create automatic tests (regression
tests) for various programs, compare them automatically with previous
results, and produce a report of added capabilities, lost capabilities,
changes requiring the attention of a professional.<br><br>I use make and
perl to create parametric sweep runs (batch runs with different input
parameters in each run). I specifically use here the inherent quality of
make, to work according to the date of targets, so that if the parametric
sweep was disturbed in the middle, only runs older than the executable and
input file are re-run.</p>
<div>
<p class="MsoNormal">2009/11/1 Shahar Dag <<a href="mailto:dag@cs.technion.ac.il" target="_blank">dag@cs.technion.ac.il</a>></p>
<div>
<div>
<p class="MsoNormal"><span>Hello</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span>To extent Elli's question:</span></p>
<p class="MsoNormal"><span>We try to convince our students that programming on
Linux is easier / faster relative to Windows, so they better learn how to
work with Linux.</span></p>
<p class="MsoNormal"><span></span> </p>
<p class="MsoNormal"><span>We claim that using the build in shell commands and
pipes we can compose a solution for complex problem (almost) without
programming.</span></p>
<p class="MsoNormal"><span></span> </p>
<p class="MsoNormal"><span>Can you point us for real life examples that prove
our claims? </span></p>
<p class="MsoNormal"><span></span> </p>
<p class="MsoNormal"><span>Thanks in advanced</span></p>
<p class="MsoNormal"><span style="font-size:10pt">Shahar Dag<br>System &
Software Development Laboratory (SSDL)<br>Computer Science
Department<br>Technion - Israel Institute of Technology<br>Haifa,
Israel<br>Tel. 972-4-829-4880<br>Fax 972-4-829-4878</span></p></div></div>
<p class="MsoNormal" style="margin-bottom:12pt"><br>_______________________________________________<br>Haifux
mailing list<br><a href="mailto:Haifux@haifux.org" target="_blank">Haifux@haifux.org</a><br><a href="http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux" target="_blank">http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux</a></p>
</div>
<p class="MsoNormal"> </p></div></div></div></div></div></div></blockquote></div><br></div>
</div></div><p>
</p><hr><div class="im">
<p></p>_______________________________________________<br>Haifux mailing
list<br><a href="mailto:Haifux@haifux.org" target="_blank">Haifux@haifux.org</a><br><a href="http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux" target="_blank">http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux</a><br>
</div><p></p></blockquote></div>
<br>_______________________________________________<br>
Haifux mailing list<br>
<a href="mailto:Haifux@haifux.org">Haifux@haifux.org</a><br>
<a href="http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux" target="_blank">http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux</a><br>
<br></blockquote></div><br></div></div>