The Nineteenth Byte

The Nineteenth Byte: General discussion for codegolf.stackexc...
Jan 27, 2017 16:09
probably rounding error
Jan 27, 2017 15:58
indeed
Jan 27, 2017 15:39
lol whoops
Jan 27, 2017 15:34
0
A: Sandbox for Proposed Challenges

sirpercivalBinary Grids code-golfrestricted-complexity Consider the N-dimensional binary grid, with dimensions {d1,d2,...,dN}. Here are a few examples: 6 (N=1): 100101 3x7 (N=2): 1001001 0110110 1001001 3x3x3 (N=3): 010 001 100 100 011 110 011 110 001 What each of these example grids h...

Jan 27, 2017 15:32
ok i finished posting in sandbox...
Jan 27, 2017 15:19
or rather, an input of length N
Jan 27, 2017 15:19
for N inputs
Jan 27, 2017 15:18
@AdmBorkBork brute forcing this challenge is O(2^product(x_0,...x_N))
Jan 27, 2017 15:13
not beyond the most basic level, at least
Jan 27, 2017 15:13
and i haven't analyzed the challenge mathematically, lol
Jan 27, 2017 15:13
i just have to figure out how to word the restriction...
Jan 27, 2017 15:11
ahhh
Jan 27, 2017 15:09
in this context?
Jan 27, 2017 15:09
what does restricted-complexity mean?
Jan 27, 2017 15:07
(i haven't written a challenge in a couple years, i'm trying to remember how, lol)
Jan 27, 2017 15:06
is time-constraint a tag?
Jan 27, 2017 15:06
i guess that would work nicely
Jan 27, 2017 15:05
@AdmBorkBork i'm not sure which would be more interesting, honestly.
Jan 27, 2017 15:02
brute-forcing my challenge gets really computationally unwieldy very fast. how should i handle this when writing the challenge?
Jan 27, 2017 14:48
i'm going to sandbox it
Jan 27, 2017 14:47
i have an idea for a golf challenge, but i dunno if it's a good one
Jan 27, 2017 14:46
been a while!
Jan 27, 2017 14:46
hi all
Jun 5, 2015 12:01
@trichoplax i haven't used pypy, no. but the gui & packaging frameworks i'm using are designed to work w/ cython
Jun 5, 2015 10:47
WHOO i got it
Jun 5, 2015 10:35
@PhiNotPi no worries just checkin
Jun 5, 2015 10:35
yeah, but i know people here
Jun 5, 2015 10:34
@PhiNotPi do you know cython
Jun 5, 2015 10:31
hi phi
Jun 5, 2015 10:16
i'll see if i can do it in my version
Jun 5, 2015 10:16
ok i got the pointer thing to work in the toy example
Jun 5, 2015 10:00
yeah i'm gonna try that directly
Jun 5, 2015 09:59
my problem is that i'm trying to pass my poly coeffs to shift_function, and i can't figure out how to make the numpy array of coeffs into a pointer
Jun 5, 2015 09:59
i didn't try, actually
Jun 5, 2015 09:57
so i was happy to find someone had already done the cython part of it
Jun 5, 2015 09:57
but this kind of stuff (the C side of python) is way outside my competency
Jun 5, 2015 09:57
PyCObject is now PyCapsule
Jun 5, 2015 09:56
it uses deprecated python code, even
Jun 5, 2015 09:56
it's awful, i actually opened an issue about updating it
Jun 5, 2015 09:56
yes
Jun 5, 2015 09:56
i don't even need it to be a numpy array
Jun 5, 2015 09:56
that SO question is trying to do basically the exact same thing, and the answer shows how to do it in Cython. the problem is that i can't figure out how to properly pass my coefficients as a pointer
Jun 5, 2015 09:54
you can pass geometric_transform a pointer to a PyCObject
Jun 5, 2015 09:54
Jun 5, 2015 09:54
i originally had my transformation function written in python, and it was super easy. except that it was horrendously slow
Jun 5, 2015 09:53
ok so geometric_transform accepts a 2D image, and a transformation function which is applied to the pixels in the image
Jun 5, 2015 09:52
i'm using the same variable names for simplicity
Jun 5, 2015 09:52
look at the first answer to that SO question
Jun 5, 2015 09:52
so i need to convert that to a pointer
Jun 5, 2015 09:52
my "shift" is an ndarray of polynomial coefficients