« first day (2136 days earlier)      last day (3002 days later) » 

00:00
:O:O:O:O
is there alternate python docs, official python documentation is very bad
are you for real right now
@Downgoat wat
i understand you like python but that doesn't mean every part of it is perfect
Maybe the better question is what are you looking for
00:02
@Downgoat xnor is the alternate python documentation.
Because Python's docs are pretty damn comprehensive
Python has the best docs I know.
@quartata MDN is comprehensive. Python docs are badly organized
Python docs are organized by module
How else are they supposed to be organized exactly
00:03
@quartata reverse alphabetically
Yes. lets have one page for all iteration objects and everything about them
how could this possible go wrong
I suspect you're looking in the wrong place
What are you looking for
TIL python docs is wrong place to lookup docs on .setdefault
@quartata descending order of the md5 sum of the HTML code of each page
@Downgoat As in the dictionary method?
why is that not in data structures with dict
wat
10/10 absolutely brilliant docs
Because that's the freakin' tutorial.
Why are you looking there
4
i dont know maybe because it shows up when i google "python dict docs"
and if its the tutorial why does it list the methods of list and just discuss what a dict is?
i mean at least have a seperate section for list and dict instead of putting list docs in the tutorial and half of dict docs in tutorial and somewhere else
That doesn't even make sense
The tutorial is the tutorial. It isn't a reference for anything
All of the list and dict docs are in the docs
00:09
@Downgoat Stop criticising Python's docs if you can't even make a decent doc for Cheddar :P
@TuxCopter Hey
@TuxCopter incomplete =\= bad :(
00:19
It turns out googling an unusual keyword from the description of a Youtube video with few views (but not too few) is the best way to get a list of malicious sites from Google
CMC: Given a binary number, remove trailing 0's, replace 1's with i's, replace any run of 0's with a single +. Evaluate the resulting complex equation. e.g. 38 = 100110 -> i+ii = i+i^2 = -1 + i
@Calvin'sHobbies How do you even come up with this stuff.
idk
Was about to ask that as a real challenge but codegolf.stackexchange.com/q/76062/26997 has already mixed binary and complex (in a more elegant way)
argparse is defualt python lib right?
@Downgoat Yes.
00:32
ok
If I do parser.add_argument("file") is there a way to make this argument optional (using argparse)
I don't want to have to use a flag
@Calvin'sHobbies Surely a terrible solution that can totally be golfed, but Python 3, 123 bytes: lambda n:eval(bin(n)[2:].replace('1','1j').replace('j1','j*1').replace('j0','j+0').repl‌​ace('01','0+1').replace('00','0+0')).
@Downgoat required=False
I'm not sure if that works for positional arguments though.
TypeError: 'required' is an invalid argument for positionals
nope :(
Oh right: nargs="?"
00:48
I think I like python 10x better because of argparser library
0 * 10 = 0 though :P
@Calvin'sHobbies xnor could probably golf this a lot better, but as a start: f=lambda n,k=0:(n and f(n/2,n%2*(k or 1)*1j))+~n%2*k
^ Ah, there we go. That's the sort of thing I was expecting. :P
$ ./changelog.py --latest
                                 v1.0.2 -> HEAD
================================================================================
change:
 - Vihan B (ec956b7) stdlib: renamed `vfuse` to `asLines`
feature:
 - Vihan   (9376c8e) dict: Added eval_accessor to dicts, abandoned `repr`
fix:
 - Vihan B (284058b) noop: Removed buggy noop op (`+`).
git:
 - Vihan B (e05819f) vbump: Adjusted vbump script for verification
optimize:
 - Vihan B (3d10b87) loop: Loops are now converted to `for`s
:D this is beautiful
The heck
It's broken for me but it was working just yesterday
yup shows for me
00:53
OK, now it's working. What the heck
RTOD: I should get a Downgoat t-shirt printed... that would be awesome
> My crc32 was c8cb204, and all I got was this lousy T-Shirt!
Would a 5*5 board where you have to match 4-in-a-row work for 3-player tic-tax-toe?
> tic-tax-toe
hmm, my new esolang is almost PPCG-ready I think
01:03
Where you need to give 50% of your moves to the government
Dammit autocorrect on phone :(
(it'll only win prizes in some very specific types of contests, I suspect)
the hard part is figuring out how to write a primality tester
(I have working addition now though!)
although it works in unary internally so takes a long time with large numbers
maybe some day I'll have an RLE-based interpreter that can fix that
I guess I'll start by writing factorial
@Qwerp-Derp Check this out. Long story short, I recently co-developed a game that has that as a major element.
01:16
Nice
Im just throwing around concepts, but what about an MMO version of Risk where you can trade between conquered cities, and produce defended for those cities and stuff?
TBH, the 3-player TTT thing was for designing a massive KoTH with everyone playing the same game.
Currently just headed out atm, I'll try it later if nobody else ends up posting
@Sp3000 *steals your solution* MUAHAHA REP POINTS
2
Q: Complex Binary Numbers

Calvin's HobbiesLet's create a simple, surjective mapping from positive integers to Gaussian integers, which are complex numbers where the real and imaginary parts are integers. Given a positive integer, for example 4538, express it in binary with no leading 0's: 4538 base 10 = 1000110111010 base 2 Remove an...

@El'endiaStarman If you can golf it by at least 5 bytes, you have my permission to do so :)
01:28
@Sp3000 Ah nevermind then. :P
(For reference I'm only saying that because the current solution looks golfable by about that much to me, due to the (k or 1))
>>> 3 % 2j
Traceback (most recent call last):
  File "<pyshell#10>", line 1, in <module>
    3 % 2j
TypeError: can't mod complex numbers.
I actually hadn't seen that error before. :P
Because complex numbers are rare probably
@El'endiaStarman What would the result be?
Urgh I can't do 0**1j
01:34
Just 3?
@Calvin'sHobbies I...don't really know/remember what I was expecting.
Hmm. Lessee... n%p=q means that n=pk+q. Then 3%2j would be 3=2j*k+q, but I guess there are an infinite number of solutions. Oh, a further constraint to give a unique solution is that 0 <= q < p, and that's why modding by complex numbers doesn't work: there's no good way to order complex numbers.
You could mod real to real, complex to complex
On the other hand, what if you made it so that 0 <= |q| < |p|?
@Calvin'sHobbies Yes; that would make k real.
Hmm. -2j*2j-1 = 3 and -j*2j+1 = 3, so even then, there's too many solutions.
0
A: Sandbox for Proposed Challenges

LaikoniThinking outside the box - Am I doing it right? I keep hearing that thinking outside the box is a goal worth achieving, but how can I tell if I'm successfully doing it? To solve this dilemma I have already wrote a Brainwave-to-ASCII-translator which in theory should produce outputs like ######...

01:50
@Downgoat Tutorial ≠ reference
2 hours ago, by Downgoat
i understand you like python but that doesn't mean every part of it is perfect
Still holds.
it's documentation is pretty bad relatively
For example?
2 hours ago, by Downgoat
i mean at least have a seperate section for list and dict instead of putting list docs in the tutorial and half of dict docs in tutorial and somewhere else
it's really badly organized
01:53
@Downgoat There are separate sections for both
both what?
@noɥʇʎPʎzɐɹC I'm fairly certain he got that now, did you even read past that
The full documentation for both list and dict are in subsections on primitive types
Aside from that one page everything else is organized by module
also they put like everything on one giant page without any clear organization, it's quite easy to quickly find what you're looking for
There are 10 types of people in the world: Those who can't number, those who know binary, those who know ternary, those who know quaternary, those who know quinary, those who know senary, those who know septenary, those who know octal, those who know nonary, those who know decimal, those who know undecimal...
01:57
@Downgoat that's what ctrl-F is for
> it's quite easy
I'm not sure how you'd propose to have it organized to be honest though
@Downgoat Ctrl-F. It's like an index.
01:58
Almost all languages organize by module
That's what this does
"They put all the content in one giant book!"
@quartata yes, except the fact they are 100 results because it is mentioned quite a bit out of the single definition
> that's what ctrl-F is for
are you even reading the chat
@Downgoat use modulename.methodname( in ctrl-f
@quartata see MDN, Ruby, etc.
01:59
Furthermore all the module pages have a table of contents
It's on the left
Crack my regex: does https?:\/\/www\.google\.com\/.*[?#]q=(\w*\.x).* match & capture every google search URL with the query ending in [alphanumeric chars].x (as in the url bar) possible, and no more?
I'm not sure what exactly is there that makes you think python docs so great, except the fact of python
I mean search function is bad but
y u hate python??
I never said I hate python
I like python's doctests
02:00
you guys have got to stop associating anything with "Python" in it with me calling Python bad
I don't submit minified code to my teacher and ask them to just ctrl+F for applicable sections
I don't know about calling Python docs great, but they seem as normal as every other major language doc I've seen. I wouldn't call them bad though, personally.
If I had to gripe about language docs, I'd probably pick Java :P
@Downgoat To be fair, you do seem to have love-hate relationships with languages. I can never tell if you love or hate JS :P
It depends on which relationship makes for better joke
@Sp3000 Why? (And are you talking the docs on the core language, or that javadoc thing they do with all the libraries?)
^^ goat in nutshell
02:03
@Downgoat pls golf assignment (and give ungolfed copy) to teacher and tell reaction
javadoc is bad
java is weird
we have to javadoc all the code we write BY HAND
Javadoc's a great way to capture documentation at way too low a level
I'm 99% I'll have RSI by finals week
(By too low I don't mean too detailed; I mean tunnel visioned)
02:05
> JS is just like ice cream cone because [finish joke here].
> JS is just like ice cream cone because both hold a melting mush of stuff
@HWalters Core language, Javadoc is fine. Not sure why I got that impression though, looking at it now it doesn't look as old/verbose as I remember.
> JS is just like ice cream cone because both are much cooler than java.
(.x is not a valid TLD)
02:16
How I get to PPCG: c<return>.
9
<ctrl><page down>
@mınxomaτ You go there a lot...
Welp my bookmark system will be more explicit
I don't seem to visit other sites that start with c.
@GabrielBenamy This is why I asked if .z or .x was catchier...
02:20
The next one is clientsfromhell.net, then cloudflare.
Ya found a bug on cloudflare?
How do you get to TNB?
It's pinned.
Oh, of course.
I can do ppcg.se.x or tnb.x/whatever
How many tabs open now?
Many. Still working on linode.
Funny how I have to use Tor to visit my own public sites, because my ISP can't be bothered.
c
@mınxomaτ 0/10 doesn't work on my system
02:30
c gets me to tnb
@mınxomaτ 10 - 70 or 71-150?
@ΛεγίωνΜάμμαλϠΟΗʹ In the URL bar, silly.
@El'endiaStarman lol, that's what I use
The only problem is that FF takes about .4s to autofill it
So if I hit enter too early, Google tries to inform me about Citigroup, Inc. stocks and the C programming language
git y u do dis ;_;
The rendering of your prompt is broken.
02:42
I know but I can't fix anyway
I could use HyperTerm but it's slow
GIT WHY U GOTTA DELETE THOSE FILES WAT HALP IM SO CONFUSED
@mınxomaτ # of tabs
@Downgoat gitup application; fixes those weird git errors, use w/ terminal
@Downgoat Did you do git -rm file instead of git -rm --cached file?
Did I get kicked while I was offline? I saw the SE logo flash in the title bar for a sec.
@El'endiaStarman No idea. It happens whenever i change back to the develop branch
@noɥʇʎPʎzɐɹC how is it applicable?
@Downgoat I believe that's by design.
02:46
but why??
those files are being actually removed
Assuming the dev branch doesn't have those files.
dev branch has those files as you can see in green line
It's just like how files are changed when you switch branches.
@Downgoat It has a good and simple GUI thing for staging/unstaging files super easily (click twice)
02:48
When you checkout a branch, all files within the repo are changed, added, or deleted to match the state of that branch so you can do whatever work you like, then commit when you're done.
yeah, but i didnt change anything and git delete itself?
master also has those files
so i have no idea what or why git is doing this too me
Well, did you add those files to the master branch after branching off the develop branch?
Merging might help you. git merge --help
@El'endiaStarman master branch has all the files that are shown to being "deleted" in the pic
so much wat
@Downgoat Right, and you're on the develop branch, yes?
gitignore is not doing anything bad either:
# Node modules
/node_modules

# junk
npm-debug.log
coverage

# Left overs
/dist
/cheddar

# Local test files
TODO.md
/*.cdr
/*.bf
02:50
You need to unstage files
@Downgoat you spelled leftovers wrong
i know. I can fix it using git checkout HEAD -- . but the fact it keeps happening will mess with merge scripts
@El'endiaStarman yeah
@Downgoat Did you add the files to master after making the develop branch, and didn't add or merge them into the develop branch?
nope, those files are even in both branches
and it's only happening in the develop branch
even if i recreate them and recommit it'll happen again
it's quite frustrating
Oh wait, I get it now.
I mean, your problem. Not a solution.
I didn't realize that you started in develop, and then just switched to and back from master.
maybe i found bug in git
goddammit torvalds
I've tried recloning too
02:55
I'm skeptical that this has never been noticed and fixed with the millions(?) of people using git.
But maybe that's the case. Try doing a search for a bug report.
> In my opinion MS is a lot better at making money than it is at making good operating systems.
XD
why is quark my favorite DS9 character
03:24
78
A: How do they travel so fast in Futurama?

ValorumPer "A Clone of My Own" Farnsworth: These are the dark matter engines I invented. They allow my starship to travel between galaxies in mere hours. Cubert: That's impossible. You can't go faster than the speed of light. Farnsworth: Of course not. That's why scientists increased the s...

Why did that show ever get canceled?
The people at Box were incompetent, but they were fired out of of a cannon into the sun
That Futurama excerpt reminds me of The Hitchhiker's Guide to the Falaxy with its improbability drive
I think I should read that book.
A website I use decided it was a good idea to put snow in a foreground animation. What is this, 1999?
@Dennis Of course! I should read it too. For the third time
Well, it would be my first. :P
03:34
It's a trilogy of five books (in the author's words). I recommend the first
The others are not so good
Although enjoyable too
The first three are great but the last two aren't quite the same
To me, the second was boooring
Wikipedia says there are six.
I think the sixth was not Douglas Adams'
Sixth wasn't released as part of the trilogy; it came out later
03:37
I should dig though my father's books. I'm sure he had it.
...And Another Thing was written posthumously by another author
The Salmon of Doubt was originally the third Dirk Gently book, but was unfinished, and could have been turned into the sixth Hitchhiker's book
@Dennis This is nicely typeset in Computer Modern. It's the one I started with. Then I got a printed version with the 5 books
Thanks for the link, but I'd need a tablet to read an eBook in bed.
I read it on the laptop in two sittings. I just couldn't stop :-D
Wheh! Been working on "homework" all day...
03:54
0
Q: Write an program that terminates after 60 seconds - Robbers Thread

TheHansinatorThis is a cops and robbers challenge - Cop's Thread Each of the cops have been tasked to write a program that terminates after exactly 60 seconds, or as close as possible. For example: #include <unistd.h> int main(int argc, char **argv){ sleep(60); return 0; } Your goal is to take any...

Are there default rules for compliance regarding non-deterministic outputs to challenge posts?
(IOW, if sometimes your output doesn't comply, but sometimes it does?)
Submissions have to work every single time they are run.
This is a strange case I think; the author of the challenge seems to suggest he'll accept such answers... I might have to language lawyer this a bit
Until then won't post
In case there's someone knowledgeable in sequential estimation (statistics) here, could you take a look at this question?
Oh, there's a posted answer that doesn't "always work" either
04:06
Which question are we talking about?
The point I'm quibbling about is the use of a shuffle, and the chance that this generates 6 or more words in a row
04:18
Got it! "Random shuffling actually is a valid way to meet the criteria, and I'll alter the question to reflect that"
Language laywer'd... going to post :)
Wait... catching myself... the question here was about the slope of consecs... not repetitions... I think this implies he's accepting this though (sigh, I'm glad I'm not a lawyer though)
Oh wait better... I'll just wait for that answer
Not sure what you had in mind, but I don't think the existing answer is valid. I've left a comment.
@Dennis that's the exact opposite of Anarchy Golf's rule, which is "your program must successfully complete all the test cases on the same run at least once"; that's lead to some creative loophole abuse in which people do things like encode a constant using the current time
it's interesting to see the differences between sites sometimes
one of my favourite Anarchy Golf questions ever had three test cases with identical inputs but different outputs
There's a post Perez made in answer to a comment that says "Random shuffling actually is a valid way to meet the criteria"... I'm pulling my hair out trying to interpret that though, because it suggests that Greg's solution is fine (and that my approach would be okay, which does a similar thing algorithmically)
@ais523 Yeah, PPCG answers are also expected to work for all valid inputs, not just a fixed set of test cases.
clearly you had to write a nondeterministic program, but you also had to give it enough of a chance that it'd work at least once
04:24
It's confusing because now I have no idea which criteria he was referring to
@Dennis I guess we're a little conflicted on that because we require answers to work on all valid inputs in theory, accepting answers that'd take far too long or require far too powerful a computer to do it in practice, but we define languages by the implementation
it'd seem to make more sense to define languages by the spec, if we can't check the correctness of a program by running it
Man, homework is hard!
Use the spec of the program interpreting or the compiled code?
no, the specification of the language itself; most interpreters state what language it is that they're meant to be interpreting
@ais523 Yeah, that's a bit odd. The problem is coming up with conditions under which the program must work. How long is it allowed to take? On which architecture? How much RAM can it use? How do you measure that? Etc.
04:28
I'm rather fond of Anarchy Golf's "must have actually been executed in practice at least once" rule
although it also has a timeout
If you run all code on the same server, that works.
for PPCG, I think it'd make more sense if you could run the system on any computer you had access to, but you must actually either execute the program yourself or find someone else to do so
one of the reasons that'd be good is that it'd encourage golfing language implementations to be more efficient
so that the crazy O(n!) programs that people come up with half the time could be optimized into something less ridiculously slow by the interpreter, making them legal
That just gives an advantage to people with access to better computers. Also, there's no way to verify that someone has actually done that.
The implementation is a spec in some ways
how much is blatant cheating a problem here? as in, people claiming things about their program that actually aren't true
04:31
Usually just accidents actually, when that happens
I guess there's the question of "how large a test case does it have to work for?", which isn't an issue if it has to work for all of them
although then we run into integer size problems
It's probably rare, but we had a few black sheep. People who hosted their implementation on a web server without access to a history, for example, who later modified their interpreter before writing an answer and claimed a low byte count.
Also, the reason we define languages by their implementation is to avoid the this doesn't actually work, but that's because <insert subjective interpretation of the language spec> scenarios that would arise otherwise. Even if you can't actually run the program, you can usually tell if it would work given enough time and memory. Specs are harder to interpret than code.
now I'm trying to figure out how to create an esolang to reverse that dynamic ;-)
it's hard, though, mostly because interpreters tend to be written in programming languages, and specs tend to be written in English, and one language is much more ambiguous than the other
it happens in interpreter-chain scenarios, though
like, the behaviour of the interpreter depends on the interpreter that's used to run the interpreter
and if you allowed arbitrary interpreter chains, you could figure out a way to encode a program in them
That sounds scary. :P
it's already become relevant with this answer:
12
A: Program template for printing *any* string

ais523brainfuck (Unreadable Brainfuck), 9 bytes ,+[-.,+]! Append the input to the end. There isn't a trailing newline, this time. Looking for languages which would accept input appended to the end of the program, brainfuck seemed like a distinct possibility; many brainfuck interpreters written in e...

04:42
@ais523 That sounds like MetaGolfScript: "MyLang + Ruby + Python + Perl + Python + Bash + Ruby + Hexagony + Python, 0 bytes"
the EOF behaviour of the Unreadable interpreter ends up determining how golfed the brainfuck program can be
actually, it's fairly simple to write a language with two self-interpreters and a third interpreter written in some other language, such that you could make the null program do anything
Hmm, if there's a PPCG Vol. 2, where's Vol. 1?
it would be useful for exploiting loopholes in programming contest questions but not much else
actually, it's fairly simple to write a language with two self-interpreters and a third interpreter written in some other language, such that you could make the null program do anything
@ETHproductions Vol 1 was those but with a few less images
@ais523 Or you could do it with two interpreters: encode program in Unary, recursively run the null program through the first interpreter that many times, and then run it in the other interpreter
04:49
IMO if Unary and/or Lenguage are the best way to solve a problem, you screwed up trying to define the problem
0
Q: Stuck making a Tetris solver in Minizinc

Henry ZhaoI'm trying to implement a Tetris solver in Minizinc, which is also known as the "packing" problem I suppose. I'm brand new to Minizinc and have barely any idea what I'm doing, but I'm currently stuck on a particular constraint in my code. I am trying to solve a 4x4 square by placing 4 "l" block...

I just clicked on the "This question is off-topic, try on SO" option and got taken to their tour page. Really confused me for a second :P
it took me a while to vote to close because I was considering a migration vote
it is a well-written question, just on the wrong SE
Which is pretty rare
04:54
however, I'm not sure if it should go to SO or Code Review
Not CR
and if the OP is sensible (and it seems like they are), they'll probably just repost it in the right place
CR is specifically only for working code
ah right, so SO then
Most general programming questions we get are like "hi guyz I rite dis code but it not wurk" <80 lines of unformatted code>
04:56
yes
I think most general programming questions SO gets are like that too :-P
Does it auto-post a comment when the question is closed?
No
It does auto post if you vote to close as a duplicate or a custom close reason, but once closed that comment is deleted
oh, hmm; I've edited autoposted comments before now to make them more meaningful
would they get deleted anyway?
math problem I just thought of: let's say that I had a cube and I wanted to make a 6-sided die out of it. Instead of drawing dots (like the pips on a normal die), I want to draw curves (in the form of closed loops that travel across/around the faces of the cube). The number of curve segments on a particular face is that face's value.
-1 no objective winning criterion
05:01
I think so. It's not a bad idea though, I've done the same thing
The trivial solution is to replace each pip with a circle, but by sharing curves between faces I can reduce the number of curves.
What's the fewest number of curves I need?
I'm pretty sure you can do it in one, unless there's a parity issue which would make you need two
Do the numbers need to be arranged in the same way as a genuine die?
@ETHproductions preferably
I feel like I can do it in one curve, but don't have a physical cube to draw on right now.
OK, here's how you do it; start with a small loop around one of the corners, that makes the faces {1,1,1,0,0,0}
then you can stretch the loop from one face onto an adjacent one to add 1 loop to both faces
it's pretty easy from there
05:05
@PhiNotPi Is it important that opposite faces add to 7?
@ais523 but we need a map of which faces are adjacent
@Calvin'sHobbies preferably (this is the same question ETH asked)
2, 4, and 6 are adjacent at your starting corner; 5, 3, and 1 are opposite those
my bad, didn't notice
Sorry for bad drawing
That would be the trivial way, I'm sure there are more interesting ways
05:13
that's not correct
3 and 4 aren't adjacent on the cube
so you can't curve from one to the other
Whoops, I'm stupid
I guess it's not so trivial
@PhiNotPi Can curves overlap
@Calvin'sHobbies I don't think they need to... two crossing curves can be cut/reconnected as to not cross.
it doesn't matter; any solution where they do, just reverse the direction of the curve at the crossover point, then you can separate the previously crossing parts
@PhiNotPi But that might make more curves
05:21
There's two ways to reconnect them, one of which won't.
I think I found a way.
ok as much as the new Dirk Gently show isn't really Dirk Gently
holy shit did they get time travel right
Like how?
0
Q: Help me untangle these wires!

Alex L.My wires are all tangled! Isn't it annoying when wires get all tangled up? Well, that just happened to me, so I'd like to to help me untangle them! For your convenience, I've disconnected them all from the device, but they're all still connected to the outlet. Your challenge is to figure out how...

@PhiNotPi Time travel is meant to be self-consistent. Anything else is wrong. Everything is meant to fit together like a cosmic puzzle.
I keep ending up with all numbers correct except 4, which has 3...
Oh, I know where I went wrong
05:32
^ messy and 5 and 6 are switched, but kinda works
Sorry for the mess of mine, it'll look better on a real cube
So I guess these are topologically equivalent to a sphere with a line around its middle. Topology is awesome
@PhiNotPi wat even is that?
37 mins ago, by PhiNotPi
math problem I just thought of: let's say that I had a cube and I wanted to make a 6-sided die out of it. Instead of drawing dots (like the pips on a normal die), I want to draw curves (in the form of closed loops that travel across/around the faces of the cube). The number of curve segments on a particular face is that face's value.
next level of challenge: no curve may exit from the same side it entered
so I'm breaking the single-curve rule... but made everything into nice circles:
Why am I so obsessed with homework!
You seem to be obsessed with PPCG from my perspective.
I genuinely loved Perez's problem but wish it had been in the sandbox a bit

« first day (2136 days earlier)      last day (3002 days later) »