[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c

Typography of programs

jacob navia

6/30/2011 12:06:00 AM

I am learning the Macintosh environment with the idea of porting the IDE
of lcc-win to the mac.

What is nice in the mac is how easily you can set up a text display
and integrate images and other data into the text. It supports RTF text
(as windows too, by the way) and I was again wondering at implementing
an old idea that I wanted to implement already into wedit some years ago.

Actually, when C was conceived there weren't any bit mapped graphics
or any such hardware that we now consider common place.

The typography of C remained the same, as all other computer languages,
obsessed with the character sets from 32 to 127 ASCII codes. Then, we
write != instead of the inequality sign, = instead of the assignment
arrow, "&&" instead of /\, "||" instead of \/.

Programs would be clearer if we would use today's hardware to show
the usual signs, instead of constructs adapted to the teletype
typewriter of the seventies.

Unicode now offers all possible signs for displaying in our programs,
and it would be a progress if C would standardize some codes to be
used isnstead of the usual != and &&, etc.

We have in iso646.h
#define and &&
#define and_eq &=
#define bitand &
#define bitor |
#define compl ~

We could have in some isoXXX.h
#define â?  !=
#define â?? and
#define � or
#define â?¤ <=
#define â?¥ >=

etc.

Using � for assignment would avoid the common beginner's error of using
= instead of == and programs would look less horrible.

All this would be done first in output only to avoid requiring a new C
keyboard even though that can be done later. You would still type !=
but you would obtain â?  in output in the same way that you type first the
accent, then the later under the accent and you obtain one character.

The standardization committee would be crucial in making this change
smooth but... I fear the won't be so enthusiastic...

Just some thoughts


jacob
116 Answers

robertwessel2@yahoo.com

6/30/2011 12:57:00 AM

0

On Thu, 30 Jun 2011 02:06:26 +0200, jacob navia <jacob@spamsink.net>
wrote:

>I am learning the Macintosh environment with the idea of porting the IDE
>of lcc-win to the mac.
>
>What is nice in the mac is how easily you can set up a text display
>and integrate images and other data into the text. It supports RTF text
>(as windows too, by the way) and I was again wondering at implementing
>an old idea that I wanted to implement already into wedit some years ago.
>
>Actually, when C was conceived there weren't any bit mapped graphics
>or any such hardware that we now consider common place.
>
>The typography of C remained the same, as all other computer languages,
>obsessed with the character sets from 32 to 127 ASCII codes. Then, we
>write != instead of the inequality sign, = instead of the assignment
>arrow, "&&" instead of /\, "||" instead of \/.
>
>Programs would be clearer if we would use today's hardware to show
>the usual signs, instead of constructs adapted to the teletype
>typewriter of the seventies.
>
>Unicode now offers all possible signs for displaying in our programs,
>and it would be a progress if C would standardize some codes to be
>used isnstead of the usual != and &&, etc.
>
>We have in iso646.h
>#define and &&
>#define and_eq &=
>#define bitand &
>#define bitor |
>#define compl ~
>
>We could have in some isoXXX.h
>#define ? !=
>#define ? and
>#define ? or
>#define ? <=
>#define ? >=
>
>etc.
>
>Using ? for assignment would avoid the common beginner's error of using
>= instead of == and programs would look less horrible.
>
>All this would be done first in output only to avoid requiring a new C
>keyboard even though that can be done later. You would still type !=
>but you would obtain ? in output in the same way that you type first the
>accent, then the later under the accent and you obtain one character.
>
>The standardization committee would be crucial in making this change
>smooth but... I fear the won't be so enthusiastic...



You'd have a hard time exchanging programs with
non-extended-character-set implementations (not limiting things to
Unicode implementations, on the assumption that some extended, but
non-Unicode implementations would be plausible).

I'm afraid you'd end up with more di/trigraphs. The horror of that
will probably send anyone running.

FWIW, Java allows the use of Unicode (in fact it's specified), and you
can use Unicode characters in names (so you can assign the value 3.14
to a variable named U+03C0). But they didn't use any of the extended
characters for operators.

Nor is this a particularly new concept - APL (circa 1964 for the first
implementations, although the initial papers, with most of the
symbology, date to about 1961) required/could use a extended character
set. IBM (and others) manufactured terminals and printers with the
APL character set available for output and on the keyboard. IBM even
had Selectric typewriter balls with the APL set.

China Blue Veins

6/30/2011 4:44:00 AM

0

In article <iugem2$np3$1@speranza.aioe.org>, jacob navia <jacob@spamsink.net>
wrote:

> I am learning the Macintosh environment with the idea of porting the IDE
> of lcc-win to the mac.
>
> What is nice in the mac is how easily you can set up a text display
> and integrate images and other data into the text. It supports RTF text
> (as windows too, by the way) and I was again wondering at implementing
> an old idea that I wanted to implement already into wedit some years ago.

I've been doing that for a few years now. I have a macro processor that can
parse RTF and uses Tcl for its metalanguage. The macro names are C style
identifiers, but it also can have string mappings like
<= ï½² <= > <= ï¾? ! >

It's set up to ignore Palatino font and only include Helvetica. That means I can
interspersed comments, images, and movies in the text.

--
I remember finding out about you, |A free Thai dyed shirt in every box.
Everyday my mind is all around you,| I'm whoever you want me to be.
Looking out from my lonely room | Annoying Usenet one post at a time.
Day after day. | At least I can stay in character.

Ian Collins

6/30/2011 4:59:00 AM

0

On 06/30/11 12:06 PM, jacob navia wrote:
> I am learning the Macintosh environment with the idea of porting the IDE
> of lcc-win to the mac.
>
> What is nice in the mac is how easily you can set up a text display
> and integrate images and other data into the text. It supports RTF text
> (as windows too, by the way) and I was again wondering at implementing
> an old idea that I wanted to implement already into wedit some years ago.
>
> Actually, when C was conceived there weren't any bit mapped graphics
> or any such hardware that we now consider common place.
>
> The typography of C remained the same, as all other computer languages,
> obsessed with the character sets from 32 to 127 ASCII codes. Then, we
> write != instead of the inequality sign, = instead of the assignment
> arrow, "&&" instead of /\, "||" instead of \/.
>
> Programs would be clearer if we would use today's hardware to show
> the usual signs, instead of constructs adapted to the teletype
> typewriter of the seventies.
>
> Unicode now offers all possible signs for displaying in our programs,
> and it would be a progress if C would standardize some codes to be
> used isnstead of the usual != and&&, etc.
>
> We have in iso646.h
> #define and&&
> #define and_eq&=
> #define bitand&
> #define bitor |
> #define compl ~
>
> We could have in some isoXXX.h
> #define â?  !=
> #define â?? and
> #define � or
> #define â?¤<=
> #define â?¥>=

Another way to generate non-portable code! Not much fun for those of us
who use command line text processing tools in the C locale!

--
Ian Collins

jacob navia

6/30/2011 5:20:00 AM

0

Le 30/06/11 02:57, Robert Wessel a écrit :
>
> You'd have a hard time exchanging programs with
> non-extended-character-set implementations (not limiting things to
> Unicode implementations, on the assumption that some extended, but
> non-Unicode implementations would be plausible).

Hard time?

It would mean just #include isoXXX.h. That would transform those codes
into Ascii again. A pass through the preprocessor and that would be
done!

>
> I'm afraid you'd end up with more di/trigraphs. The horror of that
> will probably send anyone running.
>

We have NOW digraphs!!! What else is != than a digraph for â?  ?????
Those digraphs would stay of course.

> FWIW, Java allows the use of Unicode (in fact it's specified), and you
> can use Unicode characters in names (so you can assign the value 3.14
> to a variable named U+03C0). But they didn't use any of the extended
> characters for operators.
>

Does Java have Big problems because of Unicode? I would bet not!

> Nor is this a particularly new concept - APL (circa 1964 for the first
> implementations, although the initial papers, with most of the
> symbology, date to about 1961) required/could use a extended character
> set. IBM (and others) manufactured terminals and printers with the
> APL character set available for output and on the keyboard. IBM even
> had Selectric typewriter balls with the APL set.
>

It was my first programming language. It is great still today.

jacob navia

6/30/2011 5:22:00 AM

0

Le 30/06/11 06:43, China Blue Dolls a écrit :
> In article<iugem2$np3$1@speranza.aioe.org>, jacob navia<jacob@spamsink.net>
> wrote:
>
>> I am learning the Macintosh environment with the idea of porting the IDE
>> of lcc-win to the mac.
>>
>> What is nice in the mac is how easily you can set up a text display
>> and integrate images and other data into the text. It supports RTF text
>> (as windows too, by the way) and I was again wondering at implementing
>> an old idea that I wanted to implement already into wedit some years ago.
>
> I've been doing that for a few years now. I have a macro processor that can
> parse RTF and uses Tcl for its metalanguage. The macro names are C style
> identifiers, but it also can have string mappings like
> <= ï½²<=> <= ï¾? !>
>
> It's set up to ignore Palatino font and only include Helvetica. That means I can
> interspersed comments, images, and movies in the text.
>

I think that would be great. If iso would standardize the characters
used and the operators needed then we could write comments in another
font, etc etc.

jacob navia

6/30/2011 5:23:00 AM

0

Le 30/06/11 06:59, Ian Collins a écrit :
>
> Another way to generate non-portable code!

If isoXXX.h exists then it is 100% portable. You would just need to
#include that file or pass the code through a small preprocessor
and that's all.


> Not much fun for those of us
> who use command line text processing tools in the C locale!
>

It is not very difficult to adapt those tools to accept unicode
anyway... We could use a small subset of Unicode

Ian Collins

6/30/2011 5:26:00 AM

0

On 06/30/11 05:23 PM, jacob navia wrote:
> Le 30/06/11 06:59, Ian Collins a écrit :
>>
>> Another way to generate non-portable code!
>
> If isoXXX.h exists then it is 100% portable. You would just need to
> #include that file or pass the code through a small preprocessor
> and that's all.
>
>
>> Not much fun for those of us
>> who use command line text processing tools in the C locale!
>>
>
> It is not very difficult to adapt those tools to accept unicode
> anyway... We could use a small subset of Unicode

Well it is difficult if the tool ere built into the OS!

--
Ian Collins

China Blue Veins

6/30/2011 5:50:00 AM

0

In article <iuh14q$pjn$2@speranza.aioe.org>, jacob navia <jacob@spamsink.net>
wrote:

> Le 30/06/11 06:43, China Blue Dolls a écrit :
> > In article<iugem2$np3$1@speranza.aioe.org>, jacob navia<jacob@spamsink.net>
> > wrote:
> >
> >> I am learning the Macintosh environment with the idea of porting the IDE
> >> of lcc-win to the mac.
> >>
> >> What is nice in the mac is how easily you can set up a text display
> >> and integrate images and other data into the text. It supports RTF text
> >> (as windows too, by the way) and I was again wondering at implementing
> >> an old idea that I wanted to implement already into wedit some years ago.
> >
> > I've been doing that for a few years now. I have a macro processor that can
> > parse RTF and uses Tcl for its metalanguage. The macro names are C style
> > identifiers, but it also can have string mappings like
> > <= ï1?22<=> <= ï3?4? !>
> >
> > It's set up to ignore Palatino font and only include Helvetica. That means
> > I can
> > interspersed comments, images, and movies in the text.
> >
>
> I think that would be great. If iso would standardize the characters
> used and the operators needed then we could write comments in another
> font, etc etc.

RTF can include any Unicode character, so I just deliver a stream of those.

--
I remember finding out about you, |A free Thai dyed shirt in every box.
Everyday my mind is all around you,| I'm whoever you want me to be.
Looking out from my lonely room | Annoying Usenet one post at a time.
Day after day. | At least I can stay in character.

China Blue Veins

6/30/2011 5:53:00 AM

0

In article <972fnnFnfiU2@mid.individual.net>,
Ian Collins <ian-news@hotmail.com> wrote:

> On 06/30/11 05:23 PM, jacob navia wrote:
> > Le 30/06/11 06:59, Ian Collins a écrit :
> >>
> >> Another way to generate non-portable code!
> >
> > If isoXXX.h exists then it is 100% portable. You would just need to
> > #include that file or pass the code through a small preprocessor
> > and that's all.
> >
> >
> >> Not much fun for those of us
> >> who use command line text processing tools in the C locale!
> >>
> >
> > It is not very difficult to adapt those tools to accept unicode
> > anyway... We could use a small subset of Unicode
>
> Well it is difficult if the tool ere built into the OS!

Your C compiler is built into the OS?

--
I remember finding out about you, |A free Thai dyed shirt in every box.
Everyday my mind is all around you,| I'm whoever you want me to be.
Looking out from my lonely room | Annoying Usenet one post at a time.
Day after day. | At least I can stay in character.

Ian Collins

6/30/2011 5:53:00 AM

0

On 06/30/11 05:52 PM, China Blue Dolls wrote:
> In article<972fnnFnfiU2@mid.individual.net>,
> Ian Collins<ian-news@hotmail.com> wrote:
>
>> On 06/30/11 05:23 PM, jacob navia wrote:
>>> Le 30/06/11 06:59, Ian Collins a écrit :
>>>>
>>>> Another way to generate non-portable code!
>>>
>>> If isoXXX.h exists then it is 100% portable. You would just need to
>>> #include that file or pass the code through a small preprocessor
>>> and that's all.
>>>
>>>
>>>> Not much fun for those of us
>>>> who use command line text processing tools in the C locale!
>>>>
>>>
>>> It is not very difficult to adapt those tools to accept unicode
>>> anyway... We could use a small subset of Unicode
>>
>> Well it is difficult if the tool ere built into the OS!
>
> Your C compiler is built into the OS?

Read my first post!

--
Ian Collins