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

repetition

Name: Anonymous 2008-09-29 13:09

print "dongs" five times in your favorite language

with extreme conciseness/verbosity

Name: Anonymous 2008-09-29 13:14

print 'dongs'*5

Name: Anonymous 2008-09-29 13:16

5.times { print "Odelay!" }

Name: Anonymous 2008-09-29 13:21

"dongs" fünf Zeiten in Ihrer Lieblingssprache

Name: Anonymous 2008-09-29 13:25


main = sequence_ $ replicate 5 $ putStrLn "dongs"

Name: Anonymous 2008-09-29 13:57

#include <stdio.h>
main() {
    size_t i = 5;
    for ( ; i; --i, printf( "dongs" ) );
}

Name: Anonymous 2008-09-29 14:06

>>6
You need to include string.h to use size_t.

Name: Anonymous 2008-09-29 14:11

MsgBox String(5,"dongs ")

Name: Anonymous 2008-09-29 14:11

package org.fourchan.text.prog.hurrdurr;

import java.util.List;        // for storage
import java.util.ArrayList;   // concrete List class

public class Dong {
   // value of our Dong object
   private final String DONG = "Dong";

   // print the value of a list of dongs
   public static void main(String[] argv) {
      // declare the number of Dongs we want...
      final int NUM_DONGS = 5;
      // ...and store them in a List
      List<Dong> dongs = new ArrayList<Dong>(NUM_DONGS);
     
      // initialize our List of Dongs
      for (int i = 0; i < NUM_DONGS; i++) {
         dongs.add(new Dong());
      }

      // print the value of our Dongs
      for (Dong d : dongs) {
         System.out.println(d);
      }
   }

   // string representation of a Dong
   public String toString() {
      return this.DONG;
   }

}


c:\temp>javac org\fourchan\text\prog\hurrdurr\Dong.java

c:\temp>java org.fourchan.text.prog.hurrdurr.Dong
Dong
Dong
Dong
Dong
Dong

Name: Anonymous 2008-09-29 14:15

print 'dongs'*5

Name: Anonymous 2008-09-29 14:23

printf("\"dongs\" five times in your favorite language.");

Name: Anonymous 2008-09-29 14:25

>>10
THAT'S PRETTY COOL COPYPASTA.

Name: Anonymous 2008-09-29 14:45

import Control.Monad.Instances

main = putStrLn $ unwords $ (map =<< const) "dongs"

Name: Anonymous 2008-09-29 14:49

import Control.Monad.Instances

main = (mapM_ =<< const . putStrLn ) "dongs"

Name: Anonymous 2008-09-29 15:16

(print-dongs-five-times)

Name: Anonymous 2008-09-29 16:15


i=0
while [ "${i}" -lt 5 ]; do
    echo "dongs"
    i=`expr "${i}" + 1`
done

Name: Anonymous 2008-09-29 16:20

main = do
  putStrLn "dongs"
  putStrLn "dongs"
  putStrLn "dongs"
  putStrLn "dongs"
  putStrLn "dongs"

Name: Anonymous 2008-09-29 16:23

>>17 see >>5

Name: Anonymous 2008-09-29 16:31

import Control.Monad.Instances
import List

main = mapM_ (putStrLn . intersperse ' ') $ transpose $ (map =<< const) "dongs"

Name: Anonymous 2008-09-29 16:40

>>19
Explain how (map =<< const) works, please.

Name: Anonymous 2008-09-29 16:43

print 'dongs'x5
VALID PERL CODE

Name: Anonymous 2008-09-29 16:46

>>12
...

Name: Anonymous 2008-09-29 16:46

>>20
Lern2lambdabot.

Name: Anonymous 2008-09-29 16:56

dongs dongs dongs dongs dongs

Name: Anonymous 2008-09-29 16:59

>>20
magic!

Name: Anonymous 2008-09-29 17:27


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<<<<<<<<<<<<<<<<<<<<<<<<<<<<[.>]

Name: Anonymous 2008-09-29 17:29

>>24
VALID PHP CODE

Name: Anonymous 2008-09-29 17:35

Name: Anonymous 2008-09-29 17:40

>>27
Parse error: syntax error, unexpected T_STRING in Command line code on line 1

Fixed: dongsdongsdongsdongsdongs;

Name: Anonymous 2008-09-29 18:33

;; quintupledongs - displays ``dongs'' five times.
;; based on http://dis.4chan.org/read/prog/1204983387/529
;;

;; This is an example of the sort of computer programs you can write
;; after learning Scheme.
;;
;; Copyright (c) 2008
Christopher
;; Contributers:
Robert
;;
;; Permission is hereby granted, free of charge, to any person obtaining a copy
;; of this software and associated documentation files (the "Software"), to deal
;; in the Software without restriction, including without limitation the rights
;; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
;; copies of the Software, and to permit persons to whom the Software is
;; furnished to do so, subject to the following conditions:
;;
;; The above copyright notice and this permission notice shall be included in
;; all copies or substantial portions of the Software.
;;
;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
;; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
;; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
;; THE SOFTWARE.

(write "dongs")
(write "dongs")
(write "dongs")
(write "dongs")
(write "dongs")

Name: Anonymous 2008-09-29 19:29

(for-each (lambda (x) (display "sgnod")) (range 0 5)))

Name: Anonymous 2008-09-29 19:37

10 CLS
20 FOR I = 1 TO 5
30 PRINT "dongs"
40 NEXT I
50 END

Name: Anonymous 2008-09-29 22:29


<html>
   <body>
      <p>
         dongs<br/>
         dongs<br/>
         dongs<br/>
         dongs<br/>
         dongs
      </p>
   </body>
</html>

Name: Anonymous 2008-09-29 22:52

$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaacbcbbbb
bbbcaaaaaaaaaaaacbbbbbbbbbbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
bbbbbbbbbbbb$l

Name: Anonymous 2008-09-29 22:54

cat dongs.txt

Name: Anonymous 2008-09-29 23:06

Name: Anonymous 2008-09-29 23:29

>>33
Your code doesn't compile on my system:
Line 1, Column 0: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>".
Line 2, Column 8: document type does not allow element "BODY" here.
Line 4, Column 17: NET-enabling start-tag requires SHORTTAG YES.
Line 5, Column 17: NET-enabling start-tag requires SHORTTAG YES.
Line 6, Column 17: NET-enabling start-tag requires SHORTTAG YES.
Line 7, Column 17: NET-enabling start-tag requires SHORTTAG YES.
Line 11, Column 6: end tag for "HTML" which is not finished.

Name: Anonymous 2008-09-29 23:31

fixed
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"">
<title/>
<body>
<ul>
<li>dongs</li>
<li>dongs</li>
<li>dongs</li>
<li>dongs</li>
<li>dongs</li>
</ul>
</body>
</html>

Name: Anonymous 2008-09-29 23:44

>>38
still buggy :(

Name: TRUE LISP WEENIE 2008-09-30 0:15

dongs M-bkspc C-yyyyy

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