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
50%
+0 −0
Meta Suggestions for the new header banner/background

Binary and code plastered a lot One of the more generic ways of adding design to a code challenge site. The binary digits can be plastered around the header in a way that it looks cryptic. But bin...

posted 2y ago by General Sebast1an‭

Answer
50%
+0 −0
Challenges Digit Sum Integer Sequence (working title)

Python 3, 183 181 175 bytes def f(a,b): c=a;a=str(a) for i in range(b): y=0;z=9 for j in range(len(a)): if y<int(a[j]):y=int(a[j]) if z>int(a[j]):z=int(a[j]) c=int(a)+...

posted 2y ago by General Sebast1an‭  ·  edited 2y 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 2y ago by General Sebast1an‭

Answer
66%
+2 −0
Challenges Reverse an ASCII string

Lua, 32 bytes print(string.reverse(io.read())) Try it online! Noice built-in.

posted 2y ago by General Sebast1an‭

Answer
50%
+0 −0
Challenges Getting perfect squares, differently

Lua, 41 40 bytes x=0 y=1while""do print(x)x=x+y y=y+2 end Try it online!

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

Answer
50%
+0 −0
Challenges A number adder, not a death adder

Lua, 51 bytes P1: print("print(tonumber(io.read())+"..io.read()..")") Try it online! P2 (given I inputted 10, 29 bytes): print(tonumber(io.read())+10) Try it online!

posted 2y ago by General Sebast1an‭

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

Renaming functions A funny, cool, and useful trick. If you have to write a single function multiple times (usually range() on for loops), then you can simply assign a variable by the function's na...

posted 2y ago by General Sebast1an‭

Answer
50%
+0 −0
Q&A Tips in golfing using Lua

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...

posted 2y ago by General Sebast1an‭

Answer
50%
+0 −0
Challenges Diagonalized alphabet

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[...

posted 2y ago by General Sebast1an‭

Answer
50%
+0 −0
Meta Suggestions for the new header banner/background

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...

1 answer  ·  posted 2y ago by General Sebast1an‭  ·  last activity 2y ago by General Sebast1an‭

Question discussion design
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 2y ago by General Sebast1an‭

Answer
50%
+0 −0
60%
+1 −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 2y ago by General Sebast1an‭

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

Combine conditionals Python has its fair share of comparison operators and can actually be used in a single conditional. For example: x == 2 and y == 2 can be: x==y==2 Used on Make $2 + 2 ...

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

Answer
60%
+1 −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 2y ago by General Sebast1an‭

Answer
50%
+0 −0
Challenges "Hello, World!"

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.

posted 2y 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 2y ago by General Sebast1an‭  ·  last activity 2y ago by radarek‭

50%
+0 −0
Challenges "Hello, World!"

SQLite, 21 bytes select'Hello, World!' Try it online!

posted 2y ago by General Sebast1an‭

Answer
50%
+0 −0
Challenges "Hello, World!"

Emoji, 24 bytes 💬Hello, World!💬➡ Try it online!

posted 2y ago by General Sebast1an‭

Answer
50%
+0 −0
Q&A Tips in golfing using Lua

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...

posted 2y ago by General Sebast1an‭  ·  edited 2y 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 2y ago by General Sebast1an‭  ·  edited 2y ago by General Sebast1an‭

Answer
50%
+0 −0
Challenges My house is destroyed! Can you make me one?

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...

posted 2y ago by General Sebast1an‭  ·  edited 2y 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 2y ago by General Sebast1an‭  ·  edited 2y ago by General Sebast1an‭

Answer