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
Challenges "Hello, World!"

shortC, 16 bytes AJ"Hello, World! Try it online!

posted 2y ago by General Sebast1an‭

Answer
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 2y ago by General Sebast1an‭  ·  edited 2y 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 2y ago by General Sebast1an‭  ·  last activity 2y ago by celtschk‭

Question code-golf quine
60%
+1 −0
Sandbox Reverse your quine [released]

posted 2y ago by General Sebast1an‭  ·  edited 10mo ago by trichoplax‭

81%
+7 −0
Challenges Collatz conjecture; Count the tries to reach $1$

Background Check out this video on the Collatz conjecture, also known as A006577. If you don't know what this is, we're given an equation of $3x + 1$, and it is applied this way: If $x$ is odd...

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

Question code-golf math number
50%
+0 −0
Q&A Tips in golfing using PHP

Set arrays without array() In a few occasions, setting an array using array() can be a bit costly. Thankfully, you can assign an array like how to assign a Python list. <?php $a=["Hello","Ma...

posted 2y ago by General Sebast1an‭

Answer
60%
+1 −0
Q&A Tips in golfing using PHP

Whitespace can be removed in between keywords and variables You can easily remove the whitespace that's in-between a keyword (return or a function that doesn't need parentheses) and a variable (ei...

posted 2y ago by General Sebast1an‭

Answer
60%
+1 −0
Q&A Tips in golfing using PHP

Anything that's outside the script is echoed This probably has to deal with the fact that PHP is a script commonly used on HTML, and anything that is written on the HTML document--not inside the s...

posted 2y ago by General Sebast1an‭

Answer
60%
+1 −0
Q&A Tips in golfing using PHP

Use <?= It's basically the same as <?php echo. Used on Reverse an ASCII string.

posted 2y ago by General Sebast1an‭

Answer
60%
+1 −0
Q&A Tips in golfing using PHP

Remove ?> You can save 2 bytes by removing the syntax that ends the PHP script when you don't need it. The program will still work. <?php echo"Hello!"; Try it online!

posted 2y ago by General Sebast1an‭

Answer
60%
+1 −0
Q&A Tips in golfing using PHP

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

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

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

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

* == and If you want to check if two booleans or integers and want to check if both of them are true in an if statement, then you can leave out and to replace it with *: x=2;y=3 if x and y:pri...

posted 2y ago by General Sebast1an‭

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

Combine loops Suppose you have a for loop in another, maybe a couple of times, and nothing else inside of the outer for loops (except for the first for loop since anything outside won't be involve...

posted 2y ago by General Sebast1an‭

Answer
60%
+1 −0
Challenges It's Hip to be Square

PHP, 69 37 bytes <?=($y=sqrt($x=fgets(STDIN)))*$y==$x; Try it online! Golfed 32 bytes thanks to @Shaggy's advice.

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

Answer
71%
+3 −0
Challenges Abbreviate everything

Challenge Make a program that takes input of a string and abbreviate it. All letters of an abbreviation are capitalized, so keep that in mind. Whitespace, numbers and non-English characters ar...

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

Question code-golf string
50%
+0 −0
Challenges Getting perfect squares, differently

PHP, 57 bytes <?php $x=0;$y=1;while(1){echo(string)($x+=$y)." ";$y+=2;} Try it online! PHP's a nice language, I tell ya.

posted 2y ago by General Sebast1an‭

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

PHP, 58 28 bytes P1: <?="<?=\$argv[1]+$argv[1];"; Try it online! Golfed 30 bytes thanks to @Shaggy's advice. P2 (given I inputted 10): <?=$argv[1]+10; Try it online!

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

Answer
50%
+0 −0
Challenges Evens or Odds - you know this one

PHP, 36 bytes <?php $x=(int)fgets(STDIN);echo$x%2; Try it online! Outputs 1 if odd and 0 if even.

posted 2y ago by General Sebast1an‭

Answer
60%
+1 −0
Challenges Reverse an ASCII string

PHP, 32 24 bytes <?=strrev(fgets(STDIN)); Try it online!

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

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

PHP, 114 bytes <?php for($i=1;$i<101;$i++){if($i%3!=0&$i%5!=0){echo$i;}if($i%3==0){echo"Fizz";}if($i%5==0){echo"Buzz";}echo"\n";} Try it online! As someone who doesn't code much in...

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

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

Replace range() if $n < 4$ If you're using a for loop, you're probably using range() for the list count. You can actually replace it if the number inside range() is less than 4. Why? Examine th...

posted 2y ago by General Sebast1an‭

Answer
60%
+1 −0
Challenges Repeat the characters

Python 3, 53 38 bytes def f(x,y): for c in x:print(end=c*y) Try it online! I'm sure someone will find a lambda solution to this. Golfed 15 bytes thanks to @Moshi's advice.

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

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

PHP, 55 27 21 bytes Hello, <?=$argv[1]?>! Try it online! Golfed 28 bytes thanks to my Software CD post. Golfed 6 bytes thanks to @Shaggy's advice.

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

Answer
66%
+2 −0
Challenges Define a mathematical expression in English

Background Inspired by this challenge that is also a mathematical English translator. Challenge Write a program that translates a mathematical expression using English with the following specifi...

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

Question code-golf math string