Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: Yet another unknown language

  1. #11
    Guest

    Re: Yet another unknown language

    In danish we would call that slamkode... I won't even bother to translate it for ya.

  2. #12
    Guest

    Re: Yet another unknown language

    In ghetto canadian french you could say: De la tabarnac de crisse d'asti de sainte marde de calice. I am not sure that english has enough curses to translate that.

  3. #13
    Guest

    Re: Yet another unknown language


    I am not sure that english has enough curses to translate that.
    Which is why we have french... probably the single rudest language on the face of the earth.

  4. #14
    Guest

    Re: Yet another unknown language

    I stopped Perl after 12 hours.

  5. #15

    Re: Yet another unknown language

    Can you post your perl code?

  6. #16
    Guest

    Re: Yet another unknown language

    Code:
    #!/usr/bin/env perl
    
    use Math::BigInt;
    
    sub fact
    {
     $total = new Math::BigInt 1;
     for($i=1; $i<=$_[0]; $i++)
     {
      $total *= $i;
     }
     return $total;
    }
    
    die "Usage: $0 <Integer>\n" if (@ARGV < 1);
    print fact($ARGV[0])."\n";

    And while we're at it:

    Code:
    #!/usr/bin/env python
    
    import sys
    
    def fact(n):
     total = 1
     for i in xrange(1, n+1):
      total *= i
    
     return total
    
    
    def main():
    
     if len(sys.argv) < 2:
      print "Usage: %s <Integer>" % sys.argv[0]
      sys.exit(1)
    
     try:
      target = abs(int(sys.argv[1]))
     except:
      print "Illegal number"
      sys.exit(1)
     
    
     print fact(target)
    
    if __name__ == '__main__':
     main()

  7. #17

    Re: Yet another unknown language

    What was the number you used?

  8. #18
    Guest

    Re: Yet another unknown language

    65536

  9. #19

    Re: Yet another unknown language

    It's hella faster if you don't use the BigInt package, but then again the results aren't as good

    Code:
    $ time ./test.pl 65535
    inf
    
    real  0m0.750s
    user  0m0.290s
    sys   0m0.020s
    ;D

  10. #20
    Guest

    Re: Yet another unknown language

    :

    Edit: You couldn't make it faster, could you?

Similar Threads

  1. Unknown Hard Error = ?
    By -=<Night Wolf>=- in forum Windows - General Topics
    Replies: 2
    Last Post: 09-19-2005, 01:20 PM
  2. Unknown Error at startup
    By shakirz1 in forum Linux - General Topics
    Replies: 0
    Last Post: 11-19-2004, 07:07 AM
  3. Squirrel Mail-unknown user or password incorrect
    By rhonneil in forum Linux - Hardware, Networking & Security
    Replies: 0
    Last Post: 10-31-2003, 08:33 AM
  4. ping: unknown host yahoo.com
    By rhonneil in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 10-05-2003, 11:13 PM
  5. unknown hardware, is knoppix the ultimate driver software?
    By sujoki in forum Linux - Hardware, Networking & Security
    Replies: 3
    Last Post: 09-04-2003, 12:41 AM

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
  •