« first day (5138 days earlier)   

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 ...

 
2 hours later…
03:06
just published something to a package manager for the first time and I so feel like I need to brag even though it's not even installable yet LMAO
Documentation is published but not searchable
>:3
yippee!
good job
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

 
11 hours later…
14:56
O(1) sorting algorithm (pseudocode):
MAIN(LIST):
For item in list: summon coroutine(item)
COROUTINE(ITEM):
WAIT arctan(item) seconds
add item to global list
(Assuming infinitely many cores on computer)
Refined sleepsort
Infinite cores are not really going to help you though, but fun in theory
15:13
@TheEmptyStringPhotographer brb waiting -90° seconds
15:47
You could add 90 to make it work for negative numbers
16:01
Yeah of course lol
16:45
@noodleperson Output is in radians
att
att
17:13
° is a constant =pi/180 :p
@TheEmptyStringPhotographer Sure, you still have to add though
 
1 hour later…
18:34
@noodleperson Amendment: the line now says WAIT arctan(item) + 2*pi seconds
@TheEmptyStringPhotographer Correction: I meant arctan(item) + pi/2
19:35
:3
19:50
Python O(1) (or is it Omega(1)) sorting algorithm:
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)
(Variation of sleepsort)
(It's called Tantime Sort, and I made it)

« first day (5138 days earlier)