Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Post the simplest quine you can think of

  1. #1
    Join Date
    Jun 2009
    Location
    Land of Paranoia and Guns
    Beans
    194
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Post the simplest quine you can think of

    Post the simplest quine you can think of in any language EXCEPT HQ9+.

    A quine is a program that prints its own source code.

    sh:
    Code:
    #This is a quine in sh.
    cat $0
    Yeah, yeah, I'm cheating.

    And a simpler one: (also cheap)

    Code:
    #!/bin/cat
    Last edited by epicoder; April 16th, 2010 at 02:11 PM.
    Don't use W3Schools as a resource! (Inconsequential foul language at the jump)
    Open Linux Forums (More foul language, but well worth it for the quality of support and good humor.)
    If you want to discuss W3Schools, please PM me instead of posting.

  2. #2
    Join Date
    Jul 2007
    Location
    The Internet
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Post the simplest quine you can think of

    That's pretty hard.

  3. #3
    Join Date
    May 2007
    Location
    East Yorkshire, England
    Beans
    Hidden!

    Re: Post the simplest quine you can think of

    The null program. Ok, so it's cheating. Oh well
    Website | Blog | The Arch Hurd Project

    If you want to ask about something I posted, send a PM, as I don't watch many threads

  4. #4
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: Post the simplest quine you can think of

    Quote Originally Posted by sh228 View Post
    sh:
    Code:
    #This is a quine in sh.
    cat $0
    Only works if the script doesn't have spaces in its filename.

  5. #5
    Join Date
    Nov 2009
    Beans
    Hidden!

    Re: Post the simplest quine you can think of

    Here's one in C:

    Code:
    
    
    8-inch floppy disks must've been huge!

  6. #6
    Join Date
    Oct 2006
    Beans
    4,628
    Distro
    Kubuntu 18.10 Cosmic Cuttlefish

    Re: Post the simplest quine you can think of

    Quote Originally Posted by Simon17 View Post
    Here's one in C:

    Code:
    
    
    Looks more like ninja.
    Blog | Ubuntu User #15350 | Zsh FTW | Ubuntu Security | Nothing to hide?
    AMD Phenom II X6 1075T @ 3GHz, Nvidia GTX 650, 8GB DDR3 RAM, 1 X 1TB, 2 X 3TB HDD
    Please don't request support via PM


  7. #7
    Join Date
    Oct 2007
    Beans
    674
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Post the simplest quine you can think of

    Programming hurts my head.
    Acer Swift 3 (SF314-42-R7LH)

  8. #8
    Join Date
    Mar 2010
    Beans
    122
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Post the simplest quine you can think of

    Quote Originally Posted by Simon17 View Post
    Here's one in C:

    Code:
    
    
    Well, that's it. Somebody close the thread.

  9. #9
    Join Date
    Aug 2005
    Location
    Birmingham, AL
    Beans
    974
    Distro
    Kubuntu

    Re: Post the simplest quine you can think of

    CBM BASIC:

    Code:
    10 LIST
    (Edit: Apparently this board software doesn't like all caps posting, even when appropriate. )
    Last edited by DoktorSeven; April 15th, 2010 at 08:09 PM.

  10. #10
    Join Date
    Jan 2008
    Beans
    1,532

    Re: Post the simplest quine you can think of

    Quote Originally Posted by Simon17 View Post
    Here's one in C:

    Code:
    
    
    Code:
    [ian@sanpedro ~]$ cat temp.c 
    [ian@sanpedro ~]$ gcc temp.c
    /usr/lib/gcc/i686-redhat-linux/4.4.3/../../../crt1.o: In function `_start':
    (.text+0x18): undefined reference to `main'
    collect2: ld returned 1 exit status
    [ian@sanpedro ~]$
    Nope. In some languages yes, but not in C.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •