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
 
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 3y ago by torres‭

Question code-golf number sequence
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

JavaScript (Node.js), 27 22 bytes -5 bytes thanks to Hakerh400‭ Direct computation f=n=>(n+(n*n+4)**.5)/2 $$\frac{n+\sqrt{n^2+4}}{2}$$ Try it online!

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

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 4y 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 4y ago by user‭

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

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

posted 4y 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 4y ago by user‭  ·  edited 4y 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 4y ago by Wasif‭  ·  edited 3y ago by dzaima‭

Answer
75%
+4 −0
Challenges Cumulative Counts

Jelly, 4 bytes ¹Ƥċ" Try it online! " For each element of the input, ċ how many times does it occur in ¹Ƥ " the corresponding prefix of the input?

posted 4y ago by Unrelated String‭  ·  edited 4y ago by Unrelated String‭

Answer
75%
+4 −0
Challenges Cumulative Counts

APL (Dyalog Unicode), 11 bytes (SBCS) 1 1∘⍉+\∘.=⍨ Try it online! This was a fun APL exercise. Working on figuring out how to get it down to 7 bytes.

posted 4y ago by hyper-neutrino‭

Answer
75%
+4 −0
Challenges Cumulative Counts

BQN, 5 bytes 1+⊒ Try it here! 3 characters, but, as there's no SBCS codepage for BQN, it must be counted as UTF-8. Two of the three characters are just adding one to the built-in that almost ...

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

Unless explicitly asking for exactly two values, you may use any truthy/falsey values in decision problems For instance, considering the hypothetical challenge "Determine if a number is non-divisi...

posted 3y ago by Moshi‭

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

Every outcome must be possible For example, if the challenge requires a random number from 1-5, all 5 numbers must be possible. It does not need to be uniformly random (unless otherwise specified)...

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

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

Storing information in the platform specs We should disallow requiring the program to be run on some platform to store information for the challenge. An extreme example would be Nullary, in which ...

posted 3y ago by AndrewTheCodegolfer‭

Answer
75%
+4 −0
Meta How free is "free" for cops and robbers?

Free access must not be finite There has to be a time-unlimited, free way to run the language in question.

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

Answer
75%
+4 −0
Meta How free is "free" for cops and robbers?

Languages with free online interpreters are free This includes all languages currently on tio.run, for example.

posted 3y ago by AndrewTheCodegolfer‭

Answer