Re: [Haifux] My Stop Using (and Teaching) C-Shell and Tcsh Page

2007-10-25 Thread Nadav Har'El
On Thu, Oct 18, 2007, Orr Dunkelman wrote about Re: [Haifux] My Stop Using 
(and Teaching) C-Shell and Tcsh Page:
 Exactly. The point is not to teach the beauty of shell scripting.
 I suggest you'll approach the lecturers in charge to get a better
 understanding why they teach this shell rather than that shell (like Eyal
 did).

I was disappointed when the reply that some profesor sent here. Sure, csh
*can* be used as a tool to help compile and test software. But shells can,
and are, used for more. So if you go and teach a shell, why not go and teach
the one that is widely believed to be better, and scripts in it are 100 times
more common in the wild then in the other shells?

I'm not saying you *have* to teach a shell - after all, the Technion teaches
CS, not system administration, but if you do decide to teach a shell, why
not teach one which is at least good, common, or both? (I argue that csh is
neither).

By the way, when I was in my first semester (1991...), the Technion still
taught Pascal, not C. This later changed. Why? They could still teach all
the algorithms and data structures and so on in Pascal, and Pascal compilers
were still widely available. But they finally realized that most of the world
has moved on to C, and in the following semesters, students are 10 times more
likely to see C code than Pascal code, so if they want to teach just one
languge, it should be C, not Pascal. Similarly, I think with the shells - if
you - for whatever reason at all - decide to teach ONE shell, it should be the
bourne shell, not csh.

You don't even need to teach any extensions specific to bash, ksh or zsh.
Just teach vanilla Bourne Shell stuff. It's not complicated, and will come
in handy for the students in the future  - while they'll never ever see a csh
script outside the technion (I think I saw one csh script in the 13 years
since I graduated).

 Yes and no.
 Unlike what many people think, installing software on a server with multiple
 users is not as simple as running yum/rpm/whatever your distro is using.
 It is an obligation by the staff to support, update (to some extent), insure
 backward competability (in the case of updates), etc. The claim that It's
 easy to install is wrong for systems which you do not own, nor understand
 all the technical (or political) aspects related to.

As someone who did function as a sysadmin on the Technion (not on t2, a
smaller system, but still one with many users), let me tell you - yes -
installing bash *is* easy. I don't remember bash ever having any installation
or compatibility issues. In any case, even if bash isn't installed on t2
(and I'd seriously doubt that - last time I heard, t2 was a Linux system today)
what about ksh, which has been part of Solaris for many many years?  Or
simply, sh?


-- 
Nadav Har'El|   Thursday, Oct 25 2007, 13 Heshvan 5768
[EMAIL PROTECTED] |-
Phone +972-523-790466, ICQ 13349191 |Always go to other people's funerals,
http://nadav.harel.org.il   |otherwise they won't come to yours.
___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


Re: [Haifux] My Stop Using (and Teaching) C-Shell and Tcsh Page

2007-10-20 Thread Michael Vasiliev
On Friday October 19 2007, Shlomi Fish wrote:
 Hi Orr!

 For some reason, I'm receiving the emails that you send to me, but not the
 emails you send to the mailing list. It's a bit annoying. And I do receive
 emails that get sent to the mailing list.

I believe there is a mailman setting for not sending the same message twice. 
Check out the web interface for your list subscription.



-- 
Sincerely Yours,
Michael Vasiliev

There's no heavier burden than a great potential.
___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


Re: [Haifux] My Stop Using (and Teaching) C-Shell and Tcsh Page

2007-10-20 Thread Shlomi Fish
On Saturday 20 October 2007, Shachar Shemesh wrote:
 Shlomi Fish wrote:
  Hi Orr!
 
  For some reason, I'm receiving the emails that you send to me, but not
  the emails you send to the mailing list. It's a bit annoying. And I do
  receive emails that get sent to the mailing list.

 Go to your accounts setup on the list, and remove the nodups setting.


Thanks!

Hopefully, it will resolve this problem.

Regards,

Shlomi Fish

-
Shlomi Fish  [EMAIL PROTECTED]
Homepage:http://www.shlomifish.org/

If it's not in my E-mail it doesn't happen. And if my E-mail is saying
one thing, and everything else says something else - E-mail will conquer.
-- An Israeli Linuxer
___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


Re: [Haifux] My Stop Using (and Teaching) C-Shell and Tcsh Page

2007-10-20 Thread Shlomi Fish
On Friday 19 October 2007, Orr Dunkelman wrote:
 On 10/19/07, Shlomi Fish [EMAIL PROTECTED] wrote:
  Hi Orr!
 
  For some reason, I'm receiving the emails that you send to me, but not
  the emails you send to the mailing list. It's a bit annoying. And I do
  receive emails that get sent to the mailing list.

 I don't know what is the cause of the problem.


As it turned out the problem was that I had the no duplicates option turned 
on for my account in the mailing list.

 I can only conjecture that you procmail me...


I don't filter you. I filter the Haifux mailing list based on the List-Id: 
header, but that's all. I should note that I'm not using procmail to filter 
my messages, but rather the KMail built-in filtering system. It's kind-of 
lame, but it has very good integration with KMail, so if I move a mailbox, it 
will also be moved in the filters.

  Exactly. The point is not to teach the beauty of shell scripting.
 
 
  Then what is the point? To teach a crippled programming language, not
  unlike
  many others?

 Actually - yes.
 The idealized version of the world where you teach only the useful staff is
 far from being right for education due to many reasons. For example, the CS
 dept. of the Technion still uses the assembler of PDP11 to teach assembler.
 Now, if I had to change anything in CS in second semester, I would start
 with PDP11 and not with CSH. 

I don't care particularly which Assembly[1] language students learn, as long 
as they do learn Assembly, and this Assemebly allows them to learn anything 
they need, and it is taught right. I was told there are reasons for teaching 
PDP-11 Assembly (or in EE's case - VAX Assembly).

However, teaching C-shell is Evil from the reasons I gave, and should be 
corrected.

{
[1] - Assembly is the language, while Assembler is the program that translates 
it to machine code.
}

 The reason for that is (hopefully obvious). On 
 the other hand, the students will not gain much from this transition (in
 the overall). On one hand, now they'll know assembler of i386 (which is
 certainly more useful). On the other hand, now they'll have to spend lots
 and lots of time on addressing the long jump vs. the short jump (and we are
 not getting into the problems of 64-bit addresses!). So all in all, they
 still teach PDP11 because they have a good reason (because they want to
 teach the idea behind assembler, and not how to write assembly code for
 i386. Once you get the general idea of assembly, switching from PDP11 to
 i386 is only small details).


Right.

 So I guess teaching TCSH had its merits in the past. You will need to ask
 the teachers why they teach this.


Perhaps they wanted Tcsh because it had better interactive features than 
Bourne Shell (/bin/sh) had.

  I suggest you'll approach the lecturers in charge to get a better
 
   understanding why they teach this shell rather than that shell (like
 
  Eyal
 
   did).
 
  Maybe I will. But I still think my Anti-csh page was a good idea for
  concentrating all the arguments in one place.

 An Anti- page is always the wrong place to start any of these things.


Why?

   As for the beauty thing - beauty is in the eye of the beholder.
 
  True, but I think we all can agree that shell scripting without sed, awk,
  find, and much less Perl or whatever, is much less beautiful than shell
  scripting with them. And I don't see a point in teaching it this way.

 No. We do not agree on that.

 I used to do shell scripting in DOS (batch files), where sed, awk, and
 other cool stuff were not available.

DOS has a poor excuse for a shell. Someone told me that 100-lines of DOS Batch 
files he wrote ended up as 50 lines of C. The Windows NT shell (CMD.EXE) is 
much better, but still very bad in comparison to what Bash offers.

Windows is going to have the so-called Windows PowerShell - 
http://en.wikipedia.org/wiki/Windows_PowerShell , which is based on .NET, 
more high-level, and Windows-specific. And naturally, you can install bash or 
zsh on Windows using cygwin or a different Windows emulation.


 And we are talking about concepts. I find the concept of using a smaller
 instruction set to be actually more elegant then using many commands (think
 of interoperability of a DOS batch file between various windows
 distributions without any real support for stuff).

Well, as much as a smaller instruction set has its merits, tools like find, 
sed (or its equivalents), etc. are an integral part of shell scripting and 
good shell programmers are expected to put them into good use.

Like it or not a small amount of primitives, can and usually is too limiting. 
Consider for example what Bjarne Stroustrup writes in 
http://public.research.att.com/~bs/bs_faq.html#Java :


Much of the relative simplicity of Java is - like for most new languages -
partly an illusion and partly a function of its incompleteness. As time
passes, Java will grow significantly in size and complexity. It will double
or triple in 

Re: [Haifux] My Stop Using (and Teaching) C-Shell and Tcsh Page

2007-10-19 Thread Shlomi Fish
Hi Orr!

For some reason, I'm receiving the emails that you send to me, but not the 
emails you send to the mailing list. It's a bit annoying. And I do receive 
emails that get sent to the mailing list.

On Thursday 18 October 2007, Orr Dunkelman wrote:
 On 10/18/07, Shlomi Fish [EMAIL PROTECTED] wrote:
  Indeed. I always find it a curious fact when Matam/Mamat students were
  instructed to solve exercises without using sed or awk, or in one line of
  C-shell. This may indicate that they want to design clever exercises, but
  not
  to really teach the beauty of shell scripting.

 Exactly. The point is not to teach the beauty of shell scripting.


Then what is the point? To teach a crippled programming language, not unlike 
many others?

 I suggest you'll approach the lecturers in charge to get a better
 understanding why they teach this shell rather than that shell (like Eyal
 did).

Maybe I will. But I still think my Anti-csh page was a good idea for 
concentrating all the arguments in one place.


 As for the beauty thing - beauty is in the eye of the beholder.


True, but I think we all can agree that shell scripting without sed, awk, 
find, and much less Perl or whatever, is much less beautiful than shell 
scripting with them. And I don't see a point in teaching it this way.

  Well, from what I understood, up to a point TX still carried a Perl that
  was
  9-years-old or so (Nadav can fill the details). But even if it didn't
  carry
  bash, then bash was easily installable there.

 Yes and no.

 Unlike what many people think, installing software on a server with
 multiple users is not as simple as running yum/rpm/whatever your distro is
 using.

 It is an obligation by the staff to support, update (to some extent),
 insure backward competability (in the case of updates), etc. The claim that
 It's easy to install is wrong for systems which you do not own, nor
 understand all the technical (or political) aspects related to.


Well, you can always install bash under some obscure path 
(like /usr/local/DO-NOT-USE/gnu/bin). That way it would be useful for the 
people doing the exercises, but people will know not to rely on it. And from 
what is said here:

http://tech.groups.yahoo.com/group/hackers-il/message/4881

Maintaining tcsh is quite an headache in itself. This is while bash tends to 
be pretty straightforward to maintain.

   Seeing as C and shell-scripting are used for inherently different
 
  purposes,
 
   I do not see why this is an advantage; furthermore, I think that in the
   exercises which are being taught, far too much stress is being put on
 
  loops
 
   and if statemenets; Too little on effective usage of  and ||
   operators. Also, extremely useful unix commands such as sed and find
   are not taught, and I have actually seen an exercise given in the
   course
 
  where
 
   the students implement a crippled version of find. More relevant uses
 
  for
 
   shell scripts are never brought as an example - students are not shown,
 
  for
 
   example, how to use them in conjunction with make in order to create
   a test suite for their programs. If you want to teach scripting - use a
   scripting language (preferably something more organized than perl, like
   Python). If you want to teach SHELL scripting, the exercises must be
   relevant to that style of programming.
 
  Right.

 Please note that the idea is not to teach UNIX, but to teach on the
 existance of a tool called shell scripting.

Correct.

 For us it is very easy to say yeah, this can be solved by find. But these
 students need to learn how to implement find in a crippled scripting
 language, because when they'll leave the academy and go to the dark side,
 a.k.a., industry, they will have to work on machines which are not even
 POSIX complaint!

And I expect these machines to have an equivalent to a find command. Or you 
can compile GNU find there.

But back to our point - yes, students should know how to implement something 
like find. But it's not a good practice to use it in one's shell script, not 
the right way to do it, and that's what find (which will take some time to 
implement properly by hand) is meant for.

An exercise of implementing a find-like command without using find may be a 
good one, but find should also be taught.


 People, please remember we are talking on a degree in computer science (or
 EE), i.e., you do not learn JAVA, you learn OOP methodology (for example,
 by using JAVA). These two things are completely different.

First of all, it's not JAVA it's Java. Secondly, I agree, but if you learn 
shell scripting, then find is part of shell scripting.


   * One-liners are not possible - blocks have to start on separate lines.
   This makes tcsh very uncomfortable to use in interactive mode.
 
  I know and I've explicitly mentioned it in my original article:
 
  
  Entire Bash mini-programs can be written, tested and debugged in one
  line. This is impossible to do in csh which forces loops to be on
 

Re: [Haifux] My Stop Using (and Teaching) C-Shell and Tcsh Page

2007-10-19 Thread Orr Dunkelman
On 10/19/07, Shlomi Fish [EMAIL PROTECTED] wrote:

 Hi Orr!

 For some reason, I'm receiving the emails that you send to me, but not the
 emails you send to the mailing list. It's a bit annoying. And I do receive
 emails that get sent to the mailing list.


I don't know what is the cause of the problem.

I can only conjecture that you procmail me...

 Exactly. The point is not to teach the beauty of shell scripting.
 

 Then what is the point? To teach a crippled programming language, not
 unlike
 many others?


Actually - yes.
The idealized version of the world where you teach only the useful staff is
far from being right for education due to many reasons. For example, the CS
dept. of the Technion still uses the assembler of PDP11 to teach assembler.
Now, if I had to change anything in CS in second semester, I would start
with PDP11 and not with CSH. The reason for that is (hopefully obvious). On
the other hand, the students will not gain much from this transition (in the
overall). On one hand, now they'll know assembler of i386 (which is
certainly more useful). On the other hand, now they'll have to spend lots
and lots of time on addressing the long jump vs. the short jump (and we are
not getting into the problems of 64-bit addresses!). So all in all, they
still teach PDP11 because they have a good reason (because they want to
teach the idea behind assembler, and not how to write assembly code for
i386. Once you get the general idea of assembly, switching from PDP11 to
i386 is only small details).

So I guess teaching TCSH had its merits in the past. You will need to ask
the teachers why they teach this.


 I suggest you'll approach the lecturers in charge to get a better
  understanding why they teach this shell rather than that shell (like
 Eyal
  did).

 Maybe I will. But I still think my Anti-csh page was a good idea for
 concentrating all the arguments in one place.


An Anti- page is always the wrong place to start any of these things.



  As for the beauty thing - beauty is in the eye of the beholder.
 

 True, but I think we all can agree that shell scripting without sed, awk,
 find, and much less Perl or whatever, is much less beautiful than shell
 scripting with them. And I don't see a point in teaching it this way.


No. We do not agree on that.

I used to do shell scripting in DOS (batch files), where sed, awk, and other
cool stuff were not available.

And we are talking about concepts. I find the concept of using a smaller
instruction set to be actually more elegant then using many commands (think
of interoperability of a DOS batch file between various windows
distributions without any real support for stuff).


  Well, from what I understood, up to a point TX still carried a Perl that
   was
   9-years-old or so (Nadav can fill the details). But even if it didn't
   carry
   bash, then bash was easily installable there.
 
  Yes and no.
 
  Unlike what many people think, installing software on a server with
  multiple users is not as simple as running yum/rpm/whatever your distro
 is
  using.
 
  It is an obligation by the staff to support, update (to some extent),
  insure backward competability (in the case of updates), etc. The claim
 that
  It's easy to install is wrong for systems which you do not own, nor
  understand all the technical (or political) aspects related to.
 

 Well, you can always install bash under some obscure path
 (like /usr/local/DO-NOT-USE/gnu/bin). That way it would be useful for the
 people doing the exercises, but people will know not to rely on it. And
 from
 what is said here:

 http://tech.groups.yahoo.com/group/hackers-il/message/4881

 Maintaining tcsh is quite an headache in itself. This is while bash tends
 to
 be pretty straightforward to maintain.


I am no longer a user of t2, but I would guess that they get the packages
for tcsh sent to them by the supplier.

And I would find the maintenance of both as easy to handle.



  For us it is very easy to say yeah, this can be solved by find. But
 these
  students need to learn how to implement find in a crippled scripting
  language, because when they'll leave the academy and go to the dark
 side,
  a.k.a., industry, they will have to work on machines which are not even
  POSIX complaint!

 And I expect these machines to have an equivalent to a find command. Or
 you
 can compile GNU find there.


Shlomi, I think you lack some experience in real life companies. In many
companies, you are not the owner of your machine (even in the CS dept., as
Eyal can attest). You are the user of the machine the company supplied you.
You cannot install whatever you like (due to legal issues, security reasons,
or personal vendettas (e.g., a system administrator who despises RMS
personally)). So you cannot do that.
Sorry.

What people who work on machines which do not even have a C compiler do?
(and btw, there are many such machines in the world, or more precisely, the
majority of them do not have C compiler). There is a 

Re: [Haifux] My Stop Using (and Teaching) C-Shell and Tcsh Page

2007-10-18 Thread Shlomi Fish
On Monday 15 October 2007, Ohad Lutzky wrote:
 A few more notes...

  I'll make it short (it's 1:35am here  :-)  without looking at the
  references
  (sorry, I'll look at them sometime later, but I doubt they will change
  my reply).  1. C-Shell is taught as a tool for manipulating programs
  (in MaTaM's view, especially for testing) - this answers also the Q
  of why scripting at all?  2. Students are not expected to become
  Csh experts (I may agree that some technical details that are taught
  are not necessary) but they are expect to understand its usefulness.
  In that respect - any scripting language will do, even Perl.

 Actually, a great deal of the problem I have is that  users aren't really
 shown the benefits of scripting - they are given that as a constraint. The
 exercises the students are given are, very often, solvable with one bash
 script using sed, and in extreme cases - a simple perl one-liner. There is
 an inherent problem designing a big exercise around shell scripting,
 which is inherently at its best for small, interactive assignments. The
 students don't learn to see shell scripting as a useful day-to-day tool,
 but as a convoluted programming paradigm.

Indeed. I always find it a curious fact when Matam/Mamat students were 
instructed to solve exercises without using sed or awk, or in one line of 
C-shell. This may indicate that they want to design clever exercises, but not 
to really teach the beauty of shell scripting.


  3. AFAIK all Technion servers are csh or tcsh (I don't know whether
  they provide bash) so it is the environment we have.

 Ever since I've been a Technion student, bash was installed on T2, csl1,
 and all of the farm boxes; I've never had access to TX, but I'd be
 extremely surprised if bash weren't installed there.

Well, from what I understood, up to a point TX still carried a Perl that was 
9-years-old or so (Nadav can fill the details). But even if it didn't carry 
bash, then bash was easily installable there.


  4. Coming to think of it, the resemblance with C is an advantage

  (despite the defects and defects of csh).

 Seeing as C and shell-scripting are used for inherently different purposes,
 I do not see why this is an advantage; furthermore, I think that in the
 exercises which are being taught, far too much stress is being put on loops
 and if statemenets; Too little on effective usage of  and ||
 operators. Also, extremely useful unix commands such as sed and find are
 not taught, and I have actually seen an exercise given in the course where
 the students implement a crippled version of find. More relevant uses for
 shell scripts are never brought as an example - students are not shown, for
 example, how to use them in conjunction with make in order to create a
 test suite for their programs. If you want to teach scripting - use a
 scripting language (preferably something more organized than perl, like
 Python). If you want to teach SHELL scripting, the exercises must be
 relevant to that style of programming.

Right.


 And two further notes on CSH itself:

 * It is sometimes non-deterministic, as testified by Matam students;

What do you mean by non-deterministic? Can you give an example.

 * One-liners are not possible - blocks have to start on separate lines.
 This makes tcsh very uncomfortable to use in interactive mode.

I know and I've explicitly mentioned it in my original article:


Entire Bash mini-programs can be written, tested and debugged in one line. 
This is impossible to do in csh which forces loops to be on separate lines. 


( http://www.shlomifish.org/open-source/anti/csh/ )

 * Its syntax is, in certain cases, much more complicated than bash's: Files
 are not auto-created when using the append () operator, and outputting to
 both
 an stderr and stdout file is a mess. In bash it's just command  outfile
 2 errfile, or for a combined version, command  combinedfile 21.

nod /

Regards,

Shlomi Fish

-
Shlomi Fish  [EMAIL PROTECTED]
Homepage:http://www.shlomifish.org/

If it's not in my E-mail it doesn't happen. And if my E-mail is saying
one thing, and everything else says something else - E-mail will conquer.
-- An Israeli Linuxer
___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


Re: [Haifux] My Stop Using (and Teaching) C-Shell and Tcsh Page

2007-10-18 Thread Shlomi Fish
On Wednesday 10 October 2007, Eyal Rozenberg wrote:
 After reading Shlomi's post, I decided to ask Yechiel Kimchi about the
 C-shell issue; here's the email exchange:

 

 Hello Yechiel,

 I hadn't really given the Matam course syllabus a look since I had taken
 it (with you) in 2001, but I continue to hear the what do they teach C
 shell for complaint, so today I visited last semester's course website
 and C shell is still there; I checked the FAQ for an answer to the
 question and I didn't find one.

 So, if it's not too much trouble for you to answer - how come C shell is
 still taught in the course, instead of less problematic and
 actually-used scripting shells like bash or ksh? This, in light of:

 http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
 http://www.grymoire.com/Unix/CshTop10.txt

 Of course, there's also the question of whether shell scripting should
 be at all taught as part of Matam, but that's a broader issue of what
 kinds of training should students get to work with / administer /
 program in UNIXish environments, so that's not what I'm asking

 Eyal

 PS - The answer to my question might belong in the FAQ :-)

 

 Shalom Eyal,

 First, thanks for you interet and comments.

 I'll make it short (it's 1:35am here  :-)  without looking at the
 references (sorry, I'll look at them sometime later, but I doubt they will
 change my reply).  1. C-Shell is taught as a tool for manipulating
 programs (in MaTaM's view, especially for testing) - this answers also the
 Q of why scripting at all?  

The same argument can be said in favour of Bash.

 2. Students are not expected to become Csh 
 experts (I may agree that some technical details that are taught are not
 necessary) but they are expect to understand its usefulness. In that
 respect - any scripting language will do, even Perl.

This same argument can also be said in favour of Bash. Even more, because Bash 
is more useful than C-Shell.

 3. AFAIK all Technion servers are csh or tcsh (I don't know whether
 they provide bash) so it is the environment we have.

So? Bash ships with Linux by default, so it's a no-brainer to install it 
there, t2 carries it and one can install it everywhere a CS student may have 
to use it.

I'm pretty sure you can change that.

 4. Coming to think of it, the resemblance with C is an advantage
 (despite the defects and defects of csh).

C-shell hardly resembles C, and there are many faux-amis ( 
http://en.wikipedia.org/wiki/False_friend ). For instance, C-shell has no 
curly braces ({ ... }), you cannot put arbitrary expressions inside the if 
( ... ), assignments are set a=b instead of a = b, etc. I find the Bash 
syntax much more suitable for a shell, and more consistent, and think it 
would be less trouble to learn it.

So it's not a C-shell advantage either.

Regards,

Shlomi Fish

-
Shlomi Fish  [EMAIL PROTECTED]
Homepage:http://www.shlomifish.org/

If it's not in my E-mail it doesn't happen. And if my E-mail is saying
one thing, and everything else says something else - E-mail will conquer.
-- An Israeli Linuxer
___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


Re: [Haifux] My Stop Using (and Teaching) C-Shell and Tcsh Page

2007-10-18 Thread Orr Dunkelman
On 10/18/07, Shlomi Fish [EMAIL PROTECTED] wrote:

 Indeed. I always find it a curious fact when Matam/Mamat students were
 instructed to solve exercises without using sed or awk, or in one line of
 C-shell. This may indicate that they want to design clever exercises, but
 not
 to really teach the beauty of shell scripting.


Exactly. The point is not to teach the beauty of shell scripting.

I suggest you'll approach the lecturers in charge to get a better
understanding why they teach this shell rather than that shell (like Eyal
did).

As for the beauty thing - beauty is in the eye of the beholder.


 Well, from what I understood, up to a point TX still carried a Perl that
 was
 9-years-old or so (Nadav can fill the details). But even if it didn't
 carry
 bash, then bash was easily installable there.


Yes and no.

Unlike what many people think, installing software on a server with multiple
users is not as simple as running yum/rpm/whatever your distro is using.

It is an obligation by the staff to support, update (to some extent), insure
backward competability (in the case of updates), etc. The claim that It's
easy to install is wrong for systems which you do not own, nor understand
all the technical (or political) aspects related to.


  Seeing as C and shell-scripting are used for inherently different
 purposes,
  I do not see why this is an advantage; furthermore, I think that in the
  exercises which are being taught, far too much stress is being put on
 loops
  and if statemenets; Too little on effective usage of  and ||
  operators. Also, extremely useful unix commands such as sed and find are
  not taught, and I have actually seen an exercise given in the course
 where
  the students implement a crippled version of find. More relevant uses
 for
  shell scripts are never brought as an example - students are not shown,
 for
  example, how to use them in conjunction with make in order to create a
  test suite for their programs. If you want to teach scripting - use a
  scripting language (preferably something more organized than perl, like
  Python). If you want to teach SHELL scripting, the exercises must be
  relevant to that style of programming.

 Right.


Please note that the idea is not to teach UNIX, but to teach on the
existance of a tool called shell scripting.
For us it is very easy to say yeah, this can be solved by find. But these
students need to learn how to implement find in a crippled scripting
language, because when they'll leave the academy and go to the dark side,
a.k.a., industry, they will have to work on machines which are not even
POSIX complaint!

People, please remember we are talking on a degree in computer science (or
EE), i.e., you do not learn JAVA, you learn OOP methodology (for example, by
using JAVA). These two things are completely different.


  * One-liners are not possible - blocks have to start on separate lines.
  This makes tcsh very uncomfortable to use in interactive mode.

 I know and I've explicitly mentioned it in my original article:

 
 Entire Bash mini-programs can be written, tested and debugged in one line.
 This is impossible to do in csh which forces loops to be on separate
 lines.
 


oh, these kids who never worked on COBOL... ;)
-- 
Orr Dunkelman,
[EMAIL PROTECTED]

Any human thing supposed to be complete, must for that reason infallibly
be faulty -- Herman Melville, Moby Dick.

GPG fingerprint: C2D5 C6D6 9A24 9A95 C5B3  2023 6CAB 4A7C B73F D0AA
(This key will never sign Emails, only other PGP keys. The key corresponds
to [EMAIL PROTECTED])
___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux


Re: [Haifux] My Stop Using (and Teaching) C-Shell and Tcsh Page

2007-10-10 Thread Eyal Rozenberg
After reading Shlomi's post, I decided to ask Yechiel Kimchi about the 
C-shell issue; here's the email exchange:



Hello Yechiel,

I hadn't really given the Matam course syllabus a look since I had taken 
it (with you) in 2001, but I continue to hear the what do they teach C 
shell for complaint, so today I visited last semester's course website 
and C shell is still there; I checked the FAQ for an answer to the 
question and I didn't find one.

So, if it's not too much trouble for you to answer - how come C shell is 
still taught in the course, instead of less problematic and 
actually-used scripting shells like bash or ksh? This, in light of:

http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
http://www.grymoire.com/Unix/CshTop10.txt

Of course, there's also the question of whether shell scripting should 
be at all taught as part of Matam, but that's a broader issue of what 
kinds of training should students get to work with / administer / 
program in UNIXish environments, so that's not what I'm asking

Eyal

PS - The answer to my question might belong in the FAQ :-)



Shalom Eyal,

First, thanks for you interet and comments.

I'll make it short (it's 1:35am here  :-)  without looking at the references
(sorry, I'll look at them sometime later, but I doubt they will change
my reply).  1. C-Shell is taught as a tool for manipulating programs
(in MaTaM's view, especially for testing) - this answers also the Q
of why scripting at all?  2. Students are not expected to become
Csh experts (I may agree that some technical details that are taught
are not necessary) but they are expect to understand its usefulness.
In that respect - any scripting language will do, even Perl.
3. AFAIK all Technion servers are csh or tcsh (I don't know whether
they provide bash) so it is the environment we have.
4. Coming to think of it, the resemblance with C is an advantage
(despite the defects and defects of csh).

HIH
Yechiel



Ok, thanks for the explanation (although I think 3. is a very 
unfortunate coincidence we should have tried to change and I don't agree 
with 4. ).

Eyal





The meaning of (4) was that students learning curve
has relatively high derivative - for beginners - that's all.
(again, all I expect is _introduction_ to scripting
- others' mileage may vary  ;-)

Yechiel
___
Haifux mailing list
Haifux@haifux.org
http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux