🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

9 total messages Started by einari@rhi.hi.is Sun, 11 Aug 1991 00:48
Re: Nice vs.nasty editors
#3715
Author: einari@rhi.hi.is
Date: Sun, 11 Aug 1991 00:48
20 lines
730 bytes

Ouch.  Not another editor war, I hope?

what would you say about this (and for those who are in doubt, you can
insert a whole lot of smileys :-)

"I do all my editing with 'cat > file.c'.  It is the best thing since
sliced bread, and it beats the socks of emacs and vi in performace.
Regular expressions, I hear someone say.  Who needs them?
What do I do if I make a mistake?  Well, I just type it back in!"

:-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-)

--
Internet:    einari@rhi.hi.is        |   "Just give me my command line and drag
UUCP:    ..!mcsun!isgate!rhi!einari  |   the GUIs to the waste basket!!!!"

Surgeon Generals warning:  Masking the 8th bit can seriously damage your brain!!

Re: Nice vs.nasty editors
#3736
Author: Dan_Jacobson@ATT
Date: Wed, 14 Aug 1991 10:09
9 lines
134 bytes
Einar> "I do all my editing with 'cat > file.c'.

To bad the C compiler needs a .c file, else you could
$ cc <<EOF
> main()
>{

etc.

Re: Nice vs.nasty editors
#3738
Author: barmar@think.com
Date: Wed, 14 Aug 1991 18:14
25 lines
393 bytes
In article <1991Aug14We060906.Dan_Jacobson@ATT.COM> Dan_Jacobson@ATT.COM writes:
>To bad the C compiler needs a .c file, else you could
>$ cc <<EOF
>> main()
>>{
>
>etc.

How about:

% ln -s /dev/tty foo.c
% cc foo.c
main()
{
...
^D

On a system with /dev/fd, you could even link foo.c to /dev/fd/0.

--
Barry Margolin, Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar

Re: Nice vs.nasty editors
#3741
Author: einari@rhi.hi.is
Date: Thu, 15 Aug 1991 12:03
21 lines
357 bytes
In article <1991Aug14We060906.Dan_Jacobson@ATT.COM> Dan_Jacobson@ATT.COM writes:
>Einar> "I do all my editing with 'cat > file.c'.
>
>To bad the C compiler needs a .c file, else you could
>$ cc <<EOF
>> main()
>>{
>
>etc.


:-) :-)

(Won't work on DOS, but then what does? :-)

On DOS, one might try: 'copy con file.c' :-)



I will say nothing about VMS!

Re: Nice vs.nasty editors
#3745
Author: imc@prg.ox.ac.uk
Date: Fri, 16 Aug 1991 10:28
42 lines
912 bytes
In article <1991Aug14.181408.28284@Think.COM>, barmar@think.com wrote:
>In article <1991Aug14We060906.Dan_Jacobson@ATT.COM> Dan_Jacobson@ATT.COM writes:
>>To bad the C compiler needs a .c file, else you could
>>$ cc <<EOF
[etc]

>How about:

>% ln -s /dev/tty foo.c
>% cc foo.c
[etc]

Who needs symbolic links? :-)

On SunOS 4.1.1:
% cc /dev/tty=.c
main()
{
puts("hello world!");
}
^D
% a.out
hello world!

Also, what about...

% cc -dryrun xyz.c
/lib/cpp -undef -Dunix -Dsun -Dsparc xyz.c >/tmp/cpp.02471.0.i
/lib/ccom - </tmp/cpp.02471.0.i >/tmp/ccom.02471.1.s
rm /tmp/cpp.02471.0.i
/bin/as -o xyz.o -Q /tmp/ccom.02471.1.s
rm /tmp/ccom.02471.1.s
/bin/ld -dc -dp -e start -X -o a.out /usr/lib/crt0.o xyz.o -lc
rm xyz.o

% [repeat the same commands except use /dev/tty instead of xyz.c]

Ian Collier
Ian.Collier@prg.ox.ac.uk | imc@ecs.ox.ac.uk

This is getting rather far from the subject, isn't it?   --me :-)

Re: Nice vs.nasty editors
#3993
Author: tim@sinix.UUCP (
Date: Mon, 09 Sep 1991 09:21
27 lines
595 bytes
In article <1991Aug14We060906.Dan_Jacobson@ATT.COM> Dan_Jacobson@ATT.COM writes:
>To (sic) bad the C compiler needs a .c file, else you could
>$ cc <<EOF
>> main()
>>{
>
>etc.

Already done, mate.  When I was porting GNU cc I used to test things I had
changed with:

$ ./cc1 -quiet		[ > file.s  if wanted ]
main()
{
}
^D

etc.  Of course, I had to do the preprocessing in my head... I dunno, kids
of today have it too easy...

Tim

--
Tim Bissell		| DoD#174	best:	tim@athen.xsmuc.siemens.de
Work:+49 89 636 49542	|		hmm:    ukc!uel!athen!tim
Home:+49 89 692 5263	| 			...mcsun!unido!sinix!tim

Re: Nice vs.nasty editors
#4012
Author: john@sco.COM (Jo
Date: Tue, 10 Sep 1991 19:05
26 lines
517 bytes
|>To (sic) bad the C compiler needs a .c file, else you could
|>$ cc <<EOF
|>> main()
|>>{
|>
|>etc.
|
|Already done, mate.  When I was porting GNU cc I used to test things I had
|changed with:
|
|$ ./cc1 -quiet		[ > file.s  if wanted ]
|main()
|{
|}
|^D
|
|etc.  Of course, I had to do the preprocessing in my head... I dunno, kids
|of today have it too easy...

I have a file ~/c.c with one line:

#include "/dev/tty"

Then "cc ~/c.c" works on most UNIXish boxes.  Not that this has
anything to do with editors...

Re: Nice vs.nasty editors
#4017
Author: jba@gorm.ruc.dk
Date: Tue, 10 Sep 1991 20:41
14 lines
481 bytes
>In article <1991Aug14We060906.Dan_Jacobson@ATT.COM> Dan_Jacobson@ATT.COM writes:
>>To (sic) bad the C compiler needs a .c file, else you could
>>$ cc <<EOF
>>> main()
>>>{
>>
>>etc.

I must have missed the original article, but I read about this little trick
some time ago: Create a file, tty.c, linked to /dev/tty and use 'cc tty.c'.
Tried it on a NCR-Tower and just now on a Sun. Works great!!
--
Jan B. Andersen <jba@dat.ruc.dk>                 ("SIMULA does it with class")

Re: Nice vs.nasty editors
#4033
Author: hansm@cs.kun.nl
Date: Thu, 12 Sep 1991 14:28
23 lines
459 bytes
In <1991Sep10.190558.25527@sco.COM> john@sco.COM (John R MacMillan) writes:

>|>To (sic) bad the C compiler needs a .c file, else you could
>|>$ cc <<EOF
>|>> main()
>|>>{
>|>
>|>etc.

>I have a file ~/c.c with one line:

>#include "/dev/tty"

>Then "cc ~/c.c" works on most UNIXish boxes.  Not that this has
>anything to do with editors...

If your system has symbolic links, you can save 1 disk block:

ln -s /dev/tty ~/c.c

--
Hans Mulder	hansm@cs.kun.nl

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads