Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
7 deleted 9 characters in body
source | link

C (gcc), 131, 116, 90 89, 89, 87 bytes

L(l,a,v,A){for(A=5,v=1000;A;vv=1e3;A--;v-=a)printf("%d\n"+!a*2,a=--Aa=l>59|A<3&l>44?(l>59|A<3&l>44)*randrand()%-~v:v!A*v);}

Try it online!Try it online!

Update: Fixed a bug in the original. Fused in the helper function, reducing an additional 15 bytes.

Update 2: -25 bytes thanks to ErikF.

Update 3: -1 byte thanks to ceilingcat.

Degolf

L(l,a,v,A){
    for(A=5,v=1000;A;vv=1e3;A--;v-=a)
        printf("%d\n"+!a*2, // No clue how this works anymore, but it'll advance the pointer 
                            // to the string constant when a number shouldn't be printed.
        a=--A? // Is bottom layera=l>59|A<3&l>44?
        (l>59|A<3&l>44)*randrand()%-~v // Random integer to print in [0, v]
        :v!A*v); // If bottom layer, return remaining volume
}

C (gcc), 131 116 90 89 bytes

L(l,a,v,A){for(A=5,v=1000;A;v-=a)printf("%d\n"+!a*2,a=--A?(l>59|A<3&l>44)*rand()%-~v:v);}

Try it online!

Update: Fixed a bug in the original. Fused in the helper function, reducing an additional 15 bytes.

Update 2: -25 bytes thanks to ErikF.

Degolf

L(l,a,v,A){
    for(A=5,v=1000;A;v-=a)
        printf("%d\n"+!a*2, // No clue how this works anymore, but it'll advance the pointer 
                            // to the string constant when a number shouldn't be printed.
        a=--A? // Is bottom layer?
        (l>59|A<3&l>44)*rand()%-~v // Random integer to print in [0, v]
        :v); // If bottom layer, return remaining volume
}

C (gcc), 131, 116, 90, 89, 87 bytes

L(l,a,v,A){for(A=5,v=1e3;A--;v-=a)printf("%d\n"+!a*2,a=l>59|A<3&l>44?rand()%-~v:!A*v);}

Try it online!

Update: Fixed a bug in the original. Fused in the helper function, reducing an additional 15 bytes.

Update 2: -25 bytes thanks to ErikF.

Update 3: -1 byte thanks to ceilingcat.

Degolf

L(l,a,v,A){
    for(A=5,v=1e3;A--;v-=a)
        printf("%d\n"+!a*2, // No clue how this works anymore, but it'll advance the pointer 
                            // to the string constant when a number shouldn't be printed.
        a=l>59|A<3&l>44?rand()%-~v // Random integer to print in [0, v]
        :!A*v); // If bottom layer, return remaining volume
}
6 deleted 3 characters in body
source | link

C (gcc), 131 116 90 89 bytes

L(l,a,v,A){for(A=5,v=1000;A;v-=a)printf("%d\n"+!a*2,a=--A?(l>59|A<3&l>44)*rand()%-~v:v);}

Try it online!

Update: Fixed a bug in the original. Fused in the helper function, reducing an additional 15 bytes.

Update 2: -25 bytes thanks to ErikF.

Degolf

L(l,a,v,A){
    for(A=5,v=1000;A;v-=a)
        printf("%d\n"+!a*2, // No clue how this works anymore, but it'll advance the pointer 
                            // to the string constant when a number shouldn't be printed.
        a=--A? // Is bottom layer?
        (l>59|A<3&l>44)*rand()%-~v // Random integer to print in [0, 1000]v]
        :v); // If bottom layer, return remaining volume
}

C (gcc), 131 116 90 89 bytes

L(l,a,v,A){for(A=5,v=1000;A;v-=a)printf("%d\n"+!a*2,a=--A?(l>59|A<3&l>44)*rand()%-~v:v);}

Try it online!

Update: Fixed a bug in the original. Fused in the helper function, reducing an additional 15 bytes.

Update 2: -25 bytes thanks to ErikF.

Degolf

L(l,a,v,A){
    for(A=5,v=1000;A;v-=a)
        printf("%d\n"+!a*2, // No clue how this works anymore, but it'll advance the pointer 
                            // to the string constant when a number shouldn't be printed.
        a=--A? // Is bottom layer?
        (l>59|A<3&l>44)*rand()%-~v // Random integer to print in [0, 1000]
        :v); // If bottom layer, return remaining volume
}

C (gcc), 131 116 90 89 bytes

L(l,a,v,A){for(A=5,v=1000;A;v-=a)printf("%d\n"+!a*2,a=--A?(l>59|A<3&l>44)*rand()%-~v:v);}

Try it online!

Update: Fixed a bug in the original. Fused in the helper function, reducing an additional 15 bytes.

Update 2: -25 bytes thanks to ErikF.

Degolf

L(l,a,v,A){
    for(A=5,v=1000;A;v-=a)
        printf("%d\n"+!a*2, // No clue how this works anymore, but it'll advance the pointer 
                            // to the string constant when a number shouldn't be printed.
        a=--A? // Is bottom layer?
        (l>59|A<3&l>44)*rand()%-~v // Random integer to print in [0, v]
        :v); // If bottom layer, return remaining volume
}
5 Corrected typo in degolf
source | link

C (gcc), 131 116 90 89 bytes

L(l,a,v,A){for(A=5,v=1000;A;v-=a)printf("%d\n"+!a*2,a=--A?(l>59|A<3&l>44)*rand()%-~v:v);}

Try it online!

Update: Fixed a bug in the original. Fused in the helper function, reducing an additional 15 bytes.

Update 2: -25 bytes thanks to ErikF.

Degolf

L(l,a,v,A){
    for(A=5,v=1000;A;v-=a)
        printf("%d\n"+!a*2, // No clue how this works anymore, but it'll advance the pointer 
                            // to the string constant when a number shouldn't be printed.
        a=--A? // Is bottom layer?
        (l>59|A<3&l>44)*rand()%-~v // Random integer to print in [0, 1000]
        :v); // If bottom layer, return remaining volume;volume
}

C (gcc), 131 116 90 89 bytes

L(l,a,v,A){for(A=5,v=1000;A;v-=a)printf("%d\n"+!a*2,a=--A?(l>59|A<3&l>44)*rand()%-~v:v);}

Try it online!

Update: Fixed a bug in the original. Fused in the helper function, reducing an additional 15 bytes.

Update 2: -25 bytes thanks to ErikF.

Degolf

L(l,a,v,A){
    for(A=5,v=1000;A;v-=a)
        printf("%d\n"+!a*2, // No clue how this works anymore, but it'll advance the pointer 
                            // to the string constant when a number shouldn't be printed.
        a=--A? // Is bottom layer?
        (l>59|A<3&l>44)*rand()%-~v // Random integer to print in [0, 1000]
        :v) // If bottom layer, return remaining volume;}

C (gcc), 131 116 90 89 bytes

L(l,a,v,A){for(A=5,v=1000;A;v-=a)printf("%d\n"+!a*2,a=--A?(l>59|A<3&l>44)*rand()%-~v:v);}

Try it online!

Update: Fixed a bug in the original. Fused in the helper function, reducing an additional 15 bytes.

Update 2: -25 bytes thanks to ErikF.

Degolf

L(l,a,v,A){
    for(A=5,v=1000;A;v-=a)
        printf("%d\n"+!a*2, // No clue how this works anymore, but it'll advance the pointer 
                            // to the string constant when a number shouldn't be printed.
        a=--A? // Is bottom layer?
        (l>59|A<3&l>44)*rand()%-~v // Random integer to print in [0, 1000]
        :v); // If bottom layer, return remaining volume
}
4 deleted 84 characters in body
source | link
3 added 137 characters in body
source | link
2 deleted 139 characters in body
source | link
1
source | link