Why computer languages need to have specific parsing rules and exact semantics.

2013-08-09 Thread John McKown
OK, this isn't really about a computer language. It is a joke from Reader's
Digest, in English. But it makes a good point as to why semantics is
important.

Wife: Go to the store and buy a quart of milk. If they have avocados, get
six.
Husband: OK
Husband comes back with 6 quarts of milk
Wife: What? Why did you get 6 quarts of milk?
Husband: They had avocados.

Obviously the husband is a systems programmer. And the wife is an end user.


-- 
As of next week, passwords will be entered in Morse code.

Maranatha! <><
John McKown

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Why computer languages need to have specific parsing rules and exact semantics.

2013-08-09 Thread Alfred Cole
perfect

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of John McKown
Sent: Friday, August 09, 2013 7:00 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Why computer languages need to have specific parsing rules and
exact semantics.

OK, this isn't really about a computer language. It is a joke from Reader's
Digest, in English. But it makes a good point as to why semantics is
important.

Wife: Go to the store and buy a quart of milk. If they have avocados, get
six.
Husband: OK
Husband comes back with 6 quarts of milk
Wife: What? Why did you get 6 quarts of milk?
Husband: They had avocados.

Obviously the husband is a systems programmer. And the wife is an end user.


--
As of next week, passwords will be entered in Morse code.

Maranatha! <><
John McKown

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email
to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Why computer languages need to have specific parsing rules and exact semantics.

2013-08-09 Thread Paul Gilmartin
On Fri, 9 Aug 2013 06:59:36 -0500, John McKown wrote:
>
>Wife: Go to the store and buy a quart of milk. If they have avocados, get
>six.
>Husband: OK
>Husband comes back with 6 quarts of milk
>Wife: What? Why did you get 6 quarts of milk?
>Husband: They had avocados.
>
>Obviously the husband is a systems programmer. And the wife is an end user.
> 
I believe it was Phil Payne who once told the story of being given an
assignment:

Promote all employees in pay grade A to pay grade B.  Then promote
all employees in pay grade B to pay grade C.

He did as instructed.

And this may have have been reported here, or it may be urban legend:
A shop set a task scheduled, at 0159 on a certain Sunday in Fall, to reset
the localtime to 0059.  Employees were astonished to come to work at
0730 on Monday and find the system reporting the time as 0130 on
Sunday.  (If the coding is correctly designed, there is no such thing as
a semiannual "time change".)


>As of next week, passwords will be entered in Morse code.
>
Case-sensitive?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Why computer languages need to have specific parsing rules and exact semantics.

2013-08-09 Thread Charles Mills
> Promote all employees in pay grade A to pay grade B. Then promote all 
> employees in pay grade B to pay grade C.
 
These days, more likely "Rightsize all employees in pay grade C to pay grade B. 
Then rightsize all employees in pay grade B to pay grade A."

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Paul Gilmartin
Sent: Friday, August 09, 2013 10:12 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Why computer languages need to have specific parsing rules and 
exact semantics.

On Fri, 9 Aug 2013 06:59:36 -0500, John McKown wrote:
>
>Wife: Go to the store and buy a quart of milk. If they have avocados, 
>get six.
>Husband: OK
>Husband comes back with 6 quarts of milk
>Wife: What? Why did you get 6 quarts of milk?
>Husband: They had avocados.
>
>Obviously the husband is a systems programmer. And the wife is an end user.
> 
I believe it was Phil Payne who once told the story of being given an
assignment:

Promote all employees in pay grade A to pay grade B.  Then promote
all employees in pay grade B to pay grade C.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Why computer languages need to have specific parsing rules and exact semantics.

2013-08-09 Thread zMan
On Fri, Aug 9, 2013 at 10:12 AM, Paul Gilmartin wrote:

> And this may have have been reported here, or it may be urban legend:
> A shop set a task scheduled, at 0159 on a certain Sunday in Fall, to reset
> the localtime to 0059.  Employees were astonished to come to work at
> 0730 on Monday and find the system reporting the time as 0130 on
> Sunday.  (If the coding is correctly designed, there is no such thing as
> a semiannual "time change".)
>

Windows 95 did that, IIRC...
-- 
zMan -- "I've got a mainframe and I'm not afraid to use it"

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Why computer languages need to have specific parsing rules and exact semantics.

2013-08-09 Thread Robert A. Rosenberg
At 09:12 -0500 on 08/09/2013, Paul Gilmartin wrote about Re: Why 
computer languages need to have specific parsing ru:



On Fri, 9 Aug 2013 06:59:36 -0500, John McKown wrote:


Wife: Go to the store and buy a quart of milk. If they have avocados, get
six.
Husband: OK
Husband comes back with 6 quarts of milk
Wife: What? Why did you get 6 quarts of milk?
Husband: They had avocados.

Obviously the husband is a systems programmer. And the wife is an end user.


I believe it was Phil Payne who once told the story of being given an
assignment:

Promote all employees in pay grade A to pay grade B.  Then promote
all employees in pay grade B to pay grade C.

He did as instructed.


As I am sure most of us know the correct set of instructions should 
have been to do the B->C change (leaving no B employees) and THEN do 
the A->B change.


Following the supplied set makes both A and B grades C (since when 
you do the B->C upgrade you have no way of only handling the old B 
paygrade employees and also upgrade the old A paygrade ones).




And this may have have been reported here, or it may be urban legend:
A shop set a task scheduled, at 0159 on a certain Sunday in Fall, to reset
the localtime to 0059.  Employees were astonished to come to work at
0730 on Monday and find the system reporting the time as 0130 on
Sunday.  (If the coding is correctly designed, there is no such thing as
a semiannual "time change".)


The instructions reset the time every hour once 0159 initially 
occurs. The correct trigger should have been doing it at 0559 GMT/UT. 
That would have only done one time change.






As of next week, passwords will be entered in Morse code.


Case-sensitive?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Why computer languages need to have specific parsing rules and exact semantics.

2013-08-09 Thread Bernd Oppolzer
I think this is called the "Halloween problem", which is in some respect 
similar:


update emp
set salary = salary * 1.05
where salary < 2.0;

in some of the first test releases of System R,
when the index on column salary was used in this update,
the salary of - say - 1 was first updated to 10500,
thus the record was inserted into the index at another place,
than later the record was found again, updated again and so on.

In the end, all salaries were >= 2.0

The columns to be updated must not be used in retrieving
the records in this case !!

AFAIK, the problem is called the Halloween problem, because it was
discovered at Halloween (probably 1975 or so ...).

Kind regards

Bernd



Am 09.08.2013 16:12, schrieb Paul Gilmartin:
And this may have have been reported here, or it may be urban legend: 
A shop set a task scheduled, at 0159 on a certain Sunday in Fall, to 
reset the localtime to 0059. Employees were astonished to come to work 
at 0730 on Monday and find the system reporting the time as 0130 on 
Sunday. (If the coding is correctly designed, there is no such thing 
as a semiannual "time change".)


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Why computer languages need to have specific parsing rules and exact semantics.

2013-08-12 Thread Peter Eggebeen
Just saw this in a skymall catalog :)

Commas save lives

"Can we eat gramma?"
"Can we eat, gramma?"



Pete Eggebeen
Senior Systems Engineer
Mainframe Storage Management
Kohl's Corporation
(920) 207-0108 (Cell)


On Fri, Aug 9, 2013 at 4:11 PM, Bernd Oppolzer
wrote:

> I think this is called the "Halloween problem", which is in some respect
> similar:
>
> update emp
> set salary = salary * 1.05
> where salary < 2.0;
>
> in some of the first test releases of System R,
> when the index on column salary was used in this update,
> the salary of - say - 1 was first updated to 10500,
> thus the record was inserted into the index at another place,
> than later the record was found again, updated again and so on.
>
> In the end, all salaries were >= 2.0
>
> The columns to be updated must not be used in retrieving
> the records in this case !!
>
> AFAIK, the problem is called the Halloween problem, because it was
> discovered at Halloween (probably 1975 or so ...).
>
> Kind regards
>
> Bernd
>
>
>
> Am 09.08.2013 16:12, schrieb Paul Gilmartin:
>
>  And this may have have been reported here, or it may be urban legend: A
>> shop set a task scheduled, at 0159 on a certain Sunday in Fall, to reset
>> the localtime to 0059. Employees were astonished to come to work at 0730 on
>> Monday and find the system reporting the time as 0130 on Sunday. (If the
>> coding is correctly designed, there is no such thing as a semiannual "time
>> change".)
>>
>
> --**--**--
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
CONFIDENTIALITY NOTICE:
This is a transmission from Kohl's Department Stores, Inc.
and may contain information which is confidential and proprietary.
If you are not the addressee, any disclosure, copying or distribution or use of 
the contents of this message is expressly prohibited.
If you have received this transmission in error, please destroy it and notify 
us immediately at 262-703-7000.

CAUTION:
Internet and e-mail communications are Kohl's property and Kohl's reserves the 
right to retrieve and read any message created, sent and received. Kohl's 
reserves the right to monitor messages by authorized Kohl's Associates at any 
time
without any further consent.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Why computer languages need to have specific parsing rules and exact semantics.

2013-08-12 Thread Elardus Engelbrecht
Peter Eggebeen wrote:

>Commas save lives

Of course. If you forget a comma in something like ATCCONxx, your life is in 
grave peril.

>"Can we eat gramma?"
>"Can we eat, gramma?"

:-)

"Mommy, grandma is awful!"
"Shutup, hurry up and eat up!"

:-)

Groete / Greetings
Elardus Engelbrecht

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Why computer languages need to have specific parsing rules and exact semantics.

2013-08-12 Thread Charles Mills
"A panda walks into a cafe. He orders a sandwich, eats it, then pulls out a gun 
and shoots the waiter. "Why?" groans the injured man. The panda shrugs and 
walks out, tossing a badly punctuated wildlife manual over his shoulder. When 
the waiter consults the book, he finds the explanation for this behaviour. The 
entry for "panda" reads: "Large black and white mammal native to China. Eats, 
shoots and leaves."

-- http://www.fun-with-words.com/eats_shoots_leaves_review.html 

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Elardus Engelbrecht
Sent: Monday, August 12, 2013 9:57 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Why computer languages need to have specific parsing rules and 
exact semantics.

Peter Eggebeen wrote:

>Commas save lives

Of course. If you forget a comma in something like ATCCONxx, your life is in 
grave peril.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Why computer languages need to have specific parsing rules and exact semantics.

2013-08-12 Thread Paul Gilmartin
On Mon, 12 Aug 2013 13:30:13 -0400, Charles Mills wrote:
>
>-- http://www.fun-with-words.com/eats_shoots_leaves_review.html 
> 
Somewhat related, there's a strong argument against quiet truncation
of input lines or identifiers to some conventional length.  Imagine:

DELETE MY.DATA.SET(MEMBER)

getting truncated with no warning just before the '('.  IIRC, FORTRAN
for the IBM 1620 was a bad example: it allowed identifiers to be
written to 6 characters for alleged compatibility with other FORTRANs,
but took only the first 4 as significant.

I'm seething from a time I did SDSF; SJ; SUBMIT and my JCL was
_quietly_ truncated to 80 characters.  Someday I'll get in a PMR
mood.  Data integrity, as I see it.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Why computer languages need to have specific parsing rules and exact semantics.

2013-08-12 Thread zMan
Wow, yeah. That would be Just Plain BAD. If you're gonna truncate, you
can't do it quietly.


On Mon, Aug 12, 2013 at 4:02 PM, Paul Gilmartin wrote:

> On Mon, 12 Aug 2013 13:30:13 -0400, Charles Mills wrote:
> >
> >-- http://www.fun-with-words.com/eats_shoots_leaves_review.html
> >
> Somewhat related, there's a strong argument against quiet truncation
> of input lines or identifiers to some conventional length.  Imagine:
>
> DELETE MY.DATA.SET(MEMBER)
>
> getting truncated with no warning just before the '('.  IIRC, FORTRAN
> for the IBM 1620 was a bad example: it allowed identifiers to be
> written to 6 characters for alleged compatibility with other FORTRANs,
> but took only the first 4 as significant.
>
> I'm seething from a time I did SDSF; SJ; SUBMIT and my JCL was
> _quietly_ truncated to 80 characters.  Someday I'll get in a PMR
> mood.  Data integrity, as I see it.
>
> -- gil
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>



-- 
zMan -- "I've got a mainframe and I'm not afraid to use it"

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN