Posts by General Sebast1an
Python 3, 167 127 118 117 94 63 bytes def f(a,b): y=0 for z in range(len(a)):y+=a[z]*b**z print(y) Try it online! Close gap to @user's lambda answer! Golfed 40 bytes thanks to @user's...
Convenient whitespace removal Here are instances where you can remove whitespace: Strings If you assigned or printed a string, then the next supposed line of code can lean on the right double-qu...
C (clang), 206 bytes main(i){char*s="YWUSQOMKIGECABDFHJLNPRTVXZ";for(i=13;i>0;printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n",s[-1+i],s[0+i],s[1+i],s[2+i],s[3+i],s[4+i],s[5+i],s[6+i],s[7+i],s[8+i],s[...
I'm bored. Let's do something. lmao While I was Somewhere Else, I went to make suggestions for designs on their sites, and no impact really occured. However, since I'm now a Codidactian (not a Cod...
jq --null-input --raw-output, 15 bytes "Hello, World!" Try it online! They kept saying that jq is the language of September 2021. Still surprised no one even made a Hello, World! on it.
Remove print's parentheses when it's a single string print strangely works without parentheses, however, it only applies to single strings. In other words, it can't do the same for other variables...
C (clang), 116 102 bytes j,k;f(i){for(j=i;j--;printf("#"));for(j=i-1;j--;printf("#"))for(k=i-2,printf("\n#");k--;printf(" "));} Try it online! Sometimes, it's better to use functions when yo...
Java (JDK), 134 123 118 bytes interface M{static void main(String[]a){System.out.print("Hello, "+new java.util.Scanner(System.in).nextLine()+"!");}} Try it online! Golfed 5 bytes thanks to @...
Lua's not really used much in golfing, so it'd be pretty cool to learn some golfing tricks when making answers using it. What golfing tips are there for Lua?
C (clang), 210 198 183 bytes i,j,k,l;s(v,w,x,y,z){printf("%s",v);for(;w<x;w++){printf("%s",y);}puts(z);}main(){scanf("%i",&i);l=i-3;s("╔",j,l,"╦","╗");for(j=0;j<i-2;j++){s("╠",k,l,"╬",...
What's a code bowling challenge? Code bowling is a challenge/competition to solve a particular (usually simple) problem in the most bytes or complexity. From CGCC Are there any additional criteri...
Python 3, 34 bytes x=0;y=1 while 1:x+=y;print(x);y+=2 Try it online! 1 is the int equivalent to True, which helps save bytes.
C (clang), 47 45 43 bytes i,j;main(){for(;printf("%i ",i-=~j);j+=2);} Try it online! Golfed 2 bytes from inspiration of @Shaggy's answer. Golfed 2 bytes by @m90.
graphical-output Usage info: Graphical output challenges involve outputting images or illustrations using graphics. Detailed wiki: (uses text from CGCC's) Graphical output challenges invol...
Abuse (as few) libraries (as possible) We don't want to use too much libraries when playing challenges. Sometimes, libraries aren't used at all in some answers in C. What if we want to shorten so...
Java (JDK), 80 bytes class A{public static void main(String[] A){System.out.print("Hello, World!");}} Try it online! This answer, except it's actually runnable.
PicoLisp, cracked by Shaggy, 31 bytes (prinl "Cops and Robbers")(bye) Try it online! Strange language, I know.
F# (.NET Core), cracked by Shaggy, 25 bytes printfn"Cops and Robbers" Try it online!
Rust, cracked by Shaggy, 37 bytes fn main(){print!("Cops and Robbers")} Try it online! Hold on, lemme translate it for fun: For now, my print not say "Cons and Rubbers". Ahem, sorry, don't ...
D, cracked by Kevin M. Mansour, 39 bytes void main(){write("Cops and Robbers");} Try it online! This doesn't look like C. Not even BMPL. Now we know why.