To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 24553
24552  |  24554
Subject: 
Re: NQC Programmers do it on one line
Newsgroups: 
lugnet.robotics
Date: 
Thu, 24 Nov 2005 15:44:55 GMT
Original-From: 
steve <sjbaker1@airmail.net^NoSpam^>
Viewed: 
1131 times
  
Thomas Chesney wrote:
There is a tradition among C programmers to write very tight code i.e. as short
a program as possible. Does such a culture exist with NQC programmers?

See for instance:

http://www.au.ioccc.org/main.html

The IOCCC (International Obfuscated C Code Competition) isn't about
writing things in as few lines as possible (although there is a pretty
tight limit on the maximum size of entries).

The objective of the contest is to write the most difficult to read
and/or understand program possible.  The limit on the size of the
entries is mostly for the sake of the sanity of the judges who have
to at least make an effort to understand the code in order to form
an opinion about which is the most 'obfuscated'.

The entries use all the most horrible and obscure features of C yet do
something interesting.  Many times, the result is extremely clever - and
even actually useful!  In a few cases nobody other than the author has
ever managed to figure out how they do what they do.

Quite often, looking at the source code produces a pretty picture of
something.  For example, there was a flight simulator program submitted
a few years ago - if you printed out the source code, it was in the
shape of an aeroplane.

I'm guessing that the shortest will be 5 lines or less. I think you could
probably do a light follower 1?

Counting lines isn't a good goal because any program can be made into a
1-liner by just joining all the lines together.  You need to ask how
many characters there are in the source code.

eg I'm pretty sure you could write a line-follower in under 80
characters - but how about under 40?

But the IOCCC is a very unique contest - I'm not sure people should
try to emulate a contest that celebrates really *bad* programming style!



Message has 2 Replies:
  Re: NQC Programmers do it on one line
 
(...) The IOCCC (International Obfuscated C Code Competition) isn't about writing things in as few lines as possible (although there is a pretty tight limit on the maximum size of entries). (...) The objective of the contest is to write the most (...) (19 years ago, 24-Nov-05, to lugnet.robotics)
  Re: NQC Programmers do it on one line
 
(...) I always thought the best way to do this would be to write a program to do it for you. This way the computer could redefine every function and operator and make the program absolutely unreadable. You could even enter your obfuscation program (...) (19 years ago, 24-Nov-05, to lugnet.robotics)

Message is in Reply To:
  NQC Programmers do it on one line
 
There is a tradition among C programmers to write very tight code i.e. as short a program as possible. Does such a culture exist with NQC programmers? See for instance: (URL) the most useful robot you've programmed using as few lines as possible and (...) (19 years ago, 24-Nov-05, to lugnet.robotics)

9 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR