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.5k posts
 
60%
+1 −0
Sandbox Borromean coprimes [FINALIZED]

posted 7mo ago by trichoplax‭  ·  edited 7mo ago by trichoplax‭

60%
+1 −0
Challenges I irradiate your source code, you irradiate your output

Your task is to write a program $p$ which outputs a string $s$ with the same length as $p$, where $s \neq p$. If I remove the $n$th byte from your program to get program $q$, then either $q$ outpu...

0 answers  ·  posted 7mo ago by WheatWizard‭  ·  edited 7mo ago by WheatWizard‭

66%
+2 −0
Challenges Digit Sum Integer Sequence (working title)

Python 3, 68 bytes def g(n): while True:print(n);d=[*map(int,str(n))];n+=min(d)+max(d) Outputs the n-based sequence indefinitely, starting with n.

posted 7mo ago by msb‭

Answer
60%
+1 −0
Meta Default minimum required precision and supported size for inputs

For challenges that require a input, what is the maximum a solution has to support, if not further specified by the challenge author? Lets say the input is a string, how long can of a string has t...

0 answers  ·  posted 7mo ago by H_H‭  ·  last activity 7mo ago by H_H‭

66%
+2 −0
Challenges Is it part of the mandelbrot set?

Input is a number, you have to decide if it is part of the mandelbrot set or not, after at least 16 iterations. This is done by applying this formula: $z_n = z_{n-1}^2 + c$ repeatedly. $c$ is the ...

1 answer  ·  posted 8mo ago by H_H‭  ·  last activity 6mo ago by Arpad Horvath‭

Question code-golf
50%
+0 −0
Meta Default Rules: Code Golf I/O

A program may use IOs for input and output. A input can be read via IO, which can be a port with (multiple) IOs each IO reads a symbol (a bit or more when you have a ADC). Or it can come from fram...

posted 8mo ago by H_H‭

Answer
33%
+0 −2
Meta Default Rules: Code Golf I/O

A program may output a boolean value by using different amount of time or instructions till it returns. If a program needs to determine a boolean value, it may return in less than N second (or ins...

posted 8mo ago by H_H‭  ·  edited 7mo ago by H_H‭

Answer
60%
+1 −0
Sandbox Is it part of the mandelbrot set? [FINALIZED]

posted 8mo ago by H_H‭  ·  edited 8mo ago by trichoplax‭

66%
+2 −0
Challenges Reverse the bits in a Byte

ARM Thumb machine code, 6 bytes 0: fa90 f0a0 rbit r0, r0 // reverse bits in 32-bit register 0 4: 4770 bx lr // return if bytes have to be octets (8-bit): ARM Thumb machine code...

posted 8mo ago by lovebuny‭  ·  edited 8mo ago by lovebuny‭

Answer
50%
+0 −0
Challenges Knight safe squares

Python, 143 bytes def r(i): y,z=65537,1+(1<<32);s=257*y*z;n=(i|(i&252*s)*y>>10|(i&254*s)*z>>17|(i&127*s)*z>>15|(i&63*s)*y>>6)&(1<<64)-1 ...

posted 8mo ago by Karl Knechtel‭

Answer
66%
+2 −0
Challenges Reverse the bits in a Byte

Python (3.6 and up), 32 bytes (unsigned integer I/O) lambda x:int(f'{x:08b}'[::-1],2) Input and output are int objects. This also reverses the bits in integers larger than 255, implicitly infer...

posted 8mo ago by Karl Knechtel‭

Answer
60%
+1 −0
Challenges Looping counter

C, 30 + 1-4 byte f(m){f(printf("%0*i\n",m,0));} Has this limitations: counter stops working at INT_MAX or at stack overflow. Needs a input value to indicate on which line we start. 0 starts...

posted 8mo ago by H_H‭  ·  edited 8mo ago by H_H‭

Answer
60%
+1 −0
Challenges Word suggesting

Suggest a word from a word list, given a string. Motivation Imagine typing a word one letter at a time, and seeing a suggested word after each letter is typed. At first the suggested word is simp...

1 answer  ·  posted 8mo ago by trichoplax‭  ·  edited 2mo ago by trichoplax‭

Question code-golf string list
60%
+1 −0
Challenges Reverse the bits in a Byte

C (gcc), 42 bytes c;f(i){c++<8&&(printf("%d",i&1),f(i>>1));} Try it online! Binary output version.

posted 8mo ago by Lundin‭

Answer
60%
+1 −0
Challenges Reverse the bits in a Byte

C (gcc), 47 bytes r,c;f(i){return c++<8&&(r=r<<1|i&1,f(i>>1)),r;} Try it online! I didn't manage to come up with anything better than the most obvious recursive im...

posted 8mo ago by Lundin‭  ·  edited 8mo ago by Lundin‭

Answer
57%
+2 −1
Challenges Give the fool's fibonacci sequence

Recently I asked for tips on improving some code-golf of mine. The code was supposed to output every third value of the Fibonacci sequence starting with 2: 2,8,34,144,610,2584,10946,46368,196418,...

0 answers  ·  posted 8mo ago by WheatWizard‭  ·  edited 8mo ago by WheatWizard‭

66%
+2 −0
Challenges Reverse the bits in a Byte

Sclipting, (UTF-16) 26 bytes 갠긂갠밂乘감뒄뀢감雙갿및剩 Uses a formula I found here unsigned char b; // reverse this (8-bit) byte b = (b * 0x0202020202ULL & 0x010884422010ULL) % 1023;

posted 8mo ago by Moshi‭

Answer
60%
+1 −0
Challenges Reverse the bits in a Byte

Python, 55 Bytes lambda x:chr(int(bin(ord(x))[2:].rjust(8,"0")[::-1],2)) Takes input as the actual byte, and outputs the actual byte. Try it online!

posted 8mo ago by PlaceReporter99‭  ·  edited 8mo ago by PlaceReporter99‭

Answer
66%
+2 −0
Challenges Reverse the bits in a Byte

Simple challenge: Read a byte, swap bit 7 with 0, 6 with 1, 5 with 2 and 4 with 3 and then output the byte. For example the byte 0b1001'1100 would turn into 0b0011'1001. Rules: Shortest code wi...

6 answers  ·  posted 8mo ago by H_H‭  ·  last activity 8mo ago by lovebuny‭

Question code-golf
22%
+0 −5
Challenges HOW TO HANDLE THIS ERROR: "Failed to get input map for signature: serving_default" [closed]

import requests import json import numpy as np import base64 import cv2 Replace this with the actual image path you want to test image_path = 'H_L_.jpg' Read and preprocess the image image ...

0 answers  ·  posted 9mo ago by mjkatre18‭  ·  closed 9mo ago by Mithical‭

50%
+0 −0
Challenges Reverse an ASCII string

Standard ML, 23 bytes implode o rev o explode

posted 9mo ago by qwr‭

Answer
50%
+0 −0
Challenges Reverse an ASCII string

R, 32 bytes \(s)intToUtf8(rev(utf8ToInt(s))) Attempt This Online!

posted 9mo ago by qwr‭

Answer
50%
+0 −0
Challenges Reverse an ASCII string

R + magrittr, 31 bytes .%>%utf8ToInt%>%rev%>%intToUtf8

posted 9mo ago by qwr‭

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

Python, 16 bytes lambda s:s[::-1] Attempt This Online!

posted 9mo ago by qwr‭

Answer
50%
+0 −0
Challenges Reverse an ASCII string

Brainfuck, 10 Bytes ,[>,]<[.<] Requires EOF to be 0. Try it online! ,[>,]<[.<] , # Read character [ ] # loop as long as current cell is not 0 (EOF) >, ...

posted 9mo ago by H_H‭  ·  edited 9mo ago by H_H‭

Answer