Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Posts by General Sebast1an‭

150 posts
66%
+2 −0
Meta Default Rules: Loopholes

Sneakily using macros In a code golf challenge, you are tasked to use as small bytes as possible. However, it's considered unacceptable in a language like C to use macros to hide code or shorten i...

posted 4y ago by General Sebast1an‭

Answer
66%
+2 −0
Challenges 99 Shortened Bottles of Beer

Java (JDK), 311 301 296 bytes interface A{static void main(String[]x){String a=" bottle",b=" of beer",c=" on the wall. ",e;for(int i=99;i>0;i--){e=i>1?"s":"";System.out.println(i+a+e+b+c+(...

posted 3y ago by General Sebast1an‭  ·  edited 3y ago by General Sebast1an‭

Answer
66%
+2 −0
Q&A Tips for golfing in Java

Use for(;;) instead of while(true) The title's self-explanatory. A byte saver.

posted 3y ago by General Sebast1an‭

Answer
66%
+2 −0
Q&A Tips for golfing in Java

This is a list of golfing tips for the language known as Java. If you have a tip, add it in!

7 answers  ·  posted 3y ago by General Sebast1an‭  ·  last activity 3y ago by General Sebast1an‭

Question code-golf tips
66%
+2 −0
Challenges The Ludic Numbers

Python 3, 80 77 75 72 bytes def f(): yield 1;l=[*range(2,236425)] while l:yield l[0];del l[::l[0]] Try it online! Prints out the whole sequence. I did my best to get the biggest number t...

posted 3y ago by General Sebast1an‭  ·  edited 3y ago by General Sebast1an‭

Answer
66%
+2 −0
Challenges Reverse your quine

Challenge Write a program that prints its reversed self. For example, if your code is foo() Then it'll output: )(oof Make sure that the quine is a valid one, as defined here: No cheatin...

4 answers  ·  posted 3y ago by General Sebast1an‭  ·  last activity 3y ago by celtschk‭

Question code-golf quine
66%
+2 −0
Q&A Tips for golfing in Python

Use a+=[b] instead of a.append(b) The title says it all. a=[];b=10;print(a) a+=[b];print(a) Try it online!

posted 3y ago by General Sebast1an‭

Answer
66%
+2 −0
Q&A Tips for golfing in Python

import* You can import some libraries and if you find yourself using: from lib import * Remove the space between import and *, because it works for whatever reason.

posted 3y ago by General Sebast1an‭

Answer
66%
+2 −0
Q&A Tips for golfing in Python

Replace for loops with string multiplication Let's say we have: for i in range(6):print(end="#") Try it online! This basically outputs # 6 times, which is self-explanatory in the code itsel...

posted 3y ago by General Sebast1an‭

Answer
66%
+2 −0
66%
+2 −0
Challenges Make my value binary

Challenge What do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an int then turn it into it's binary value...

14 answers  ·  posted 4y ago by General Sebast1an‭  ·  last activity 3y ago by Olin Lathrop‭

Question code-golf number
66%
+2 −0
Challenges Guess the language! (Cops' Thread)

Forth (gforth), cracked by user, 20 bytes .( Cops and Robbers) Try it online!

posted 4y ago by General Sebast1an‭  ·  edited 4y ago by General Sebast1an‭

Answer
66%
+2 −0
Q&A What's a code bowling challenge?

There's another type of challenge named code bowling, and I've never heard of it, or even if I did, still don't know how it works. I'm willing to write challenges on code bowling and I want to know...

2 answers  ·  posted 4y ago by General Sebast1an‭  ·  last activity 4y ago by General Sebast1an‭

Question code-bowling
66%
+2 −0
66%
+2 −0
Meta Is my extension-like library allowed to be used in answers?

I'm not a golfer, I know, but I do have wanted to make a programming language back then. The name is BMPL (Builder's Multi-Purpose Language) and is currently a library I made in C (clang). It's not...

2 answers  ·  posted 4y ago by General Sebast1an‭  ·  last activity 1y ago by Timwi‭

Question support discussion answering language
64%
+7 −3
Challenges Make $2 + 2 = 5$

In this challenge, add 2 integers, but if both the integers are 2, output 5. Shortest code in each language wins! Example ungolfed program in Python 3.x def add(x, y): if x == 2 and y == 2: ...

23 answers  ·  posted 4y ago by General Sebast1an‭  ·  last activity 6mo ago by arutonee‭

Question code-golf math number
63%
+5 −2
Meta Can we have [popularity-contest]s?

Just curious, but this might help other users, so I'm placing at Meta. A popularity-contest is a non-object winning criteria challenge that is based on having the highest scored answer of the chal...

1 answer  ·  posted 4y ago by General Sebast1an‭  ·  last activity 3y ago by Lundin‭

Question support discussion
60%
+1 −0
Challenges "Hello, {name}!"

Lua, 35 32 bytes print("Hello, "..io.read().."!") Try it online! Golfed 3 bytes thanks to @Moshi's advice.

posted 4y ago by General Sebast1an‭  ·  edited 4y ago by General Sebast1an‭

Answer
60%
+1 −0
Challenges "Hello, {name}!"

Ruby, 24 21 18 bytes p"Hello, #{gets}!" Try it online! Golfed down 3 bytes thanks to @snail_'s advice. Golfed down 3 bytes thanks to @south's advice.

posted 4y ago by General Sebast1an‭  ·  edited 3y ago by General Sebast1an‭

Answer
60%
+1 −0
Challenges Word Set Square

Python 3, 196 195 145 102 91 89 87 79 bytes x=input();x+=x[::-1];i=-1 for c in x[:-1]:print(c*(i>-1)+" "*i+c);i+=1 print(x) Try it online! Golfed 50 bytes thanks to @celtschk's advice. ...

posted 4y ago by General Sebast1an‭  ·  edited 4y ago by General Sebast1an‭

Answer
60%
+1 −0
Challenges 1, 2, Fizz, 4, Buzz!

Lua, 126 118 bytes p=print for i=1,100 do if i%15==0 then p"FizzBuzz"elseif i%3==0 then p"Fizz"elseif i%5==0 then p"Buzz"else p(i)end end Try it online!

posted 4y ago by General Sebast1an‭  ·  edited 3y ago by General Sebast1an‭

Answer
60%
+1 −0
Challenges Coat of Many Colours

Python 3, 349 261 160 bytes a="re y gree br sc bla oc pe rub ol v f li go ch m cre cri si ro a le rus grey pu w pi or blu".split() def f(b):return[j for i in a for j in b if j[:len(i)]==i] T...

posted 3y ago by General Sebast1an‭  ·  edited 3y ago by General Sebast1an‭

Answer
60%
+1 −0
Challenges Stairs? Stairs! Stairs.

Challenge Make a program that takes input of an integer that's $n > 1$ and print out a staircase using a specific character for stair basing (hashes (#) for demonstration; you can use spaces,...

7 answers  ·  posted 3y ago by General Sebast1an‭  ·  last activity 3y ago by radarek‭

Question code-golf ascii-art string
60%
+1 −0
Q&A Tips for golfing in Python

Use lambdas instead of functions At most times, lambdas tend to make smaller code, which is helpful in golfing. Assigning a lambda is easy, just do: lambda f:whatever There are many answers th...

posted 3y ago by General Sebast1an‭

Answer
60%
+1 −0
Q&A Tips for golfing in Python

Assign floats while leaving out zeroes Python allows such strange assignment. You can save bytes by removing the number preceding . if it's only 0: i=.5 print(i) Try it online! The same g...

posted 3y ago by General Sebast1an‭

Answer