« first day (3196 days earlier)      last day (1640 days later) » 

12:27 AM
Any final feedback on this? Thinking about posting today/tomorrow (cc @ngn)
 
 
2 hours later…
2:29 AM
Does Python have some sort of evil behavior where if it detects "python" in a subprocess command line, it uses its own process rather than resolving "python" according to the user's path settings?
Because the Python I have in my path is Python 2, but I'm getting Python3 when I do subprocess.Popen(["python", ...]) from a Python 3 program.
 
2:55 AM
Hmm, it seems to look first for anything in the same directory as the interpreter, not just the interpreter itself.
 
3:09 AM
I just added .lnk to %PATHEXT% on Windows. I wonder if anything exciting will happen.
 
 
3 hours later…
6:32 AM
0
Q: Stacks and Ques

user714290The 'deque' class from the 'collections' module is preferred to 'list' class for stack implementation. Why is the reason behind it? What is the time complexity for push and pop functions while using lists for stack implementation?

 
 
1 hour later…
7:34 AM
@feersum did you make a typo when you named your github "feresum"?
 
@flawr Nope
 
why
 
7:54 AM
-2
Q: Get a function to perform backspace when a keyboard input is provided a backspace button

Praneth PoojaryI am building a keylogger using python but want to make a function which performs backspace when use presses backspace button on this keyboard. Can someone help me with that part

 
 
3 hours later…
11:01 AM
If I want to add a bounty only for practical language answers (no golfing languages), is a description like "Shortest answer in bytes, in a practical language gets the bounty." enough? Or will it be a hard time deciding what is a practical language?
 
11:17 AM
What measure is a practical language? If it's intent, you'll have to accept APL and J.
 
@Night2 that is enough, people can ask you if they are not sure, because in the end you're the one selecting answers for the bounty
 
 
1 hour later…
12:31 PM
@JohnDvorak That is my issue too, it would be nice to avoid APL, J, etc... too if possible, they aren't golfing languages, but are quite similar in terms of super short syntax. But I'm not sure if there is any better classification other than "practical languages" for this.
 
@Night2 You could TIO's practical/recreational distinction.
@Night2 Why do you want to bounty answers in certain languages and not others?
 
@Adám That would still include "APL (Dyalog Unicode)" for example.
 
@Night2 Absolutely, and J and K. (K makes billions…) But why exactly would you want to exclude these?
 
@Adám Basically I want to avoid a super short syntax language get the bounty because it has that super short syntaxt (which is the case for most of golfing language but some others too)
One thing that I can to is to limit the languages to x top language tags from stackoverflow: stackoverflow.com/tags?tab=popular but that will probably leave many practical languages out.
 
@Night2 But an interlanguage code length comparison isn't fair, even if you exclude those. E.g. Java tends to be rather verbose.
 
12:38 PM
@Night2 Just say that you will give a bounty to the answer you find most impressive
 
@Adám So maybe my idea from start is wrong? Maybe just leave it to user votes?
 
You don’t have to justify yourself
 
@Fatalize But I want it to have an obvious (specified) and fair condition
 
@Night2 Do you have some kind of reason for making a bounty at all? E.g. I want to promote APL, so I bounty APL answers.
 
@Adám I want to promote my question which has not got any answers, but I'm not a fan of golf/short syntax languages.
 
12:39 PM
It can’t be fair if you include multiple languages
 
@Night2 I'd say just put a bounty for attention, and don't worry about the answers.
 
@Adám So, who gets the bounty then?
 
@Night2 Highest voted, I guess.
 
@Adám I think I will go with that then, the only issue would be late answers probably won't get much votes even if they are better.
12
Q: Can Jimmy escape the ghosts?

Night2It is Halloween and Jimmy (/o\) has gone into a mysterious neighborhood for trick-or-treating (ask himself why). Now some evil ghosts are chasing him. Can Jimmy escape the ghosts? Challenge: Input: A board showing position of Jimmy, ghosts, solid objects and empty spaces. An example 10x5 bo...

Hope 200 is enough to get some answers :P
 
@Night2 Actually, I don't think it is the bounty amount that matters, as much as the challenge appearing on the "Bountied" tab.
 
12:53 PM
I hope so. Thanks for your help and ideas guys 👍
 
1:29 PM
on the ball sprite part of the embarrassing mistakes blog post, having a bounding box is better if your coordinates are integers as it allows you both odd and even sized balls
 
 
1 hour later…
2:34 PM
why would a chess game ever end in a win under these conditions?
@feersum ^^
 
2:48 PM
@Anush The main reason it can end in a win is A player who makes 2000 consecutive unsuccessful move attempts shall forfeit the game.
 
@DJMcMayhem Oh I see. So really you are always just trying to find a valid move. But given that there are fewer than 2000 possible moves, it seems that all the competitors will be equal
 
Sure, IMO that makes it easier to get a checkmate. If I have you really close to checkmate, it doesn't have to be a perfect mate, it just has to be close enough that you can't find a valid move
 
@DJMcMayhem do you think there will be checkmates? It just seems unlikely from a probabilistic point of view
the proportion of chess positions that are checkmate are just very slow
and everything is being chosen blindly
 
I agree, it seems unlikely
 
maybe there are interesting variants, like the first person to lose a queen loses
 
2:53 PM
If I had written that challenge, I probably would have allowed capturing the king and moves that leave you in check
 
@DJMcMayhem that sounds good
 
Although IIRC feersum is using the python chess library, so that would take some tweaking
 
typo: the proportion of chess positions that are checkmate is just very low
and everything is being chosen blindly
on another topic.. is it now acceptable to pose code-golf questions where the code should run in TIO before it times out
I know this was frowned on at one point
but I feel I have seen more timed code-golf questions in the last few months
 
@Anush I think that's more acceptable than timed on TIO
Because with fastest-code, you need a lot of precision and reliability. Timed code-golf is still scored in bytes with just a restriction that it can't be incredibly slow
 
@DJMcMayhem given that acceptability is somewhat binary here.. I will take that as a yes :)
I would really like to encourage people to compete per language
rather than just seeing a Jelly answer and giving up
which means I will pose my numerical integration question
 
3:00 PM
@Anush does it need to succeed once or always? e.g. the time of this has varied from 4.8s to 7s even though it's doing the same exact thing every time
@Anush many challenges do say that competition is per-language and it's often said to specifically not be discouraged by answers in golflangs
 
@dzaima it's a good point but how do you test always?
 
@Anush i have no idea, you specify that ¯\_(ツ)_/¯
 
:)
what does that code do?
CPU share: 120.88 % Is it running in parallel?
 
@Anush Java probably doing GC or something idk
 
what is it computing?
I can't read the code
 
3:07 PM
@Anush generate a 1000 element array where each contains the numbers 2..(1+n) in the most horrible & inefficient way
 
:)
 
(1+⍳¨⍳1000 being the more proper way to do that, running in 0.3s. i just needed something that didn't use much memory and calling a full function many times kills dzaima/APL)
 
 
1 hour later…
4:33 PM
Random question: Would it be acceptable to edit an old question to remove rules that are no longer considered good rules by meta?
For example, there's a question that explicitly says "Languages invented after this challenge was posted are not allowed" but we've agreed to allow new languages. This question has been racking up flags for answers that break that rule, and most of those answers are entirely harmless so I don't want to delete them
Simply editing out that rule seems like a much nicer solution
 
I don't see why that'd be a problem. I vote go for it.
 
4:54 PM
Sounds fine to me
 
On a completely unrelated note, does anyone know a SEDE query that shows you how much rep you have from questions vs answers?
 
5:36 PM
0
A: Sandbox for Proposed Challenges

79037662Fermat's Last Theorem, mod n It is a well known fact that for all integers \$p>2\$, there exist no integers \$x, y, z>0\$ such that \$x^p+y^p=z^p\$. However, this statement is not true in general if we consider the integers modulo \$n\$. You will be given \$n\$ and \$p\$, which are two positive...

 
6:27 PM
would submitting a solution to this problem: codegolf.stackexchange.com/q/58522/71803 that uses regexes and passes all of the test cases in the question, but not much else, be frowned upon?
 
7:24 PM
@randomdude999 Optimizing for test cases is a standard loophole for code-challenge or fastest-code challenges. I'm not sure that it would apply to code-golf challenges, but I would think it should.
 
the scoring criteria seem to imply that detecting all the required test cases is good enough though... and besides, it's kinda very hard to do this completely accurately anyways, so where is the line between what must be recognized and what not?
 
Very true. I think that challenge should have been a code-challenge and not a code-golf anyway, but /shrug
 
 
2 hours later…
9:23 PM
0
Q: IndexError: list assignment index out of range

Lennis MarianaI want write a program about the progressive sustitution algorithm, i wrote line for line, but Python 3.7 give me this error all of time: IndexError: list assignment index out of range I don't achieve find where i'm bad, can you help me please? Quiero escribir un programa sobre el algori...

 
9:53 PM
Hey everyone! Merry Christmas today! :P
 
Because Oct 31 == Dec 25? :P
 
Exactly!
 
@NewMainPosts It's mildly amusing to me to see Spanish text and English code intermingled.
 
@El'endiaStarman That's right. The correct thing would have been to use an i18n library and stuff all of the text into an external file :D
 
I was very proud of myself being able to understand most of the text
 
10:29 PM
You should be! :)
 
10:46 PM
0
Q: A Nice, Simple Web Scraping Code Golf

VBAmazingIntroduction This is a web scraping Code Golf challenge that attempts to take stock Name and price columns from the 'Most Active' list on this New York Times URL. Why is this challenge interesting? Challenge: Scrape these figures from this NYT page and turn it into a pandas DataFrame using the...

 
11:06 PM
0
Q: How many little boxes fit inside a big box

Fred JohnsonRules: I have a random number of boxes... n (3 dimensions) Each box has a random sizing (integer), but that sizing is constant on start up. It may be rectangular or a cube. Challenge: Work out how many different combinations fit. You can have an unlimited number of reuses of the same box.

 
11:44 PM
@Anush You can checkmate the other player.
@DJMcMayhem I decided how I wanted it to work before decided to use python-chess in the implementation. The rules would anyway be much easier to implement if check was ignored.
 
Tetris GoL just hit 1000 upvotes :D
4
 

« first day (3196 days earlier)      last day (1640 days later) »