Author |
Message |
wtd
|
Posted: Sat Oct 21, 2006 1:22 pm Post subject: Programs that do nothing |
|
|
So... what do programs that do nothing look like?
Well, if you're a Perl, Ruby, Python, O'Caml, SML, Lisp, etc. programmer, it looks like this:
If you're a Java programmer, it looks like this:
code: | public class EmptyProgram {
public static void main(String[] args) {
}
} |
If you're a C# programmer:
code: | public class EmptyProgram {
public static void Main(string[] args) {
}
} |
If you're a C or C++ programmer:
If you're a Pascal programmer:
code: | program X;
begin
end. |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Clayton
|
Posted: Sat Oct 21, 2006 4:09 pm Post subject: (No subject) |
|
|
if your an HTML/PHP programmer it looks something like this:
code: |
<html>
<head>
</head>
<body>
</body>
</html>
|
if your a Turing programmer it looks like this:
if your an O'Caml programmer it looks something like this:
|
|
|
|
|
|
wtd
|
Posted: Sat Oct 21, 2006 5:02 pm Post subject: (No subject) |
|
|
The # is not part of an O'Caml program. Rather it denotes the prompt when using the O'Caml toplevel interpreter. |
|
|
|
|
|
blaster009
|
Posted: Sat Oct 21, 2006 6:40 pm Post subject: (No subject) |
|
|
wtd wrote: The # is not part of an O'Caml program. Rather it denotes the prompt when using the O'Caml toplevel interpreter.
Pwned. |
|
|
|
|
|
md
|
Posted: Sat Oct 21, 2006 7:19 pm Post subject: (No subject) |
|
|
Freakman wrote: if your an HTML/PHP programmer it looks something like this:
code: |
<html>
<head>
</head>
<body>
</body>
</html>
|
Technically you just need an empty file for nothing in html/xhtml. It renders fine |
|
|
|
|
|
wtd
|
Posted: Sat Oct 21, 2006 7:24 pm Post subject: (No subject) |
|
|
blaster009 wrote: wtd wrote: The # is not part of an O'Caml program. Rather it denotes the prompt when using the O'Caml toplevel interpreter.
Pwned.
It's an honest mistake, very much redeemed by his interest in learning a language for fun. |
|
|
|
|
|
Cervantes
|
Posted: Sat Oct 21, 2006 9:41 pm Post subject: (No subject) |
|
|
blaster009 wrote: wtd wrote: The # is not part of an O'Caml program. Rather it denotes the prompt when using the O'Caml toplevel interpreter.
Pwned.
I don't know if you thought that was funny, but I didn't. In fact, I didn't even see the "word" "Pwned." All I saw was "SPAM SPAM SPAM SPAM SPAM!"
I hope you can see where I'm going with this: one word posts, especially when the only word is something stupid like "pwned", is pure spam, and will result in bad things.
minus some bits. |
|
|
|
|
|
md
|
Posted: Sat Oct 21, 2006 9:49 pm Post subject: (No subject) |
|
|
Cervantes wrote: <deletia>
... and will result in bad things.
You are starting to sound like me... using vague threats of "bad things" to acomplish things. It's shocking how well it works when you actually do implement a bad thing that truely is horrible.
Bash Script"
/me also notes that wtd didn't credit the pascal code |
|
|
|
|
|
Sponsor Sponsor
|
|
|
wtd
|
Posted: Sat Oct 21, 2006 9:57 pm Post subject: (No subject) |
|
|
md wrote:
Only necessary if you're unwilling to execute it as "bash nada.sh". |
|
|
|
|
|
Craige
|
Posted: Tue Oct 24, 2006 9:44 pm Post subject: (No subject) |
|
|
md wrote: Technically you just need an empty file for nothing in html/xhtml. It renders fine
Correct. The html tags are only for the browser's use, and when you put them in there, your are also making the assumption one is using PHP for the web. Good prediction, but not necessarily accurate. |
|
|
|
|
|
md
|
Posted: Tue Oct 24, 2006 9:47 pm Post subject: (No subject) |
|
|
Craige wrote:
Correct. The html tags are only for the browser's use, and when you put them in there, your are also making the assumption one is using PHP for the web. Good prediction, but not necessarily accurate.
I think you mean html/xhtml not PHP |
|
|
|
|
|
ZeroPaladn
|
Posted: Wed Oct 25, 2006 12:47 pm Post subject: (No subject) |
|
|
Turing that does nothing (except hog precious computing power, cause we all know Turing does that anyways)
Turing: | var zero : string := ""
procedure nothing ()
end nothing
function nothing2 (none : string) : int
var nada : int := 0
result nada
end nothing2
loop
nothing
if nothing2 (zero) = 0 then
nothing
end if
end loop
|
|
|
|
|
|
|
Silent Avenger
|
Posted: Wed Oct 25, 2006 2:18 pm Post subject: (No subject) |
|
|
Code for VB that does nothing but show an emty screen.
|
|
|
|
|
|
Andy
|
Posted: Wed Oct 25, 2006 2:28 pm Post subject: (No subject) |
|
|
ZeroPaladn wrote: Turing that does nothing (except hog precious computing power, cause we all know Turing does that anyways)
Turing: | var zero : string := ""
procedure nothing ()
end nothing
function nothing2 (none : string) : int
var nada : int := 0
result nada
end nothing2
loop
nothing
if nothing2 (zero) = 0 then
nothing
end if
end loop
|
just because you're not outputting anything, doesnt mean you're not doing anything. your program constantly allocates memory for your variables. it's doing plenty |
|
|
|
|
|
Tony
|
Posted: Wed Oct 25, 2006 2:49 pm Post subject: (No subject) |
|
|
Freakman wrote:
if your a Turing programmer it looks like this:
We are looking for the absolute minimum "Hello World", less the greeding.
And Turing's will still compile into a 600 Kb executable |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
|