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 / 24563
24562  |  24564
Subject: 
Re: NQC Programmers do it on one line
Newsgroups: 
lugnet.robotics
Date: 
Fri, 25 Nov 2005 02:48:16 GMT
Original-From: 
steve <[sjbaker1@airmail.]saynotospam[net]>
Viewed: 
1410 times
  
Ignacio Martinez Vazquez wrote:

They run it through several "beautifying" programs, which eliminate
all #define obfuscations.

Yeah - simple bad naming of variables and weird indentation is nowhere
*near* the degree of weirdness these guys get up to.  I don't think
you could automate the kinds of creative obfuscation you need to get
your code into the winner's circle at IOCCC.

They do stuff that most people don't believe would even
compile!  This is 'Duffs Device' for example:
The code prints the 'a' asterisks.

  int a = some_number ;
  int n = ( a + 4 ) / 5 ;

  switch ( a % 5 )
  {
    case 0: do
            {
              putchar ( '*' ) ;
    case 4:   putchar ( '*' ) ;
    case 3:   putchar ( '*' ) ;
    case 2:   putchar ( '*' ) ;
    case 1:   putchar ( '*' ) ;
            } while ( --n ) ;
  }

  printf ( "\n" ) ;



Message has 1 Reply:
  mindrover RCX pack
 
anyone familiar with this program? (URL) an add-on to Cognitoy's Mindrover simulation game, which apparently allows you to simulate some Lego 'bots, then run the code for real. If anyone has used this tool or has any relevant feedback, please reply. (...) (19 years ago, 25-Nov-05, to lugnet.robotics)

Message is in Reply To:
  Re: NQC Programmers do it on one line
 
(...) They run it through several "beautifying" programs, which eliminate all #define obfuscations. (19 years ago, 25-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