Talk:Calendar - for "REAL" programmers

From Rosetta Code

Delete?

Far too specific. --Paddy3118 03:35, 31 May 2011 (UTC)

Looks like maybe it's just for fun maybe. I suggest removing the task tag and moving it to a subpage of the user who made it's user page. --Mwn3d 03:45, 31 May 2011 (UTC)

I kind of disagree. Programming on a 6-bit (aka UPPERCASE only) platform is a legitimate pursuit. The K&R C programming language specifically permitted it, so to also PL/I, FORTRAN, COBOL... etc. There were and are still many legitimate CPU architectures that are intrinsically 6-bit, hence UPPERCASE.

I agree that it should be deleted. This is an absurd requirement and is totally uninteresting code-wise (either the language is case-sensitive or it isn't) ... even in the unlikely event that you care about computers with 6-bit words these days, you could always write a compiler that accepted ASCII or even Unicode source, loading it into multi-word encodings. (Or more likely you would just cross-compile, since you wouldn't want to actually do your work on a 6-bit machine nowadays.) — Steven G. Johnson (talk) 15:50, 11 November 2013 (UTC)

Examples

Example 12-bit computer architectures
Example 18-bit computer architectures

Many ADCs (analog to digital converters) have a 12-bit resolution.

Computers with 24-bit words included
  • ICT 1900 series and the Harris H series.
  • IBM System/360, announced in 1964, was a popular computer system with 24-bit addressing and 32-bit general registers and arithmetic.
  • IBM PC/AT with an Intel 80286 processor using 24-bit addressing and 16-bit general registers and arithmetic
  • Apple Macintosh 128k with a Motorola 68000 processor featuring 24-bit addressing and 32-bit registers.
  • eZ80 is a microprocessor and microcontroller family with 24-bit registers and addressing that is binary compatible with the 8/16-bit Z80.
Computers with 36-bit words included
Computers with 60-bit words include

Most of these were programmable in UPPERCASE only.

Indeed, unix will (used to) compile and run UPPERCASE only computers.... And the linux command stty still supports UPPERCASE only terminals. eg "stty iuclc olcuc"

Calendar specifically is an algorithm that is sufficiently complex that it requires assorted flow control, and I/O making is a reasonable example of how to work on a 6-bit character platform. CALENDAR also is specifically and uniquely relevant has it refers back the original "REAL" programmer.

I look forward to your decision discussion.

NevilleDNZ 05:04, 31 May 2011 (UTC)


Discussion Cont.

Not decision, discussion. And you`ve made a great case! --Paddy3118 05:43, 31 May 2011 (UTC)

Secretly I'm looking forward to the Qubit and Qutrit computers... When 32-bit and 64-bit computers will become old hat. :-) NevilleDNZ 05:55, 31 May 2011 (UTC)

But 6 bit could just as easily be all lower case as all uppercase. And there are other characters that would also be eliminated if this were really being targeted at a 6 bits-per-character platform. Meanwhile, some languages become unusable with this "all uppercase" constraint. Mind you, it's a cute constraint. But it's also silly. --Rdm 18:15, 31 May 2011 (UTC)

Actually - kind of - I agree with you... 6-bit is the criteria. Although I have never heard of a strictly lower case hardware platform.

I think that is because older devices such as the teletype ksr-33 (or a selectric with an APL type ball or any of a variety of others) would only print upper case. (The teletype handled ascii but lower case letters looked like upper case characters. Then there were several systems for encoding selectric characters (e.g. tilt/rotate codes).) Meanwhile, there are numerous systems for dealing with mis-matched character set issues. It gets crazy. And I suspect there might be a reason people adopted full ASCII (with lower case) despite the too numerous alternatives. --Rdm 14:43, 2 June 2011 (UTC)

BTW: The first time I encountered such a computer, it was a Pr1me I remember trying being rather bamboozled about how to get the damned thing out of uppercase, including looking for a toggle under the keyboard. It took a little while to dawn on me that it could only do upper case. The ZX80 code was also UPPERCASE, the ZX was so nice to program that the UPPERCASE restriction didn't seem to matter.

There are a couple of other legacy options in unix that throw back to the UPPERCASE heritage.

  • Unix provides the /bin/stty and the /bin/STTY command for chance where the keyboard only generates uppercase.
  • On Unix, if you do a console login and accidentally type your "username" in UPPERCASE the getty assumed you were on a 6 bit terminal. Linux still retains the "stty xcase" option for prefixing "\" on uppercase characters. I do not recall any "stty sane" option. ;-)

I wonder if K&R C ever handled UPPERCASE programs by mapping only characters prefixed with "\" to uppercase? Hmm... I have my suspicions.

NevilleDNZ 04:42, 1 June 2011 (UTC)

Ye Gads... I just found out that FORTRAN programs on the PDP-10 were coded in 5-bits... the original Adventure game was written in 5-bit FORTRAN. original code

Wikipedia: A t-shirt was spotted at DECUS that said: "If you haven't got 36 bits, you're not working with a full DEC."

NevilleDNZ 05:14, 1 June 2011 (UTC)


Create another algorithm?

The task description says "Create another algorithm", yet the Algol solutions are identical (except for the case).--Abu 15:06, 31 May 2011 (UTC)

I get your drift.... rewording task: Provide an algorithm ... presented entirely without lowercase. ThanX for pointing it out. NevilleDNZ 03:58, 1 June 2011 (UTC)


Examples, BCD machines

Example 5-bit computer architectures


The IBM 1620   (and the others above)   had a magnetic-core memory with BCD encoding.
(BCD   =   Binary Coded Decimal.)

Each memory location was   (for the most part)   a decimal digit.

Each memory location was comprised of five bits:

  •   a flag bit (the F bit),   used to indicate a negative number,   an   end-of-field,   or a   carry.
  •   four bits (the 8421 bits),   used to indicate which decimal digit was being represented.

Additionally, there was a check bit (the C bit),   which isn't used to hold "data" and could not be set or accessed by a programmer.   It was used as a parity bit.   Every decimal digit had to have a odd number of bits set, including the C bit.   If not odd,   a "parity bit" error light was lit and the computer went into a wait (stopped) state.

There wasn't a method to indicate lowercase letters.

Characters used two consecutive decimal digits.

There were three special "numbers":

  •   1010   a record mark
  •   1100   a numeric blank (for punched cards)
  •   1111   a group mark


All opcodes were two decimal digits.

-- Gerard Schildberger (talk) 02:12, 29 October 2020 (UTC)


another ASCII version

Here is a shorter ASCII version:

                 ,-~~-.___.
                / ()=(()   \
               (   (        0
                \._\, ,----'
           ##XXXxxxxxxx
                  /  ---'~;
                 /    /~|-
               =(   ~~  |
         /~~~~~~~~~~~~~~~~~~~~~\
        /_______________________\
       /_________________________\
      /___________________________\
         |____________________|
         |____________________|
         |____________________|
         |                    |

-- Gerard Schildberger (talk) 18:31, 21 November 2013 (UTC)