« first day (14 days earlier)      last day (620 days later) » 

05:10
weird I am also now getting a lot of broken pipe issues
05:20
oh god a heisenbug has appeared
05:35
@Mego Seems that thiis Broken Pipe error is a celery bug that is still open. people say to consider: github.com/closeio/tasktiger
yeah, not using celery leads to no problem at all
It looks like this has to do when celery runs the nodejs subprocess on another thread
it must not be able to connect to the pipe leading to the error
checking the logs it seems to be the case
re-creating another process doesn't seem to work either
not sure if we can have celery use 1 instance per thread
 
5 hours later…
Anonymous
11:04
@Downgoat I'll see if I can find a solution within Celery. If not, we can switch techs.
Anonymous
11:53
@Downgoat Would it be such a terrible thing to spin up a Node process for each Markdown rendering request, and then kill it at the end of request processing?
Anonymous
Oh yay we're already getting hit by would-be attackers
Anonymous
Jokes on them, there's nothing worth stealing
Anonymous
13:12
@Downgoat Better yet, why aren't we just using a Python renderer
16:25
@Mego yes. That would mean minimum of 200ms to render a string and wouldn’t scale well
@Mego doesn’t exist. you would have to rewrite syntax highlighter, katex, gfm markdown
Also would mean sacrificing client side previews.
Aha found solution
 
1 hour later…
17:37
:D it works
@Mego does celery automatically cache or do we need to set it up that way
and how does it cache?
Anonymous
@Downgoat It caches via redis
oh ok
is there a way to manually expire a cached call?
Anonymous
@Downgoat Why not use a Python LaTeX renderer and py-gfm? Syntax highlighting should still be able to be done client-side.
Anonymous
@Downgoat That could be done via AJAX
17:47
@Mego syntax highlighting client-side would be pretty big dependency as we'd have to link highlighting grammars for each language, parse DOM, etc.
but I fix rendering issue :D
Anonymous
What branch?
wait crap have some debugging garbage still in there
Anonymous
Also I don't see how simply moving Markdown rendering to pure-Python instead of an external call to a node process breaks everything
Anonymous
@Downgoat I don't see how that fixes it. Celery workers run in different processes, not multiple threads on the same process.
@Mego ¯\_(ツ)_/¯ seems to fix it for me
no errors on different threads
@Mego It's not impossible but it'll mean reinventing a lot of existing code and no live code preview
Anonymous
17:54
@Downgoat The Markdown rendering is serverside either way. How does it make a difference if it's node vs Python?
assuming we manage to get same things with python. we would either have to make sure we have a JS implementation that's exact same or we send a new rendering request to server every second to make a preview
Anonymous
If we use implementations of the same standard (e.g. GFM) for both, it should be fine
@Mego rendering output like syntax highlighting and math should be the same
Anonymous
So we use compatible libraries?
Anonymous
For every standard, there are 300 libraries implementing it, and at least 50 of them (in various languages) do it correnctly
18:15
@Mego yes but MathJax, highlightjs, prismjs, KaTeX, etc are all JS so somewhere you’ll be spawning proc if you use a binding
Anonymous
Or use a translated lib
Either way it seems to be working now so I’d rather not spend too much time fixing what’s not broken
18:46
@Downgoat I'd argue it makes sense to use a syntax highlighter that's much less buggy than Stack Exchange's is
especially for a competitive programming site, where people are often doing weird things with language syntax
the best syntax highlighter I've seen so far has been in the editor Kate, it's capable of coping with some very complex programs that many highlighters fail on; there are probably equally good ones though
Anonymous
Man, if JS wasn't the only choice for client-side scripting, this would be way easier
there's emscripten → asm.js
although that's much harder to get working
(as opposed to webassembly, which many older browsers don't support, asm.js should work pretty much anywhere because it's a subset of JS)
I can see an argument for sticking to Stack Exchange's markdown syntax, although it's not a very good dialect (it's very hard to escape special characters, its syntax highlighting syntax is very verbose, and some of its features interact badly with other features, e.g. >! is a nightmare to use for anything but plaintext)
 
1 hour later…
19:55
@ais523 exactly
@ais523 hopefully we are compatible with SE MD so we can easily translate posts.
been reading trough this, and I'd say that no automatic testing is one of the things that I like about PPCG. Some languages can be problematic - Processing, unless explicitly told to, after running code, will leave a window open (timing out and auto-scorers), and theoretical brute-force answers can't compete. I'd suggest that automatic testing should be optional, and if not enabled on the answer, it should allow people to vote that they've verified it working (or not working).
5
@dzaima I agree. And submission can be in many forms - functions, lambdas, programs, etc. Each can output by returning, exit code, or printing. This makes it problematic to perform automatic testing. And, with flexible I/O, it would be hard to be able to know what to supply to the program, and what format the output will be in.
20:13
@FlipTack in this message ais523 suggested that there could be a list of I/O methods (that the answer could choose from I guess), so that's not a big problem.
21:05
@dzaima I’ve been thinking about this but I’m not sure how we can have both lenient IO and auto verify it
We could allow challenge authors to write test scripts
 
3 hours later…
23:46
@Downgoat I think the trick is to have each language specify how it handles all common types of IO in advance
e.g. C might want arrays specified as a length followed by each element
then the challenge specifies what inputs there are and what types they have, ditto outputs
and the automated tester generates an appropriate wrapper for each language
@ais523 what about things like "challenge: calculate size of pool. output length, width, height in whatever order you want consistent order."
this would prevent cheating via choosing an input format per-program to make it easier
@Downgoat I'm not convinced that that sort of flexibility makes a golfing site better (in fact, it's influenced the behaviour of many PPCG-user-created golfing languages to be bad at reordering outputs)
hm ok
I guess we can see how it goes and we can change the validation system if it doesn't work out
likewise, for truthy/falsey questions, I think having a consistent wrapper per language that knows what true and false are in that language makes more sense than the workarounds we normally use
Also I'm not sure on how to do voting
23:49
that said, I can certainly see that someone might disagree with me on this!
you've said that it should be based on tags IIRC
I don't like having "one score to rule them all" on posts because some posts are really hard to compare
So would that be like Question Categories or like generic 'voting categories' e.g. "Funny", "Interesting"
this challenge is my go-to one for looking at quirks with SE's voting system
the Haskell and Unary answers (the top two) just aren't comparable at all
the Haskell answer is presumably voted that high because it's very clever, scores a good score for the type of language it is, and is well explained
the Unary answer could have been submitted by anyone who knows the language with a few seconds of thought, and scores well because the language's existence is amusing and particularly appropriate for the scoring scheme
so ideally they'd want votes in different categories
ok I see
so Unary could highly-voted in like "Funny" but Haskell would get points in a "Clever" category
23:52
yep
if we do points, would we want to weigh these categories differently?
my plan was just to total all the points in each category and give people a score for each (this would work if there were only a few)
that way, people can compete in whichever categories they think are most interesting
so would you be able to vote an answer in multiple categories or just one
I think just adding them all together, equally weighted, would work if you wanted the equivalent of an SE rep score, though
in Slashdot you can only pick one and that seems to work fairly well, I'm not sure about a golfing site
I can see some cases where you'd want to vote in multiple categories
maybe the amount of 'points' you get is the amount of unique people who have voted for your answer
would we want to allow anyone to vote or do like an SE-like system where you need X amount of inital points
23:55
X for Stack Exchange is two upvotes, on PPCG that's trivial for any serious user
last time I posted an answer (as a guest) I got 40 rep without even logging in
so it's basically just an anti-spam screen
I think the ideal CAPTCHA would be to require people to post a competitive answer (in a way that prevents just copying or copying/modifying existing answers), that's going to be very hard for most spammers
and that's basically what SE's rep limit for voting does
you need a question that scores 3 or an answer that scores 2 (or some combination) to be able to upvote
that should be trivial for any legitimate user

« first day (14 days earlier)      last day (620 days later) »