129589 messages found


12:45
I was more going for a never ending proving session :p
05:21
@l4m2 I've actually had this idea before as a challenge type :p
02:34
Step 1: ask interpret python challenge, step 2: submit python exec answer, step 3: ???, step 4: free bulltin python interpreter :p
01:37
0
A: Sandbox for Proposed Challenges

noodle personImplement Uiua's 'tuples' function In the programming language Uiua, there is a higher-order function called tuples which is a generalization of getting the permutations or combinations of an array. Tuples takes a list \$ a \$, a sample size \$ r \$, and a function \$ f \$ taking two numbers repr...

01:35
0
Q: Tips for golfing in Maple

AhamadMaple is designed for mathematical computation, with a focus on symbolic algebra, calculus, and data visualization. I’m experimenting with code golf in Maple and want to make my scripts as concise as possible. What are some clever techniques for reducing character count in Maple? I’m especially i...

yst 13:32
0
Q: Tips for golfing in Sidef

AhamadSidef, created by Daniel Șuteu, is designed for expressive, compact code, especially in mathematical domains (e.g., number theory, combinatorics). I’m diving into code golf challenges using Sidef and want to minimize my character count. What are some expert tips for writing shorter Sidef code? I’...

yst 11:29
0
Q: Tips for golfing in Fortran

AhamadFortran is a compiled imperative language known for its numerical and scientific computing strengths. It blends traditional procedural programming with some modern features like array operations. What general tips do you have for golfing in Fortran? I'm looking for approaches and tricks that are ...

yst 10:23
0
Q: Tips for golfing in COBOL

138 AspenCOBOL is a high-level, compiled programming language designed for business applications, readability, and long-term maintainability. It emphasizes verbose syntax, English-like readability, and robust support for data processing, file handling, and business logic. COBOL's structure is divided into...

yst 09:53
0
Q: Tips for golfing in Bespoke

Josiah WinslowWhat are some general tips you have for golfing in Bespoke? I want answers that are specific to Bespoke (e.g. don't just say "remove comments"). One tip per answer. Esolangs page Documentation Official interpreter

yst 00:33
at the same times theres also advantages if P=NP
yst 00:20
(and also the threat to modern cryptography is very much a known aspect of "we haven't proven P!=NP but we just. really really want to assume it because like no way is it not true", granted there's also overlap with post-quantum cryptography and whatnot)
yst 00:18
@TheEmptyStringPhotographer you havent proven P != NP tho, thats just a counterexample to P=NP
Sat 23:18
0
A: Sandbox for Proposed Challenges

Dannyu NDosThe shortest NP-complete problem Find an NP-complete problem over all ASCII strings, and present a solver for the problem in the programming language of your choice. This is a code-golf; the solver with the fewest bytes wins. Your submission must present a proof that the problem in question is in...

Sat 19:50
from multiprocessing import Pool
import time
import math

def sleep_function(x):
    return math.atan(x)+math.pi/2

def worker(x):
    time.sleep(sleep_function(x))
    print(x)

def tantime_sort(l):
    with Pool(len(l)) as p:
        p.map(worker, l)

TEST_CASE = [3, 21, 1000, 17, 69, -2, 1.0, 10000, 0.1]

tantime_sort(TEST_CASE)
Sat 18:38
:P
att
Sat 17:13
° is a constant =pi/180 :p
Sat 03:50
0
A: Sandbox for Proposed Challenges

CorsakaFind duplicates in a given string code-golfstring Challenge Given a string of any length, determine if there are any duplicate characters in the string. Rules Standard I/O methods are permitted. Standard loopholes are forbidden. This is code-golf, so shortest solution in bytes wins! Examples "abcdef

Sat 01:16
0
A: Sandbox for Proposed Challenges

Ray ToalAntiparallel 12-hour Clock Hands Print each of the 11 times, one per line, in the I:M:S format, at which the hour and minute hands of a 12-hour clock are antiparallel. Here I is the two digit hour, with 12 in place of 0; M is the two digit minute, and S is the truncated seconds value. The output ...

Fri 22:46
@Seggan I know it is, I wasn’t trying to prove P=NP, but in fact the opposite
Fri 19:25
and cracking one function, even in constant time, may not necessarily mean that P=NP. see also: MD5, SHA-1
att
Fri 18:39
21
Q: Determine ranges from a list of values

Corey OgburnGiven an unsorted list of unique, positive integers, output the shortest list of the longest possible ranges of sequential integers. INPUT An unsorted list of unique, positive integers e.g. 9 13 3 11 8 4 10 15 Input can be taken from any one of the following: stdin command-line arguments ...

Fri 17:04
0
A: Sandbox for Proposed Challenges

EzlandingRecently, in an Analysis class, I was tasked with proving that the dyadic rationals are dense in R (which can be proven by the archimedean property). The dyadic rationals are defined as: $$\left\{ \dfrac{m}{2^n} \; | \; m \in \mathbb{Z},\; n \in \mathbb{N} \right\}$$ Your Goal: for two real numbe...

Fri 12:38
But if P=NP then this would imply all hash functions could be cracked in polynomial time
Fri 12:35
I believe cryptographic hash functions may be key to solving the P=NP problem.
Fri 08:50
0
A: Sandbox for Proposed Challenges

Mukundan314Count collisions in a python dictionary hashing python code-golf Task Given a list of integers as input, simulate Python's dictionary insertion process and count the total number of collisions that would occur. The process works as follows: Start with a hash table of size 8 For each number in th...

Fri 05:09
... I guess :p
Fri 04:08
I added it back because it wasn't completely useless :p
Fri 04:07
8
Q: Should AI generated questions and or answers be banned?

lyxalRelevant discussion that inspired this question Questions and answers (content) generated by AIs like LLMs (e.g ChatGPT, Google Bard, character.ai) are not prohibited on the StackExchange network by default: With due consideration, we've decided no network-wide, general policy regarding banning ...

Fri 00:32
classic :p
Thu 23:09
I think it is :p
Thu 22:51
maybe I was a little harsh in my reject message then :p
Thu 22:34
And I have, uh... 160. :P
Thu 04:46
it's spread :p
Thu 02:19
0
Q: 9 Queens and least obstacles

l4m2Position 9 queens and least obstacles on an 8×8 chessboard so that no two queens threaten each other. There's more than one solution. Output all of them. Shortest code in each language wins.

Wed 17:54
@Themoonisacheese Didn't even notice that you'd posted that :p - just saw that my answer had gotten an upvote and realised I could save two bytes on it
Wed 16:45
0
Q: Basic Uiua Planet Notation

noodle personUiua is a stack-based array programming language, and with the great power of a stack comes the great responsibility of having to manage it. In this task you will take on the role of the Uiua interpreter for a small subset of the language concerning the rearranging of values on the stack. If you'...

Tue 20:10
…granted, it doesn’t help that I’m not actually using JS or TS and the bindings I’m using are godawful in their own idiosyncratic ways on top of that :P
Feb 18 15:22
2
Q: If a Web page’s CSS stylesheet specifies custom left & right margins that improve its look, does that make a derivative work of the Web browser?

RichardThe situation: I maintain a Web site. I was working with a local copy of one of the site’s pages and a local copy of the CSS stylesheet file that is used by that page (the CSS stylesheet is used by more than one page on the site.) I edited the stylesheet to specify custom left and right margins f...

Feb 18 13:07
ah :p
Feb 18 04:24
0
Q: Compute the infinite Pochhammer symbol

Parcly TaxelI saw the following problem on MathsSE: You try to do something and your probability of success is \$p\$. If you fail, you try again, but the probability of success falls down to \$p^2\$. If you fail again, you try again, but the probability of success is now down to \$p^3\$. If you fail, you ke...

Feb 18 01:50
1
A: Sandbox for Proposed Challenges

noodle personBasic Uiua Planet Notation code-golf uiua Sandbox note: I have another challenge in the works which expands on this one and includes more complicated "planet notation" expressions. Uiua is a stack-based array programming language, and with the great power of a stack comes the great responsibility...

Feb 17 14:15
0
A: Snakes on a 2xN grid

Ajax1234Python3, 184 bytes def f(n): q=[(0,0,[(0,0)])] for x,y,p in q: if len(p)==2*n:yield p;continue q+=[(*T,p+[T])for X,Y in[(0,1),(0,-1),(1,0),(-1,0)]if 0<=x+X<2 and 0<=y+Y<n and(T:=(x+X,y+Y))not in p] Try it online!

Feb 17 13:12
0
Q: Snakes on a 2xN grid

noodle personA snake is defined as a path around a two dimensional grid which touches each square exactly once by repeatedly moving one up/down/left/right, starting at the square (0, 0). Below is an example of one snake of a 3x4 grid: 0 1 2 3 7 6 5 4 8 9 10 11 For any positive integer N, there are N s...

Feb 17 00:13
12
A: What can be cut away, and why?

VLAZQ&A on metas I feel the Q&A format is just inherently bad for meta sites. I also want to say that Q&A does not need to be completely gone, but metas can at least be diversified with the type of content. Or maybe we throw out Q&A and adopt another model. In general, Q&A seems antithetical to metas...

Feb 16 14:17
4
Q: Can you beat numpy convolve?

SimdThe task is to compute the convolution of an array with itself as quickly as possible. The array will contain 80-bit extended precision long doubles and I will specify how the array is to be created. In order to get a good range, the values will be sampled on a log scale and then scaled back up ...

Feb 15 20:44
0
A: Sandbox for Proposed Challenges

OseDeepBleak This challenge is about probing the limits of an LLM's reasoning skills. The basic idea is to create short DeepSeek prompts that produce long bodies of reasoning text and an objectively incorrect answer. More precisely: Participating Create a DeepSeek account (it's free). Start a new c...

Feb 15 19:05
0
Q: N-step block pyramid for pharo

PlinyN-Step pyramid calculator. Calculate the number of blocks per column of an N step pyramid built using Y block, and return the number of blocks per column in a list. The build must use every single block, even if the result is an lopsided pyramid. The blocks can be placed in the right columns fir...

Feb 15 11:25
0
Q: Tips for golfing in Zig

138 AspenZig is a low-level, statically typed, and compiled systems programming language designed for safety, performance, and simplicity. It provides direct control over hardware with an emphasis on explicit memory management, zero-cost abstractions, and no hidden control flow. Zig's syntax is concise, a...

Feb 14 12:02
0
Q: Can you beat numpy convolve?

SimdThe task is to compute the convolution of an array with itself as quickly as possible. The array will contain 80-bit extended precision long doubles and I will specify how the array is to be created. In order to get a good range, the values will be sampled on a log scale and then scaled back up ...

Feb 13 18:03
0
A: Sandbox for Proposed Challenges

l4m2Description: TODO Input: 01 matrix Output: Least horizon+vertical lines added to connect everything Test cases: (@=island, .=add hint) @@@ @ . => 1 @ @ @@@@ . => 1 @@ . .@@@@@ @ . @ . => 2 @ @@ ......... . .@@@@@


1 2 3 4 5 200
P