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-09-12 10:38

>>5
dicks.close();
I lol'd at this for some reason

Name: Anonymous 2009-09-12 10:56

GEE, WE HAVEN'T HAD THIS THREAD IN A WHILE.

Name: Anonymous 2009-09-12 11:20

This thread (still) sucks. And I'd urge everyone to properly encapsulate their dicks, perhaps using the GoF "Dick in a Box" pattern. You'll be glad you did, and so will she.

Name: Anonymous 2009-09-12 11:31

>>20
dicks.exe      15.6 KB
dicks++.exe    464 KB

a.out          1,2K
What the fuck is that about?

Name: Anonymous 2009-09-12 11:47

>>44

B-b-b-b-boilerplate.

Name: Anonymous 2009-09-12 11:58

# Forbes' Indentured Kobe
dicks = open("DICKS.HTML", "w")
dicks.write("<html><body>DICKSDICKSDICKS</body></html>")
dicks.close()

Name: Anonymous 2009-09-12 11:58

>>46

whoops

Name: Anonymous 2009-09-12 11:59


# Forbes' Indentured Kobe
dicks = open("DICKS.HTML", "w")
dicks.write("<html><body>DICKSDICKSDICKS</body></html>")
dicks.close()

Name: Anonymous 2009-09-12 13:28

cat z>DICKS.HTML

Name: Anonymous 2009-09-12 16:11


f=open("DICKS.html", "w")
f.write("<html><body>"+"DICKS"*3+"</body></html>")
f.close()

Name: Anonymous 2009-09-12 16:14

>>50
Did you mean
with open("Dicks.html","w") as f:
    f.write("<html><body>" + "DICKS"*3 + "</body></html>")
?

Name: Anonymous 2009-09-12 17:15

>>51
Oh, you can do that in Python? You learn something new every day.

Name: Anonymous 2009-09-12 17:48


import sys

write_file_mode = 'w'
output_file_to_write_dicks_in = 'D' + 'I' + 'C' + 'K' + 'S' + '.' + 'H' + 'T' + 'M' + 'L'
message_to_write_to_dicks_file = '<' + 'h' + 't' + 'm' + 'l' + '>' + '<' + 'b' + 'o' + 'd' + 'y' + '>' + 'D' + 'I' + 'C' + 'K' + 'S' + 'D' + 'I' + 'C' + 'K' + 'S' + 'D' + 'I' + 'C' + 'K' + 'S' + '<' + '/' + 'b' + 'o' + 'd' + 'y' + '>' + '<' + '/' + 'h' + 't' + 'm' + 'l' + '>'
sys_error_code_ok = 0

open_file_to_write_dicks_message_to = open(output_file_to_write_dicks_in,write_file_mode)
open_file_to_write_dicks_message_to.write(message_to_write_to_dicks_file)
open_file_to_write_dicks_message_to.flush()
open_file_to_write_dicks_message_to.close()

sys.exit(sys_error_code_ok)

Name: Anonymous 2009-09-12 20:04

I just created the "dicksdicksdicks" programming language for exactly this purpose. In the dicksdicksdicks language, ANY source code will compile to a program that does exactly what you requested - including the empty source file. So I just made an implementation with a zero length source file.

I win :)

Name: Anonymous 2009-09-12 20:53

>>54
Already been done.

Name: Anonymous 2009-09-12 21:36

newLISP

(eval-string(apply(fn(s r)(replace(first r)s r))'({(write-file "D.HTML" "<h<bDDD</h</b")}"html>""body>""DICKS")2))

Name: Anonymous 2009-09-12 23:41

>>51

Son of a bitch.

Name: Anonymous 2009-09-13 0:46

I'm surprised nobody has proposed a language that does this with no source file at all.

Name: Anonymous 2009-09-13 1:21

>>58
It has already been proposed.

Twice.

Name: Anonymous 2009-09-13 2:23

>>58
Do you even attempt to read a thread before posting in it?

Name: Anonymous 2009-09-13 3:23

>>56
6 chars shorter

(eval-string(apply(fn(s r)(replace(r 0)s r))'({(write-file"D.HTML""<h<bDDD</h</b")}"html>""body>""DICKS")2))

Name: Anonymous 2009-09-13 11:11

In a language I'm currently designing:

“DICKS.HTML”,“w”→Φ→α▪
“<html><body>%s</body></html>∗n”→γ▪
“DICKS”·3→δ▪
αγδ→Π▪
Ξ←α▪
0→Ω▪

Name: Anonymous 2009-09-13 11:17

>>62
Keep us informed on how that turns out :)

Name: Anonymous 2009-09-13 11:18

>>62
APL++

Name: Anonymous 2009-09-13 11:38

>>63
Currently I can't decide on the multiplication operator between ·, ★, ∗, ∘, × (·, ★, ∗, ∘, ×).

Name: Anonymous 2009-09-13 11:54

Name: Anonymous 2009-09-13 11:55

>>65
Maybe you should start by learning how to sage?

Name: Anonymous 2009-09-13 12:01

>>67
what?

Name: Anonymous 2009-09-13 19:30

>>63
I don't know if you were being sarcastic, but I just finished the parser in Haskell.
I changed the multiplication operator to × and the escape character to ♯.
Now to write the compiler...

Name: Anonymous 2009-09-13 20:42

>>66
that's actually the buddhist symbol for peace

Name: Anonymous 2009-09-13 20:45

>>70
So? Are you saying that it wouldn't make a good multiplication symbol?

Name: Anonymous 2009-09-13 21:34

>>70
The swastika is a lot older than Buddhism, and isn't a symbol for peace. It's just a general auspicious thing.
Maybe you thought you were clever by mentioning it, but by now, this sort of thing is common knowledge, in large part because of people like you who think half-remembered trivia is impressive.

Name: Anonymous 2010-12-22 11:18

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