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 »

Search

Advanced Search Options

To further refine your search, you can use additional qualifiers such as score:>0.5. For example, the search score:>=0.5 created:<1y grammar would return only posts mentioning "grammar" that have a score >= 0.5 and were created less than a year ago.

Further help with searching is available in the help center.

Quick hints: tag:tagname, user:xxx, "exact phrase", post_type:xxx, created:<N{d,w,mo,y}, score:>=0.5

Filters
1.6k posts
 
75%
+4 −0
Challenges Create an Alphabet Diamond

JavaScript (Node.js), 78 bytes (m=(a,b=26,c=a(--b))=>b?[c,...m(a,b),c]:[c])=>m(a=>m(b=>(c=25-a-b)<0?32:c+65)) Try it online!

posted 4y ago by Hakerh400‭

Answer
75%
+4 −0
Challenges Create an Alphabet Diamond

Japt -R, 14 13 bytes ;Bãê kb'A û ê Test it Takes all substrings of the alphabet, palindromizes them, and then takes only the ones starting with A and centers and mirrors that too. -1 byte tha...

posted 4y ago by Quintec‭  ·  edited 3y ago by Quintec‭

Answer
75%
+4 −0
Challenges Create an Alphabet Diamond

Canvas, 10 7 6 bytes Z[]/┼┼ Try it here! Creates the top portion, centers it, and mirrors it. -3 bytes from dzaima's hint. -1, found the 6 byter! Explanation Z[]/++ Z push the al...

posted 4y ago by Razetime‭  ·  edited 4y ago by Razetime‭

Answer
75%
+4 −0
Challenges Create an Alphabet Diamond

Stax, 12 bytes ç ∩<▬%▌ê▓jFo Run and debug it Same method as the Canvas answer.

posted 4y ago by Razetime‭

Answer
75%
+4 −0
Challenges Win a War (or at least a few battles)

You have an army of size $n$ that you need to split up to fight $k$ battles simultaneously against an opposing army $A$. In each battle, the army with the most troops present wins - no one wins a t...

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

75%
+4 −0
Challenges "Hello, World!"

C# 9, 38 bytes System.Console.Write("Hello, World!"); C# Version 9 introduced Top level statements.

posted 4y ago by strom‭

Answer
75%
+4 −0
Challenges "Hello, World!"

QBASIC, 17, 16 bytes ?"Hello, World!" This should work on almost any BASIC interpreter. Thanks to manassehkatz, for the space.

posted 4y ago by strom‭  ·  edited 4y ago by strom‭

Answer
75%
+4 −0
Challenges The Pell Numbers

Introduction The Pell(no, not Bell) Numbers are a simple, Fibonacci-like sequence, defined by the following relation: $P_n=\begin{cases}0&\mbox{if }n=0;\\1&\mbox{if }n=1;\\2P_{n-1}+P_{n-2...

9 answers  ·  posted 4y ago by Razetime‭  ·  last activity 2y ago by torres‭

75%
+4 −0
Challenges Is it a near-anagram?

JavaScript (Node.js), 150 71 bytes f=(a,b)=>a[b.length]?f(b,a):b.filter(x=>a[y=a.indexOf(x)]=!~y).length-1 Try it online!

posted 4y ago by Hakerh400‭  ·  edited 4y ago by Hakerh400‭

Answer
75%
+4 −0
Challenges Ratio limits of fibonacci-like series

APL (Dyalog Classic), 7 bytes ⎕+∘÷⍣=1 Well, rak is probably not going to answer this, so I might as well ;p Try it online!

posted 4y ago by Quintec‭

Answer
75%
+4 −0
Challenges Is it a near-anagram?

Brachylog, 8 bytes pᵐ≠{b|}ᵛ Try it online! Since it takes $5!*5! = 14400$ tries to determine that the first test case gives false, I've added some shorter ones... pᵐ Permute each ele...

posted 3y ago by Unrelated String‭

Answer
75%
+4 −0
Challenges Partial Sums of Harmonic Series

Scala, 55 bytes (Stream from 1 map 1.0./scanLeft.0)(_+_)indexWhere _.<= Try it online! Written in a more sane manner: n => Stream.from(1).map(1.0/_).scanLeft(0.0)(_+_).indexWhere(_ &g...

posted 3y ago by user‭

Answer
75%
+4 −0
Challenges Reverse an ASCII string

Python 3, 20 bytes print(input()[::-1]) Try it online!

posted 3y ago by Wasif‭

Answer
75%
+4 −0
Challenges Output 256 in many different ways

Scala (-language:postfixOps), 4 solutions 1. Just 256: 256 2. Casting a character: +'Ā' The character Ā is 256 in decimal, and the unary + turns it into an Int. 3. Hashcode of a string: ...

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

Answer
75%
+4 −0
Challenges Output 256 in many different ways

PowerShell, 4 solutions 99+99+9+9+9+9+9+9+4 355-33-33-33 16*16 [int][char]'Ā' Try it online!

posted 3y ago by Wasif‭  ·  edited 3y ago by dzaima‭

Answer
75%
+4 −0
Challenges Obligatory Quine Challenge

BQN, 20 bytesSBCS ∾2/0‿8⊏↓"∾2/0‿8⊏↓""" Run online! BQN's strings escape double quotes by doubling them, so that the string used to start with only contains a single quote, although the output ...

posted 3y ago by Marshall Lochbaum‭

Answer
75%
+4 −0
Challenges Make my number a set

Python 3, 34 bytes f=lambda x:[f(y)for y in range(x)] Try it online! -9 bytes thanks to Moshi Unfortunately, I cannot use Python sets, because sets are unhashable and thus cannot be put int...

posted 3y ago by hyper-neutrino‭  ·  edited 3y ago by hyper-neutrino‭

Answer
75%
+4 −0
Challenges Make my number a set

APL (ngn/apl), 6 bytes {∇¨⍳⍵} Try it online! Dyalog APL and dzaima/APL appear to not give empty vectors for ⍳0, so I used ngn/APL. I don't know how to turn on boxing there, though, so there'...

posted 3y ago by user‭

Answer
75%
+4 −0
Challenges Merge two strings

BQN, 18 bytesSBCS {⊑(⊑𝕨⊸⍷)¨⊸/∾⟜𝕩¨↑𝕨} Run online! A direct translation of Razetime's APL solution (my attempted improvement ⊣∾{⊢´/𝕨⊸«⊸≡¨↑𝕩}↓⊢ turns out to be not at all correct). The BQN solut...

posted 3y ago by Marshall Lochbaum‭

Answer
75%
+4 −0
Challenges Merge two strings

Sed -E, 25 bytes Takes second input, , comma, first input (inputs cannot contain , commas). s/^(.*)(.*),(.*)\1$/\3\2/

posted 3y ago by Wezl‭

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
75%
+7 −1
Meta Default Rules: Code Golf I/O

Programs may output via exit code Exit codes are to programs what return values are to functions, so it makes sense that exit codes would be allowed.

posted 3y ago by AndrewTheCodegolfer‭

Answer
75%
+4 −0
Meta Default Rules: Loopholes

Abusing native number types It's common to restrict inputs, outputs, intermediate algorithm values, etc. to fit into the native number type of the language. This can be a problem for languages li...

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

Answer
75%
+4 −0
Meta Default Rules: Code Golf I/O

Numerical I/O may be given as a character code Input 64 may be given as @ instead. This mostly exists for languages like Brainfuck that only take input through character codes.

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

Answer