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

Challenge

Name: Anonymous 2009-08-08 2:51

Write a program which creates a file named DICKS.HTML and writes "<html><body>DICKSDICKSDICKS</body></html>" inside.
Language with the shortest code wins.

Name: Anonymous 2009-08-08 3:11

Do your own homework.

Name: Anonymous 2009-08-08 3:17

>>2
Am I my own homework?

Name: Anonymous 2009-08-08 3:18

>>1
Uh, wouldn't it make more sense to serve it over the Internet by some means?
(with-open-file (f "DICKS.HTML :direction :output)
  (with-html-output (f)
    (:html (:body "DICKSDICKSDICKS"))))


Why such a trivial challenge?

Name: Anonymous 2009-08-08 3:18

#include <iostream>
#include <fstream>
using namespace std;

int main () {
  ofstream dicks;
  dicks.open ("DICKS.HTML");
  dicks<< "<html><body>DICKSDICKSDICKS</body></html>";
  dicks.close();
  return 0;
}

Name: Anonymous 2009-08-08 3:21


#! /bin/sh
echo \<html\>\<body\>DICKSDICKSDICKS\</body\>\</html\> > DICKS.HTML

Name: Anonymous 2009-08-08 3:35

<html><body>DICKSDICKSDICKS</body></html> > DICKS.HTML

no need for echo

Name: Anonymous 2009-08-08 3:36

>>6
#!/bin/sh
echo '<html><body>DICKSDICKSDICKS</body></html>' > DICKS.HTML

Optimized that for you.

Name: Anonymous 2009-08-08 4:00

<?$c="DICKS";file_put_contents("$C.HTML","<html><body>$c$c$c</body></html>"

Name: Anonymous 2009-08-08 4:01

d=DICKS;echo "<html><body>$d$d$d</body></html>">$d.HTML
Optimized that for you.

Name: Anonymous 2009-08-08 4:11

>>4 116 bytes
>>5 218 bytes
>>6 79 bytes
>>7 54 bytes
>>8 72 bytes
>>9 76 bytes
>>10 55 bytes

Name: 2009-08-08 4:20

open('data:,¬¬¬')

Name: Anonymous 2009-08-08 4:35

import java.io.*;
public class Dicks {
    public static void main(String[] args) throws IOException {
        PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(new File("DICKS.HTML"))));
        pw.write("<html><body>DICKSDICKSDICKS</body></html>");
        pw.close();
    }
}

Name: Anonymous 2009-08-08 5:10

<?php

function dicks()
        {
                print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
                print("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\n");
                print("        \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n");
                print("\n");
                print("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n");
                print("<head>\n");
                print("        <meta http-equiv=\"Content-type\" content=\"text/html;charset=us-ascii\" />\n");
                print("        <title>DICKS</title>\n");
                print("</head>\n");
                print("\n");
                print("<body>\n");
                print("\n");
                print("        <p id=\"dicks\">DICKSDICKSDICKS</p>\n");
                print("\n");
                print("        <p id=\"valid\">\n");
                print("                <a href=\"http://validator.w3.org/check?uri=referer\">\n");
                print("                        <img src=\"http://www.w3.org/Icons/valid-xhtml11\"\n");
                print("                             alt=\"Valid XHTML 1.1\"\n");
                print("                             height=\"31\"\n");
                print("                             width=\"88\"\n");
                print("                        />\n");
                print("                </a>\n");
                print("        </p>\n");
                print("\n");
                print("</body>\n");
                print("</html>\n");
                \n");
        } 
       
dicks();

?>

Name: Anonymous 2009-08-08 5:56

>>11
>>7 54 bytes
Doesn't count if it's not valid code.

Name: Anonymous 2009-08-08 6:24

I have modified the HQ9+ language to include the 'd' instruction, which prints <html><body>DICKSDICKSDICKS</body></html>" to a file named ``DICKS.HTML''. Here is the complete programme:

d

Name: Anonymous 2009-08-08 6:41

>>16
My fork of HQ9+(HQ++) treats empty files as instruction to do the above in 0 bytes.

Name: xkcd 2009-08-08 6:43

In my world all you need is butterfly flapping its wings in special manner to trigger >>17 (no files required)

Name: Anonymous 2009-08-08 6:51

>>18
Eat cheeseburgers, Randy!

Name: Anonymous 2009-08-08 8:47

#include <stdio.h>
int main()
{
     FILE *fp;
     fp = fopen("DICKS.HTML", "w");
     fputs("<html><body>DICKSDICKSDICKS</body></html>", fp);
     fclose(fp);
}


A few lines shorter than the C++ one. >>5

dicks.exe      15.6 KB
dicks++.exe    464 KB


What the fuck is that about?

Name: Anonymous 2009-08-08 9:03

>>20
lol Sepples

Name: QBasic 2009-08-08 9:03

10 OPEN FILE "DICKS.HTML" AS #1
20 PRINT #1, "<html><body>DICKSDICKSDICKS</body></html>"
30 CLOSE #1

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !frozEn/KIg 2009-08-08 9:26

main(){fputs("<html><body>DICKSDICKSDICKS</body></html>",fopen("DICKS.HTML","w"));}
83 bytes source, run with Tiny C Compiler.
1536 bytes .exe 586bytes compressed in 7z(PPMD)


_______________________________
http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
Justice is not revenge - it's deciding for a solution that is oriented towards peace, peace being the harder but more human way of reacting to injury. That is the very basis of the idea of rights.

Name: Anonymous 2009-08-08 9:27

open$f,'>DICKS.HTML';print$f '<html><body>','DICKS'x3,'</body></html>'

Name: Anonymous 2009-08-08 9:28

One liner
(with-output-to-file "DICKS.HTML" (lambda () (display "<html><body>DICKSDICKSDICKS</body></html>")))

Name: Anonymous 2009-08-08 9:30

>>25
I see >>4 already beat me to it, damn

Name: Anonymous 2009-08-08 9:58

Complete ELF executable, 146 bytes. dump into a binary file using xxd.

0000000: 7f45 4c46 0101 0100 0000 0000 0000 0000  .ELF............
0000010: 0200 0300 0100 0000 5480 0408 3400 0000  ........T...4...
0000020: a400 0000 0000 0000 3400 2000 0100 2800  ........4. ...(.
0000030: 0300 0200 0100 0000 0000 0000 0080 0408  ................
0000040: 0080 0408 9200 0000 9200 0000 0500 0000  ................
0000050: 0010 0000 b004 31db 43b9 6980 0408 31d2  ......1.C.i...1.
0000060: b229 cd80 31c0 40cd 803c 6874 6d6c 3e3c  ....1.@..<;html><
0000070: 626f 6479 3e44 4943 4b53 4449 434b 5344  body>DICKSDICKSD
0000080: 4943 4b53 3c2f 626f 6479 3e3c 2f68 746d  ICKS</body></htm
0000090: 6c3e                                     l>

Name: Anonymous 2009-08-08 10:01


0000000: 7f45 4c46 0101 0100 0000 0000 0000 0000  .ELF............
0000010: 0200 0300 0100 0000 5480 0408 3400 0000  ........T...4...
0000020: a400 0000 0000 0000 3400 2000 0100 2800  ........4. ...(.
0000030: 0300 0200 0100 0000 0000 0000 0080 0408  ................
0000040: 0080 0408 9200 0000 9200 0000 0500 0000  ................
0000050: 0010 0000 b004 31db 43b9 6980 0408 31d2  ......1.C.i...1.
0000060: b229 cd80 31c0 40cd 803c 6874 6d6c 3e3c  ....1.@..<;;html><
0000070: 626f 6479 3e44 4943 4b53 4449 434b 5344  body>DICKSDICKSD
0000080: 4943 4b53 3c2f 626f 6479 3e3c 2f68 746d  ICKS</body></htm
0000090: 6c3e

Name: Anonymous 2009-08-08 10:15

>>23
fputs before fopen() and then failing to close the fucking file
Jesus Christ you are the most useless piece of shit excuse for a "programmer" on the face of the planet.

Name: Anonymous 2009-08-08 10:52

>>29
fputs before fopen() and then failing to close the fucking file
Jesus Christ you are the most useless piece of shit excuse for a "programmer" on the face of the planet.

Name: Anonymous 2009-08-08 11:01

ruby -e'puts"<html><body>#{"DICKS"*3}</body></html>"'>DICKS.HTML

Name: Anonymous 2009-08-08 11:07

>>30
Frozen-Crybaby getting grouchy and posting as Anonymous
I'm sorry your threads have been spoiled pal ;(  Maybe one of the other chans will give a shit about your visionary vaporware project.

Name: Anonymous 2009-08-08 11:16

this is so stupid, why don't you just make a DICKS.HTML file.. fuck making a program to do it

Name: Anonymous 2009-08-08 11:45

>>32
Sure, hide behind your paranoia, but you still can't program for shit.

Name: Anonymous 2009-08-08 12:44

#! cat>DICKS.HTML
<html><body>DICKSDICKSDICKS</body></html>

Name: Shitnipple 2009-08-08 12:53

>>32
fopen()'s return value is being passed to fputs. Files are closed on exit(). You fucking lose.

Name: Anonymous 2009-08-08 17:17


echo "<html><body>DICKSDICKSDICKS</body></html>" > DICKS.HTML

Name: Anonymous 2009-08-08 19:49

dicks
S a = "/DICKS.HTML" O a:"NWS" U a W "<html><body>DICKSDICKSDICKS</body></html>" C a Q

Compiles and runs successfully. Written in MUMPS.

Name: Anonymous 2009-08-08 22:59

>>35
Not only does this not work, but it's also retarded.

Name: Anonymous 2009-09-12 10:28

hi

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