• (disco)

    If pasting 4096 zeroes in your source file is easier than using a for loop or constructor the perpetrator better be a Vi or Emacs user. Then again, that somebody might be paid by SBOC.

  • (disco)

    TRWTF is the use of both string and String.

    var s = new String("000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
    

    There, much better.

    EDIT: Added the zeros that had been deliberately removed by Remy.

  • (disco) in reply to Placeholder
    s = '0' * 4096
    

    if you're looking to golf, python is even better.

  • (disco) in reply to Placeholder
    Placeholder:

    TRWTF is the use of both string and String.

    var s = new String("0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
    

    There, much better.

    TRRWTF is not making it a const.

    const var s = new String("0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
    

    :trolleybus:

    INB4 You can't do const var

  • (disco) in reply to abarker

    TRRRWTF is forgetting the variable name

    const var s = new String("0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
    
  • (disco) in reply to Placeholder

    You can't prove anything.

  • (disco)
    var s = '';
    for(var i = 4096; i > 0; --i) {
        var x = 0;
        for(; x < 32; +x++);
        s = (char)x + s;
    }
    
  • (disco) in reply to accalia
    var s = new String('0', 4096);
    
  • (disco) in reply to abarker

    you copied that one from teh article.

    and it is significanl;ty less WTFY than my suggestion

  • (disco) in reply to accalia

    No I didn't. I didn't read that far into the article. :P

    Plus, mine uses var. ;)

  • (disco) in reply to abarker
    abarker:
    Plus, mine uses var.

    AH! so you did read the article!

  • (disco) in reply to accalia
    accalia:
    abarker:
    Plus, mine uses var.

    AH! so you did read the article!

    After you accused me.

  • (disco) in reply to abarker

    :factory:s are a :barrier: to :statue_of_liberty:

  • (disco) in reply to abarker

    All of those uses of var weren't quite convenient enough.

    var s = Enumerable.Repeat("0", 4096);
    

    This is a much more convenient use of var

  • (disco) in reply to abarker

    Also,

    abarker:
    You can't prove anything.

    I beg to differ. [image] Completely irrefutable evidence. You think you could get away with such :hanzo: edits? <INB4 someone screenshots one of my posts before I edit all the tyops out>

  • (disco) in reply to accalia
    accalia:
    and it is significanl;ty less WTFY than my suggestion

    :wtf:y enough for you? I even made mine into a function able to produce the variable output sizes, with a misleading input variable name!

    public String ZeroedBitString(double megaBytes)
    {
        int z = (int)Math.Floor(megaBytes * 1024);
        z = z * 2;
        var s;
        var c = 0;
        var l = 0;
        while (z-- > c++)
        {
            var s = l.ToString() + s;
        }
    
        return (string)s;
    }
    
  • (disco) in reply to Placeholder
    Placeholder:
    Completely irrefutable evidence. You think you could get away with such :hanzo: edits? <INB4 someone screenshots one of my posts before I edit all the tyops out>

    Such paltry screenshots are easy to fake.

    [image]

    See?

    Looks like you INB4d the wrong thing. ;)

  • (disco) in reply to Placeholder

    i can use devtools too.

    [image]
  • (disco) in reply to abarker

    Needs more LINQ.

    public String ZeroedBitString(double megaBytes)
    {
        int z = (int)Math.Floor(megaBytes * 1024);
        return String.Join("", Enumerable.Repeat(new List<string> { "0" }, z).SelectMany(x => x));
    }
    
  • (disco) in reply to Placeholder

    i like the typo there.

    Placeholder:
    megaBytes

    shouldn't that be kilobytes as you're only multiplying by 1024?

  • (disco) in reply to accalia
    accalia:
    i like the typo there.
    Placeholder:
    megaBytes

    shouldn't that be kilobytes as you're only multiplying by 1024?

    That's mine, and fully intentional.

    abarker:
    with a misleading input variable name!
  • (disco) in reply to accalia
    accalia:
    shouldn't that be kilokibibytes as you're only multiplying by 1024?

    HTH, HAND etc...

  • (disco) in reply to PJH

    [image]                

  • (disco) in reply to accalia
    accalia:
    python is even better.

    Perl

    $s = 0 x 4096;
    
  • (disco)

    TRWTF is that the original string seems to be 4081 bytes and not 4096 bytes?

  • (disco)

    Amazing is that in such a short article Remy still manages to get 2 Html comments. Remy, was it zero number 1234 or 666? I couldn't quite be sure which..and of course I have to ask is that numbered from "000000000000000000000000000000000000000000000000000000000000000000000000000000000...."

  • (disco)

    Alice also gets a zero:

    string s = new String("0", 4096);
    
  • (disco) in reply to Martin_Bene

    TRWTF is making a change like this likely to cause breakage when the new string is a different length than the old one...

  • (disco) in reply to RFoxmich
    RFoxmich:
    Amazing is that in such a short article Remy still manages to get 2 Html comments.

    He did the Easter egg wrong, though, because he didn't make it hard enough to find. He should have deleted a zero, then copied one of the other zeros, pasting the copy in the wrong place, then dared people to find all three problems. That would have been a proper three Easter egg problem.

  • (disco) in reply to CoyneTheDup

    That's boring though, a real master of mischief would put an uppercase 'O' in there.


    Filed under: Better commit it under somebody else's name though

  • (disco)

    I only made it 4082 '0's

  • (disco)

    ++<<+>>-[>>+]>><<<<>>[>[>[>+++---+-->]<<+]-]

    +-+[+>[-<]]

    ++++++++++++++++++++++++++++++++++++++++++++++++............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. +.<-+.>>+-.<<--

    I would do it like this.

  • (disco) in reply to isthisunique

    LOL...use back ticks.

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

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

  • (disco) in reply to boomzilla

    I broke it with editing.

  • (disco) in reply to isthisunique

    I hate you.

  • (disco)

    TRRRRWTF is a variable named s

  • (disco)
    let s = repeat('0').take(4096).collect();
    
  • (disco)

    Obviously, we could omit the String constructor altogether to optimize for speed:

    string s = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
    

    (As no compiler would ever be able to detect that the arguments of the constructor are constants)

    Or, as 4096 is a power of 2, we can use

    var s = new String("0",(int)Math.Pow(2,0));
    for (var i = 0; i < Math.Log(4096, 2); i++) {
      s += s;
    };
    
    Placeholder:
    Needs more LINQ.
    return Range(0, n).AsEnumerable().Distinct().Aggregate<int, string, string>("", (string x, int y, string z) => x + z, (string x) => x.ToString());
  • (disco)

    It was a Unary program that moves the pointer to the right and does nothing else. Okay then.

  • (disco) in reply to Martin_Bene

    Only 4081 characters, yes. The number of bytes depends.

  • (disco)

    No, this is the new Zero:

    http://vignette2.wikia.nocookie.net/ninehourspersonsdoors/images/c/cc/Zero-Escape-3-Ann-Init-600x300.jpg

  • (disco)

    Aaaagh! The capitalized string! Don't you people ever consider that someone might want to use aString class from a different namespace some day? All of you are writing awful unmaintainable code!

  • (disco)

    It just crossed my mind that magic numbers are evil™.

    So we should use something like this:

    const int stringLength4096 = 4096;
    
    string s = repeatedZeroString(stringLength4096);
    
    // ...
    
    string repeatedZeroString(int stringLength4096) {
      return Range(0, 4096).AsEnumerable().Distinct().Aggregate<int, string, string>("", (int x, string y) => y + '0', (string x) => x.ToString());
    }
    
  • (disco) in reply to PWolff
    PWolff:
    string repeatedZeroString(int **stringLength4096**) { return Range(0, **4096**).AsEnumerable().Distinct().Aggregate<int, string, string>("", (int x, string y) => y + '0', (string x) => x.ToString()); }

    I hope this was intentional.

  • (disco) in reply to PWolff

    so it doesn't matter how many zeros you ask for repeatedZeroString() will always give you 4K.

    BRILLANT!

  • (disco) in reply to accalia

    Justified by that nobody would be so stupid to assign a constant with 4096 in its name anything else than 4096.

  • (disco) in reply to PWolff
    hungrier:
    I hope this was intentional.
    const int stringLength4096 = 4096;
    
    string s = repeatedZeroString(stringLength4096);
    
    // ...
    
    string repeatedZeroString(int stringLength4096) {
      return Range(0, this.stringLength4096).AsEnumerable().Distinct().Aggregate&lt;int, string, string&gt;("", (int x, string y) =&gt; y + '0', (string x) =&gt; x.ToString());
    }
    

    is that better? :tropical_fish:

  • (disco)

    TRWTF is nobody being afraid WHY there is a 4K '0'-filled string in the first place...

  • (disco) in reply to presidentsdaughter

    it's more we're afraid of the answer to that question.

  • (disco) in reply to presidentsdaughter

    I'm sure it makes sense in context.

Leave a comment on “The New Zero”

Log In or post as a guest

Replying to comment #:

« Return to Article