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 user‭

68 posts
75%
+4 −0
Meta Should [code-golf-tips] be replaced with [tips] + [code-golf]?

Instead of the code-golf-tips tag, could we tag "Tips for golfing" questions with tips and code-golf instead? They can still be searched for, so I don't see a reason to make a special tag to repres...

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

Question discussion tags
81%
+7 −0
71%
+3 −0
Sandbox Obligatory factorial challenge

posted 3y ago by user‭  ·  edited 3y ago by user‭

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

Scala, 242 bytes _=>99 to(1,-1)map{b=>s"${w(b)} on the wall, ${w(b)}. \n${if(b>1)"Take one down and pass it around"else "Go to the store and buy some more"}, ${w((b+97)%99+1)} on the w...

posted 3y ago by user‭  ·  edited 3y ago by user‭

Answer
71%
+3 −0
Challenges It's Hip to be Square

Prolog (SWI), 42 bytes R-S:-S is R*R;R<S,M is R+1,M-S. f(S):-0-S. Try it online!

posted 3y ago by user‭

Answer
71%
+3 −0
Challenges It's Hip to be Square

Japt, 6 3 bytes Cut in half thanks to Shaggy! ¬v1 Try it online! Golfed thanks to Shaggy's interpreter auto-golf feature. ¬v1 ¬ //Square root v1 //Is that an integer?

posted 3y ago by user‭  ·  edited 3y ago by Shaggy‭

Answer
75%
+4 −0
Meta Answering challenges with languages newer than the challenge

Answering with languages newer than the challenge should absolutely be allowed Most of the time, when a language is newer than a challenge, it's just a coincidence. By not allowing people to answe...

posted 3y ago by user‭

Answer
60%
+1 −0
Challenges Evaluate a single variable polynomial equation

Scala, 18 bytes x=>_.:\(.0)(_+_*x) Try it online! Not too complicated. Takes the list of coefficients and folds from the right, multiplying the accumulator by x each time and adding the nex...

posted 3y ago by user‭

Answer
50%
+0 −0
Challenges Bytes to Segfault

Rust, 47 bytes fn main(){unsafe{print!("{}",*(0 as*mut i8));}} Try it online!

posted 3y ago by user‭

Answer
66%
+2 −0
Challenges Gamer Meme Creator

Scala, 98 83 bytes Saved 15 bytes thanks to Shaggy! a=>t=>{val w=a.map(_.size).max (" "*(w-t.size>>1)+t)+:a:+" "*(w/2-5)+"BOTTOM TEXT"} Try it online! a is the ASCII art, t is th...

posted 3y ago by user‭  ·  edited 3y ago by user‭

Answer
66%
+2 −0
Challenges Guess the language! (Robbers' Thread)

Cracks Mark Giraffe's answer: Forth (gforth) .( Cops and Robbers) Try it online!

posted 3y ago by user‭  ·  edited 3y ago by user‭

Answer
60%
+1 −0
Challenges Guess the language! (Cops' Thread)

Verbosity, 512 bytes, cracked by Moshi Include<Integer> Include<MetaFunctions> Include<Output> Include<String> Integer:DefineVariable<IntegerOne; 1> Output:Def...

posted 3y ago by user‭  ·  edited 3y ago by user‭

Answer
71%
+3 −0
Challenges Make my number a set

Japt, 3 bytes ÆßX Try it online! (don't mind the -Q This is Shaggy's solution. ÆßX Æ Make a range [0, input) and map each number X: ß Run this program again on X Japt, 11 8 bytes ...

posted 3y ago by user‭  ·  edited 3y ago by user‭

Answer
75%
+4 −0
Challenges Versatile self-printer

Scala 3 and Python 3.8 (pre-release), 2 languages (385 bytes) def String():Any=0 def Int():Any=0 def f(s:String):Any=print(s.replace(chr(81),chr(34)*3+s+chr(34)*3)) class M: f("""def Strin...

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

Answer
50%
+0 −0
Meta Leaderboards are live

Libraries are removed when "merge variants" is on. For example, this answer written in C (clang) uses a library called BMPL, so its header is C (clang) + BMPL. While there's nothing wrong with usin...

posted 3y ago by user‭

Answer
77%
+5 −0
Challenges Shuffle a subset of a list

Idea shamelessly stolen from caird and rak1507 Shuffle a subset of a list of unique, positive integers with uniform randomness, given the indices of that subset. For example, given the list $[A, B...

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

60%
+1 −0
Challenges Create a Sudoku

APL (Dyalog Unicode), 22 bytes ⎕←∘.((1+⍳9)⌽⍨⊣+3×⊢)⍨⍳3 Try it online! Requires zero-indexing. ⎕←∘.((1+⍳9)⌽⍨⊣+3×⊢)⍨⍳3 ⍳3 ⍝ Make the range [0, 2] (row and cols of 3×3 box...

posted 3y ago by user‭  ·  edited 3y ago by user‭

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

Scala -language:postfixOps, 2 bytes 1& Try it online! 1 for odd, 0 for even. Scala, 3 bytes _%2 Try it online! 1 for odd, 0 for even.

posted 3y ago by user‭

Answer
71%
+3 −0
Sandbox Shuffle a subset of a list [FINALIZED]

posted 3y ago by user‭  ·  edited 11mo ago by trichoplax‭

75%
+4 −0
Challenges Are they abundant, deficient or perfect?

Vyxal, 30 28 25 bytes Saved 1 4 bytes thanks to Aaron Miller ƛ∆K-±";£kɽƛ¥D„£_'t¥=;vṪ,£ Try it Online! A rather pitiful answer, but hey, it works. Gives deficient numbers, then perfect numbers...

posted 3y ago by user‭  ·  edited 3y ago by user‭

Answer
75%
+4 −0
Challenges Are they abundant, deficient or perfect?

APL (Dyalog Unicode), 21 bytes {×⍵-+/∪⍵∨¯1↓⍳⍵}¨∘⍳⊢⌸⍳ Try it online! Returns a matrix (padded with zeroes) where the first row is deficient numbers, the second is perfect numbers, and the thi...

posted 3y ago by user‭  ·  edited 3y ago by user‭

Answer
66%
+2 −0
Challenges Diagonalized alphabet

APL (Dyalog Unicode), 31 bytes ⎕←↑(14↑(2⌷x),⍨⌽)¨,\1⌷x←⍉13 2⍴⎕A Try it online! Lot worse than the BQN answer. ⎕←↑(14↑(2⌷x),⍨⌽)¨,\1⌷x←⍉13 2⍴⎕A ⎕A ⍝ String of up...

posted 3y ago by user‭

Answer
66%
+2 −0
Challenges Evaluation order of an APL n-train

Haskell, 52 48 45 42 bytes Caught mistake thanks to rak1507 Saved 3 bytes thanks to Hakerh400 f n=n:g[n-1,n-2..1] g(b:c:t)=c:b:g t g t=t Try it online! g takes the rest of the trains. -...

posted 3y ago by user‭  ·  edited 3y ago by user‭

Answer
60%
+1 −0
Challenges Backspace an array

JavaScript (Node.js), 41 40 bytes Saved 1 byte thanks to Shaggy x=>x.map(e=>e?a.push(e):a.pop(),a=[])&&a Try it online! x => //x is the input x.map(e=> //For every...

posted 3y ago by user‭  ·  edited 3y ago by user‭

Answer
71%
+3 −0
Challenges Backspace an array

Scala, 45 bytes _./:(Seq[Int]())((a,x)=>a:+x dropRight-x*2+2) Try it in Scastie! I couldn't find a way to use underscores in the inner function :(. Explanation on its way. _ //The inp...

posted 3y ago by user‭  ·  edited 3y ago by user‭

Answer