« first day (1808 days earlier)      last day (3018 days later) » 

1:00 PM
hm, I don't know. maybe a bounty for the shortest answer with a certain complexity (like orlp's integer partition challenge)
 
Should the values be plotted or just calcualted as a sequence?
 
just calculated
 
I'd love to add that the output can also consist of a scatter plot of the given sequence.
(As alternative to the text output)
What do you think of this?
 
1:15 PM
Finally, you are all awake!
 
0
A: Sandbox for Proposed Challenges

flawrFractal smoke code-golf Introduction A229037 has a quite intriguing plot (at least for the first few terms): There is the conjecture, that it might indeed have some kind of fractal property. How is this sequence constructed? Define a(1) = 1, a(2) = 1 then for each n>2 find a minimal posit...

 
"trainling"
 
@NewSandboxedPosts Thank you!
 
don't.
 
1:17 PM
@flawr it's not gonna be a competitive option, and making it mandatory distracts from the interesting part of the challenge (computing the sequence).
it also doesn't actually add anything interesting. if you want to make a challenge about generating scatterplots, then it should be just that, I think.
 
@zyabin101 Yes, i think I have enough rep to do that, do you want me to try?
I think I need a better title.
 
@flawr NOOOOO!
 
@flawr I think it's good. maybe add "sequence"
 
@MartinBüttner Congrats, you've just got one required tag and one additional tag. Let's wait for the challenge to graduate!
 
1:22 PM
Oh right, and math.
I just noticed we have
 
I meant the title
@flawr yeah, I've been meaning to split that up into substring and subsequence for a while, because using it for challenges about substrings is misleading.
but in terms of tags, I think code-golf, number, sequence, subsequence and maybe arithmetic would be good.
 
I didn't expect a Retina solution for Surrounded countries :)
 
it's pretty verbose :/
 
I now also added some test cases for larger n from my matlab and python code, try to come up with another algorithm to confirm those.
 
It's Monday and, just like Garfield, I am an orange talking cat.
 
1:29 PM
@MartinBüttner Do you have mathematica?
 
based on my J solution (1-~.-:~.&.|.) it might be 5 bytes in Jelly
 
@undergroundmonorail PRChase VERY RARE LINE! PRChase A tweet!
 
There is a snippet for mathematica I'd be happy if anyone could use it to validate my testcases.
 
1:31 PM
let's see how fast it is
oh, btw, the sequence has a b-file
 
Oh, I wasn't aware of those, thanks!
 
so yes, those are correct
if they exist, they are in the LINKS section
the Mathematica code seems pretty slow
 
Thank you very much for your help!
 
you can only use 5 tags, so I'd chuck out
 
I'd rather eliminate ?
 
1:36 PM
I'd throw out the least specific one
and is a fairly reliable tag combination for finding OEIS-related challenges
I wonder if it would be possible to compute the sequence efficiently via some kind of sieve technique
 
It does not seem to be easy, as you are looking for numbers (the minimal number) that does not have a certain property, but that is just my intuition.
 
@NewSandboxedPosts Thank you!
 
@zyabin101 It seems you really want to annoy people.
 
@flawr That's my job! Kappa
 
@flawr Maximal values up to a(1000): {1, 2, 4, 5, 8, 9, 10, 13, 14, 20, 22, 23, 27, 28, 29, 37, 39, 54, 57, 64, 65, 71, 73, 78, 80, 82}
corresponding 1-based indices: {1, 3, 8, 22, 24, 27, 60, 66, 79, 80, 173, 178, 194, 202, 261, 290, 362, 407, 455, 516, 551, 611, 661, 771, 935, 963}
551, 661, 771... hmmm
 
1:53 PM
It looks quite random.
 
lookahead and lookbehind doesn't change direction in reverse mode? that seems weird
 
@randomra what do you mean "change direction"?
lookahead still looks to the right and lookbehind to the left
 
@MartinBüttner worst at? Probably audio output :P
 
that is lookbehind is always RTL, lookahead LTR... anything else would be confusing
@CᴏɴᴏʀO'Bʀɪᴇɴ you could output some plaintext format to stdout.
 
@MartinBüttner Oh, true.
 
1:57 PM
@MartinBüttner you are probably right, the whole lookaround in reverse mode is confusing to me...
 
After that, probably Graphical output. Jolf only has a turtle.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ I meant more like string processing, pattern matching, array manipulation, ASCII art generation, arithmetic, complex arithmetic, geometry, graph theory, stuff like that.
 
anyway the nub approach seems to be shorter in retina
 
really?
I wasn't even done with it and was already around 70 bytes
 
I'm not exactly finished with it either
 
2:02 PM
new attempt, 68
 
70 for first try:
.+
$0,$0
\b(\d+) (?=.*\b\1\b.*,)

r`(?<=,.*\b\1\b.*) (\d+)\b

(.*),\1
[empty line]
 
$ --> ,$_
 
@Calvin'sHobbies Was it wordsmith.org/anagram/advanced.html ?
 
the last match needs an anchor though and you're returning the opposite result
 
if the last regex matches to something, that's no problem, we still have truthy value left
 
2:05 PM
oh you have an empty line, right
I ended with a match stage
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Probably Perl Kappa
 
64 then
$
,$_
\b(\d+) (?=.*\b\1\b.*,)| (\d+)\b(?<=,.*\b\2\b.+)

(.+),\1
<empty>
 
@MartinBüttner Complex arithmetic, but that is to be fixed. What is "Graph Theory" in your sense?
 
well any challenges based on arbitrary graphs, like path finding, finding connected subgraphs, hamiltonian cycles, graph distance, stuff like that
 
oh I see.
That, too, ish.
Why do you ask?
 
2:14 PM
trying to come up with a challenge where no single language can do all the necessary parts easily.
5
yesterday, by Martin Büttner
I wonder if this would be fun: a code golf with a larger problem that requires 3 or 4 distinct stages of fairly different nature (some string processing, some arithmetic, whatever). answers can consist of multiple programs (in different languages) and you get pipes between those programs for free.
 
@MartinBüttner Find a counter example to the rieman hypothesis. No language can do all necessary parts easily.=D
 
I wish people would just leave me alone.
5
 
Hardly any people have viewed (not to mention, answered) my question, even after the bounty ಠ_ಠ darn
 
2:22 PM
which question?
 
@NewMainPosts Thank you, and someone, edit that closed question out of chat!
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Euclidean Vectors
 
10
Q: Euclidean Vectors

Zach GatesGiven the ASCII art of two vectors, find the resultant vector's magnitude and degree. Input This can be received via STDIN, read from a local file, or provided through a function call. Here is an example of a two vector input: ^------> | | | x This represents a change of 4 units north and ...

that one
 
@MartinBüttner I can help you with general weaknesses of Jolf: Jolf is bad at almost nothing; that's the way I designed it. As thus, it will rarely be the shortest, but will often be amongst the shortest. However, iteration is really a problem. The only control structure is a while loop, and for loops can only be simulated by iterating over a range. Recursion is also hard.
 
2:26 PM
@NewMainPosts One rule, you are never alone. Danke schon for editing, and also you're very good at making us happy!
 
@CᴏɴᴏʀO'Bʀɪᴇɴ thanks, good to know :)
 
2:44 PM
 
hi all
 
I have a new binary matrix challenge in mind :)
 
but first.. would anyone who can write fast code like to do me a favour please? It's only a small favous :)
I would like to know if there exists a 14 by 28 circulant matrix with all entries +-1 where all the rows are orthogonal. There are only 2^28 such matrices so in theory this is doable but my python is too slow :(
 
2^28 = 268,435,456 so it's not a very large number
 
@Rainbolt O.O
 
@zyabin101 :)
 
is that a recent set?
 
I only have JS on hand, and that's no good.
 
2:47 PM
* I don't know a meta tag more similar to .
 
I should learn how to use cython or numba I suppose.. or nim
 
@Lembik Learn to use Python instead Kappa
 
@zyabin101 what do you mean?
 
@Lembik I didn't really mean you to choose between the interpreters <http://chat.stackexchange.com/transcript/240?m=26711107>
 
ok
in any case, I would be very grateful
 
2:51 PM
@Lembik Are you already using PyPy?
 
to anyone who didn't watch the stepmania showcase in AGDQ, you really gotta see this
 
@MartinBüttner ?
 
Aww, dang ... I was going to go nominate codegolf.stackexchange.com/a/68494 for "Most above-and-beyond answer" but saw that it was posted Jan 3
 
2:59 PM
@MartinBüttner what is wtaf worthy?
the stepmania showcase I linked?
 
:@trichoplax sadly numpy doesn't work with it and my code uses numpy
 
@MartinBüttner it gets better :)
 
@TimmyD you're not the first person to point that out ;)
 
:D
 
3:00 PM
@MartinBüttner in starcraft terms, 25 notes per second = 1500 apm
 
@trichoplax it only really uses numpy for the orthogonality testing.. I could rewrite that in pure python and see if pypy is then faster I suppose
@TimmyD there have been quite a lot of above and beyond answer in 2015!
ok so here is the new challenge. Find as many n/2 by n circulant matrices with entries from -1, 1 where all the rows are orthogonal.. in 2 minutes
that's it :)
what do people think?
(clue: n has to be multiple of 4 for there to be any)
 
@Lembik I wonder if we could work "making PyPy work with numpy" into a challenge somehow...
 
@trichoplax yeah, as part of a mini-series
 
ooh that could work
 
first challenge is to acquire a research grant to fund the development project :)
 
3:03 PM
lol
 
@trichoplax would be wonderful. I have to say they have been working on adding numpy to pypy for years but progress is glacial
if you look at the jobs that are not done, many are clearly an afternoon's work for someone good and they are undone for years
 
@NathanMerrill I added a comment to the meta answer but I'm guessing it won't ping you - it's another point in favour of the extra meta discussion you suggested.
 
only the first section is done, gotta finish the rest
 
@orlp looks fun!
@orlp as an example.. see bitbucket.org/pypy/pypy/issues/1699
 
3:42 PM
3
A: Finding Exclusive Area in Circle Intersections

EllPython 2, 631 bytes from cmath import* C=input() O,R=C[0] def I(p,r,q,s): try:q-=p;d=abs(q*q);x=(r*r-s*s+d)/d/2;return[p+q*(x+z*(r*r/d-x*x)**.5)for z in-1j,1j] except:return[] S=sorted V=S(i.real for p,r in C for c in C for i in[p-r,p+r]+I(p,r,*c)if-R<=(i-O).real<=R) A=pi*R*R for l,r in zip(V,...

O.O
 
Longer than Java!
Or not.
I forgot what question that was :P
 
@MartinBüttner A pirate has invaded this answer! Find it and win a cookie! Sorry, @undergroundmonorail, you can't participate.
 
@trichoplax This seems to work now.
 
@Dennis Can I steal your bb96encode function from Bubblegum?
 
3:57 PM
Sure, go ahead.
 
Thanks.
 
np @potatoesfornogoodreason
 
mm potatoes
 
@AlexA. Wow, thank you! I really appreciate that. :-)
 
This confused me for a second:
>>> set("test");
set(['s', 'e', 't'])
6
:P
 
4:10 PM
hahaha
 
@Dennis I didn't think it was worth commenting on something that had been there since 2011. I'll know better next time. Downvote changed to an upvote.
 
@quartata LOL
@MartinBüttner I don't know that there's one particular type of challenge that Japt is not so good at. I guess any challenge that could really use a built-in Japt didn't have at that point.
Oh, it used to be bad at challenges requiring getting the date, up until Thanksgiving when I added Ð.
And it's still bad at challenges requiring loops or timing, as I haven't implemented built-ins for those yet.
 
what is the smallest positive integer that can not be computed using 10 bytes of Pyth?
 
My first bet: 786515726947719637
 
and maybe more interesting question
what is the biggest positive integer that can be computed using 10 bytes of Pyth in finite time?
 
4:15 PM
@primo Your BF answer is absolutely bananas. How did you find appropriate recurrence relations?
 
@Dennis ?
I love potassium
 
40
A: "Hello, World!"

primoBrainfuck, 83 bytes Open-ended bounty: If anyone can improve this score, I will pass the bounty (+500) on to them. -[[<+>->----->>>+++<<<<]>++]<<+++++.<<--.>..<<.<<<----.>>+.<<<-.>>>>.+++.>>.<-.<<+. Try it online! The first 28 bytes -[[<+>->----->>>+++<<<<]>++] initialize the tape with the...

 
@Dennis crunch, crunch, crunch
 
Bananas do not go crunch... Brute force?
 
 
4:17 PM
platypus are evil
 
@Cyoce beastly pi
 
DDBC
 
@Dennis still not submitted to anarchy golf
 
ha͏̲͕̲͎̗ ̴h̗̰̩͍a͎̙̼͍͇ ͍̤̖̳͎̤h̥̱̱̟̞̥a
@orlp He did
 
@Dennis Banana chips, maybe?
 
4:18 PM
@Dennis yes, brute force. although the i've been using a greedy search algorithm, so I may have missed some
 
although I see 22 byte solutions on hello world for brainfuck
 
@orlp the 81-version is
 
@orlp They're cheaty solutions
 
How do those cheating solutions work anyway?
 
@Cyoce WOOOOOOoOOOOOOoOOOOOOoOOOoOoOOOOW!
 
4:18 PM
@quartata ?
 
I saw a 13 byte BF solution on SO: Hello, World!
 
I believe they take Hello World as input
 
not all of them are marked as cheats, too
 
@Dennis probably some bug of the interpreter and the test script?
 
the 22s include a whitespace, so I imagine they have "Hello, world!" embedded somehow
 
4:19 PM
@orlp doesn't mean the unmarked ones aren't :P
 
@orlp they should be
 
besides, if they're cheats
their system is flawed
 
yes...
 
it's the interpreter they use
 
I feel like the test script just checks for the substring Hello, world! and the cheating ones throw an error in the BF interpreter that prints the source code
 
4:19 PM
Ironic considering how we keep getting those people saying anagol > ppcg
 
not necessarily the system
 
@primo well, then they're not cheaty solutions
 
@MartinBüttner Surely that would output to STDERR
 
Why guess? @Mauris How do you cheat at brainfuck?
 
the goal of code golf is to get a certain interpreter to output the desired output
 
4:20 PM
@quartata depends on the interpreter.
 
wow what a terrible interpreter
 
I just went through my first JS answer on this site ever... and golfed off 31 bytes. Boy, how I have improved.
 
@ETHproductions eehm
that's meaningless
60 -> 29 is amazing
1000031 -> 1000000 not so much
 
137 -> 106
 
that's decent
 
4:23 PM
did fall out of favor because it is difficult to score, or because it heavily favors languages with billions of built-ins?
 
depending on the challonge
 
So roughly 23%
 
@quintopia because "what's a token?"
 
by the way, I'm still waiting on a golfed log n solution: codegolf.stackexchange.com/questions/69060/…
 
and because you can always put the entire code in a single string token and eval it
 
4:24 PM
It was originally 153, so that's 30% total
 
@MartinBüttner The tag wiki didn't cover all cases?
 
the only way to make work is by defining your own toy language with a clear definition of tokens
 
eval("print(1+2+3+4+5)") wee 4 tokens
 
those challenges can actually be quite nice, but they are very rare
 
@orlp you got one
0
A: Partitioning reciprocals

Cameron AavikPython 3, 7306 Bytes So before I start, I should mention that I did this late at night and didn't have time to turn the massive i method in the below code into something which is probably 3 times shorter. That is my plan tomorrow, so by no means is this final. This solution runs in log(n) compl...

 
4:25 PM
@quartata a golfed solution
 
Ah
It's.... kinda golfed
 
ehh
 
Just not great
 
@orlp do you know how to generate the table efficiently?
 
@orlp It's challenge!
 
4:26 PM
@MartinBüttner no, but I know that that table can be compressed a lot
 
of course
 
@quartata @ThankYou @NewMainPosts... wait, you'ren't @NewMainPosts! @TankYou! Kappa
 
Breaking news: this isn't Twitch.
6
 
i hate the way certain keystrokes clear the message box unretrievably
 
Also, "@ThankYou!" - what?
 
4:28 PM
@MartinBüttner Kappa
 
new challenge posted to sandbox
 
@quintopia here's the only good I can think of off the top of my head: codegolf.stackexchange.com/q/37188/8478
 
@Lembik No. Kappa
 
Kafka?
 
@MartinBüttner A token is "any sequence of bytes which, when one of the those bytes is removed, does not perform some part of the original operation". Thus for is a token in python because fr doesn't do something. An eval'd string of CJam operations is not a token because removing some byte from the middle of the string will still allow most of the operations the string describes to be performed.
 
4:30 PM
@TimmyD He looks so startled (͡๏̯͡๏)
 
@mınxomaτ he's seen some shit
 
@orlp He thought some shit.
 
@mınxomaτ (͡ ๏ ̯͡ ๏ ) [[PPCG]]
 
@quintopia Surely, I can break that definition with a checksum?
 
@zyabin101 I literally have no idea what that means. Sorry
meta.codegolf.stackexchange.com/a/8059/9206 please take a look and comment
 
4:32 PM
@quintopia 01
 
Also, I can easily encode the entire string such that removing a byte from it, breaks the decoding, or decodes to something completely different.
 
Breaking news: what's Kappa?
 
yesterday, by zyabin101
@wizzwizz4 Kappa is an emote on Twitch that generally means sarcasm or trolling
 
What's Twitch?
(Seriously, no clue.)
 
www.twitch.tv
 
4:34 PM
@MartinBüttner Ninja'd me!
 
@MartinBüttner Ah, gotcha
 
emote == emoji?
 
@Lembik car -> cars
emoticon -> emoji
 
or .. thanks!
I am learning so much :)
 
@MartinBüttner Checksum won't break it because because the section of code still changes meaning even if it never gets run. Compression/hashing is not allowed.
 
4:35 PM
nevermind
I'm actually spewing bullshit apparently
 
@Lembik There's no Kappa emoji.
 
Kappa is the universally recognized symbol for sarcasm
coming in the new unicode standard
 
ok.. well if anyone could look at my new challenge I would much appreciate :)
! Kappa
or ~ Kappa maybe
does it look like charbase.com/images/glyph/1008 ?
 
9 mins ago, by orlp
user image
that's Kappa
2 mins ago, by orlp
Kappa is the universally recognized symbol for sarcasm
 
@quintopia "Compression/hashing is not allowed." see, now you're starting to add fairly vague restrictions just to somehow make it work.
I think that's why it's not popular.
 
4:40 PM
@Dennis You embed the output in the program, yeah, and rely on the memory layout of the interpreter
i.e. the code and the tape happen to be adjacent on anarchy golf. So if you do +[<+] (I think) and put a 0xFF byte in your program...
 
Wow, I was absent most of yesterday, and there are like 20 new questions today. lol
 
0
A: Sandbox for Proposed Challenges

LembikCount the number orthogonal matrices Call a matrix with all rows orthogonal an orthogonal matrix. We well only be interested in matrices where the entries are either -1 or 1. A circulant matrix is one where each row vector is rotated one element to the right relative to the preceding row vector...

 
mitchs does +[<-] and appends some "junk" to end up with 0B 00 00 1B (00) 64 on the tape
 
@NewSandboxedPosts Thank you!
 
4:43 PM
@zyabin101 Don't even think about it.
 
@MartinBüttner are you glad I stopped? :{
 
@Mauris I see. Thanks!
 
@MartinBüttner Don't worry, I can return @RikerW his post if you both want.
Or move the post to someone else.
 
Alternatively, you could go trolling elsewhere.
13
 
How about that is @NewMainPosts' job? :P
 
4:45 PM
@RikerW It's a they. So, @NewMainPosts' job.
 
Go here to troll ^.
 
@RikerW No, it requires login.
 
@MartinBüttner This is hardly an uncommon restriction in restricted-source challenges. And you yourself said that atomic-code-golf is only good when the source is restricted. Now we just have to settle on how much or how little restriction is absolutely necessary.
 
@zyabin101 You can use your SE account.
 
Good thing I have Stack Exchange.
@RikerW Ninja'd me!
 
4:46 PM
@quintopia I didn't say it's good when the source is restricted. I said it's good when you define a language to use for the challenge that doesn't have those problems in the first place.
 
ninjaed
 
hmm.. maybe some people will be interested in sandbox'ed questions later on. I just want to know if there are obvious problems with it
 
TypeError: Cannot set property 'provider' of undefined
   at Gunzip.<anonymous> and five other locations of code
I can't, as you see.
@RikerW The correct spelling is Ninja'd.
Where to log errors?
 
@Lembik I think it needs a better input criterion than that.
No input, and the n is up to the programmer is a bit subjective.
 
@MartinBüttner Now you're saying the same thing I am in different words, approaching from a different direction. You're saying "create a language by starting with the empty language and adding features until there's enough to solve the problem but not enough to break atomic-code-golf" and I'm saying "start with the language union of all programming languages and remove features until there's not enough to break atomic-code-golf"
 
4:50 PM
@RikerW go on... the idea is that the code can try lots of different n's. The output and score is well defined no?
 
Yes.
 
@RikerW thanks for looking at it
 
You're welcome.
 
@quintopia right, but "compression" or "hashing" is not a feature. I don't see how you can define these in an unambiguous manner that doesn't allow similar approaches that still break the challenge.
 
@Lembik I may be wrong, but if they find an n that has a lot of circular matrices, than they would win, correct?
 
4:51 PM
@MartinBüttner You don't have to completely disallow them. You just have to disallow enough that attempting to use them will result in more tokens than not using them.
 
@RikerW yes they would!
@RikerW I updated the question
@RikerW it would be great if someone could try it out and see if there is some simple answer.. I don't think there is however
 
@MartinBüttner for sufficiently simple challenges, disallowing hashing builtins is probably sufficient.
 
@Lembik How about a series of test cases? The score would be the sum for all of the test cases maybe divided by the code length?
@Lembik OBTW your circulant matrix link is dead.
It has an extra `]` on the end.
 
@Mauris Wow, that's...
 
@quintopia what's a token in Unary? If I remove a single 1 the program is no longer valid at all.
@quintopia what's a hashing built-in? only stuff like MD5?
 
4:54 PM
@MartinBüttner then the "1" is a token
 
but that doesn't seem to meet your earlier definition? there is no rest of the program whose semantics remain unchanged
 
@RikerW thanks!
 
@MartinBüttner any function that computes a hash of any sort of a string or object. for instance, python's hash
 
@RikerW I am not sure what you mean by test cases. Do you just mean show some example matrices ?
 
define "hash"?
 
4:56 PM
@MartinBüttner wait, hold on i must misunderstand Unary. how does removing a 0 make it not valid?
 
@Lembik I mean like give a list of inputs for n, and there score is how many matrices they found for all of those inputs combined.
Possibly divided by their code length.
GTG now, sorry I can't help more.
 
@quintopia well it depends on the program I guess... but the binary representation must always have 1 (mod 3) digits
so there are cases where removing a 0 breaks the program
 
@MartinBüttner Oh. I've never worked with the interpreters. I just assumed it would round up to the correct amount of digits by padding with leading zeros
 
hm, I guess those are trivial though
another example: 2450585474726799655123124214579 115b:c~
that's an arbitrary CJam program in 7 tokens
(that one prints Hello, World!)
 
neat
 
4:59 PM
@trichoplax It did ping me :P
 
@quintopia does that fall under any of your disallowed functions?
 

« first day (1808 days earlier)      last day (3018 days later) »