Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Meta

What would this community like to see in a Codidact API?

+1
−0

I've now posted on Codidact Meta How should a Codidact public API work?

I'll still be taking into account any discussion here if you have Code Golf specific thoughts, but for general API discussion please answer/comment there to get responses from all the communities.


I posted previously on Codidact Meta to ask Do we have a public API yet? The answer was that it is planned to make one at some point, but not necessarily soon.

So the purpose of this site-specific Meta post is to find out what requirements or preferences exist here on Code Golf Codidact that might affect decisions on how to design the Codidact API.

I have my own specific hopes for what an API would provide, but I'll post that as an answer. If you would use an API, please post an answer explaining what you would use it for and what features you'd like it to have.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+1
−0

I'd like to post king-of-the-hill contests that read code directly from answers

Essentials

This is the only feature I would need in order to start posting contests.

  • The answer content for each answer to a specified post
    This allows extracting the code block that constitutes a king-of-the-hill contest entrant programmatically, rather than needing to paste code into the controller each time there is a new entrant or an edit. This allows anyone to watch a tournament in their browser without needing to download or install anything, and without needing to wait for the contest host to update anything.

Nice-to-have optional extras

For me, these are not necessary in order for me to start posting contests, but I would be likely to use them if they existed.

  • The comments on a specified answer
    This allows the contest host to add comments to answers that then affect the behaviour of the controller. For example, adding a comment containing the word "disqualified" could cause the controller to exclude that answer from tournaments.
  • The edit history of a specified answer
    This would allow specifying a date in the controller, and running a tournament with the entrants as they were at that date. This could be interesting for contests where the entrants evolved over time and watching a tournament play out with the latest versions only tells half the story. It would also allow showing a chart of different entrants rising and falling over time, rather than just a final leaderboard.

Thoughts

My interest in using an API for hosting king-of-the-hill contests was initially in JavaScript contests viewable in a webpage by anyone. However, reading code from answers using an API would also save work for contests in other programming languages where the contest host runs tournaments on their own machine.

I'd like to experiment with using WebAssembly to allow entrants in any language that can be compiled to it, in order to run a language-agnostic contest. This would mean the benefit of anyone being able to run a tournament in their web browser would no longer only apply to JavaScript specific contests.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »