There are 4 posts in our site history that score over 1000; 2 are incredible works of programming art, one is the inspiration for one of those pieces of art, and another is a ripoff of a more interesting answer that doesn't even bother to golf their answer in the slightest
@AidenChow The question was on the HNQ for like a week IIRC. That was the first proper question that "revealed" us to the rest of the network - before that, we were sort of a hidden site that did what we wanted in our corner
We recently turned 10 years old. Unfortunately, we didn't really realise and therefore didn't really celebrate or even mark the occasion. But, it got me thinking about the history of the site, and now that the site blog is a thing, I thought I'd write up a brief (or rather, not so brief) history ...
Not really. If you have a topic that relates to the site, you are welcome to write a blog post about it. Just post it to meta with the cgcc-blog and discussion tags
Python 2, 7 characters
exc="%\n
Any Python 2 program can be encoded using these 7 characters (\n is newline).
Constructing arbitrary strings
We can perform concatenation by repeatedly applying the substitution operator % on a single string. For example, if a=1, b=2, c=3, "%d%%d%%%%d" % a %...
Traceback (most recent call last):
File "/ATO/code", line 1, in <module>
int.__sub__=1
TypeError: cannot set '__sub__' attribute of immutable type 'int'
@NumberBasher Anyone with 75 rep or more can offer up an amount of rep on a question, saying "If you answer this question, and I like your answer, I will give you this much rep". You lose the rep, but give it to someone of your choosing. (it gets more complicated if the question is unanswered). However, you can't start this until 2 days (48 hours) after you post the question
> On May 7th 2014, Doorknob was officially given a diamond, something he's kept for the past 7 years as he's competently moderated the site through the rest of the events I'll be recounting
Jelly, 10 bytes
9s3’Ẓæ*³FṀ
Try it online!
1-indexed. Computes the largest element of: $$\begin{bmatrix}0&0&1 \\ 1&0&1 \\ 0&1&0\end{bmatrix}^n$$
where the binary matrix is conveniently computed as: $$\begin{bmatrix}\mathsf{isprime}(0)&\mathsf{isprime}(1)&\mathsf{isprime}(2) \\ \mathsf{isprime}(3)
@NumberBasher Looks interesting. One thing I would add: it never hurts to add a bit more to everything :P There's always a sentence or 2 you can add to improve something
speaking of esolangs, ive always never gotten how custom character encoding stuff works, like how can u make certain characters be 1 byte and how can i make my own encoding
Matrix Meets ASCII Art
A binary matrix represents a shape in the plane. 1 means a unit square at that position. 0 means nothing. The background is 0.
For example, the array [[0,1,0],[0,0,1],[1,1,1]] represents the following shape:
o----o
|////|
|////|
o----o----o
|//...
TSP
What is TSP?
Travelling Salesman Problem
https://en.wikipedia.org/wiki/Travelling_salesman_problem
tl;dr
!!! The Salesman goes in a loop
So, you return to the place you start with.
Why TSP?
TSP is NP-complete.
Thus, it would be nice if we can find a way to solve TSP the fastest. :-)
Sample In...
My First Impression on Code Golf Stack Exchange
How I got here
I saw a few sites of Stack Exchange elsewhere. Exactly where I forgot, but it made the first impression of Stack Overflow to me: they were indeed very sophisticated. I learned about Code Golf Stack Exchange (which I will shorten to CG...
TSP
What is TSP?
Travelling Salesman Problem
https://en.wikipedia.org/wiki/Travelling_salesman_problem
tl;dr
!!! The Salesman goes in a loop
So, you return to the place you start with.
Why TSP?
TSP is NP-complete.
Thus, it would be nice if we can find a way to solve TSP the fastest. :-)
Sample In...
@NumberBasher "Input format is exactly like that above." any reason why the input format is that restrictive ? why not allow a list of lists or something similar ?
A binary matrix represents a shape in the plane. 1 means a unit square at that position. 0 means nothing. The background is 0.
For example, the array [[0,1,0],[0,0,1],[1,1,1]] represents the following shape:
o----o
|////|
|////|
o----o----o
|////|
|////|
o-...