Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Programming challenge

Name: Anonymous 2009-12-27 2:04

Print "SUSSMAN\n" twice in 40 bytes or less.

Name: Anonymous 2009-12-27 2:08

(progn #1=(format t "SUSSMAN~%") #1#)

Name: Anonymous 2009-12-27 2:10

(format t "SUSSMAN~&SUSSMAN~&")

Name: Anonymous 2009-12-27 2:45

print'SUSSMAN\n'*2

Name: Anonymous 2009-12-27 3:20

"SUSSMAN\n"
save this in a file called ``SUSSMAN\n'' and try to compile it.
should print ``SUSSMAN\n'' twice

Name: Anonymous 2009-12-27 4:21

echo aa | sed 's/a/Sussman\
/g'

Name: Anonymous 2009-12-27 5:25

print"Sussman\nSussman"

Name: Anonymous 2009-12-27 5:26

>>7
print"Sussman\nSussman"

Name: Anonymous 2009-12-27 7:05

print "sussman\n" x 2;

Name: Anonymous 2009-12-27 7:07

SUSSMANxSUSSMAN, just like from some anime

Name: Anonymous 2009-12-27 7:56

2.times{p"sußman"}

Name: Anonymous 2009-12-27 8:30

┤○║◘☺═!├SUSSMAN◙SUSSMAN◙

Name: Anonymous 2009-12-27 8:48

>>12
I miss APL.

Name: Anonymous 2009-12-27 13:04

echo sussman | tee -

Name: Anonymous 2009-12-27 15:25

>>14
echo SUSSMAN | tee -

Name: Anonymous 2009-12-27 15:27

>>15
yes SUSSMAN

Name: Anonymous 2009-12-27 15:36

>>16
x

in my .${SHELL}rc
alias x='yes SUSSMAN'

Name: Anonymous 2009-12-27 16:12

set the iterator to 0
set the maximum to 2
repeat while the iterator < the maximum
    display dialog of the "Sussman"
    set the iterator to the iterator + 1
end repeat

Name: Anonymous 2009-12-27 16:13

>>17


in my .${SHELL}rc
yes SUSSMAN

Name: Anonymous 2009-12-27 17:41

>>19

in my .${SHELL}rc
~/a.out
a.out is compiled from a.c


in a.c

#include <stdio.h>
#define ARBITRARY 10

int main(void)
{
    int i;
    for(i = 0; i < ARBITRARY; i++)
        ungetc('h', stdin);
    for(;;)
        puts("SUSSMAN");
}


That's a total of -ARBITRARY chars used.
I bid thee good day, sir.

Name: Anonymous 2009-12-27 18:33

       IDENTIFICATION DIVISION.
       PROGRAM-ID.             PRINT-SUSSMAN-TWICE.
       AUTHOR.                 ANONYMOUS.
      **************************************************
      * Program to print "SUSSMAN" twice.              *   
      **************************************************

       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SOURCE-COMPUTER.        VAX-VMS.
       OBJECT-COMPUTER.        VAX-VMS.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01 TEXT-OUT             PIC X(7) VALUE 'SUSSMAN'.
       01 LOOP-COUNT           PIC 9    VALUE ZERO.

       PROCEDURE DIVISION.
       MAIN-PARAGRAPH.
         PERFORM VARYING LOOP-COUNT FROM 2 BY -1 UNTIL LOOP-COUNT = 0
           DISPLAY TEXT-OUT
         END-PERFORM
       STOP RUN.

Name: Anonymous 2009-12-27 19:21

perl -e 'print "\"SUSSMAN\\n\""x2'

Name: Anonymous 2009-12-27 19:27

echo \"SUSSMAN\\n\" twice in 40 bytes or less.

Name: Anonymous 2009-12-27 19:29

>>23
Oops, you said print:
echo \"SUSSMAN\\n\" twice in 40 bytes or less. | lpr

Name: Anonymous 2009-12-27 20:07

<?php echo'SUSSMAN'."\n".'SUSSMAN'."\n";?>

Name: Anonymous 2009-12-27 20:47

You don't say where I should print the SUSSMAN's. I say I want to print them to /dev/nul, nul, a broadcast stream, throwaway stream, etc.
Thus the entire act of printing Sussman's has no side effects, and a smart compiler could optimize this away in some circumstances. Which means that the shortest program which does this job doesn't have to do anything, and thus is 0 bytes (in a variety of languages which accept empty programs). It is the shortest solution to this challenge.

Name: Anonymous 2009-12-27 20:53

Thus the entire act of printing Sussman's has no side effects, and a smart compiler could optimize this away in some circumstances

( ≖‿≖)

Name: Anonymous 2009-12-27 21:46

s.bat
SussmanSussman

Name: Anonymous 2009-12-27 23:38

print "Sussman\n"*2

Name: Anonymous 2009-12-28 1:40

>>25
Why not

<?php echo "SUSSMAN\nSUSSMAN\n"; ?>

?

Name: Anonymous 2009-12-28 12:13

>>26
I beg to differ. My program does it in -10 bytes
>>20

Name: Anonymous 2009-12-28 12:48

echo sussman & echo sussman

Assuming the characters are encoded in ASCII, that's 27 bytes.

Name: Anonymous 2009-12-28 14:24

In HQ9S++ it's just ss. 2 bytes.

Name: Anonymous 2009-12-29 2:30

p"SUSSMAN\nSUSSMAN\n"

22 bytes

Name: Anonymous 2009-12-29 10:28

>>30
Optimization. Everyone knows that single quotes in PHP are faster.

Name: Anonymous 2009-12-29 10:51

>>35
I can actually imagine that this is the sort of idiotic thing that PHP would do, but [citation needed]

Name: Anonymous 2009-12-29 11:07

Name: Anonymous 2009-12-29 11:23

>>37
DEAR GOD!!!

Name: Anonymous 2009-12-29 12:04

>>37
Haha, oh wow.

Name: Anonymous 2009-12-29 12:19

>>37
PHP sure is GREAT !!

Name: Anonymous 2009-12-29 12:26

The "5dicks" == 5 anomaly.

Name: Anonymous 2009-12-29 12:43

Where is Martin these days? I'd love to hear his defense of >>37

Name: Anonymous 2009-12-29 13:04

>>37
I'm glad I wasn't drinking something when I read that.

Name: Anonymous 2009-12-29 13:06

>>36,38-40,42-43
Why do you think it's horrible? They're just different operators: one for literal stuff and another one for substitutions.

Name: Anonymous 2009-12-29 13:12

>>44
Even if you take that into consideration, the syntax is pretty misleading and inconsistent.

Name: Anonymous 2009-12-29 15:08


C:\>type test.com
┤       ║►☺═!═!1└═!   Sussman
$
C:\>test.com
Sussman
Sussman

C:\>

(that big space in the beginning is actually tab, and those spaces before Sussman are padding)

Name: Anonymous 2010-12-17 1:25

Are you GAY?
Are you a NIGGER?
Are you a GAY NIGGER?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!

Name: Anonymous 2011-02-04 16:36

Don't change these.
Name: Email:
Entire Thread Thread List