Would you use a Replit API wrapper built in C/C++?
I have immense experience programming and I’d be willing to take on a project like this if the interest and user group exists.
I was thinking I could wrap the GraphQL, Auth, and DB APIs for example in simple concise, and easy-to-understand functions.
If I was to build this, I’d build it modularly so that you only import the exact things you need.
Possibly add bindings so you can use it from other languages (like Python, JavaScript, etc) if you’d like.
well I mean I have knowledge in the js ver, py ver, and would be able to help with this new one. The problem with new libs is there is a VERY specific and efficient way to effectively handle the data from replit
Also, there are a lot of concepts that could be used to make a C/C++ library work better (e.g. allowing programs to request only certain data) that wouldn’t be implemented in the JS version.
For example, a C library could allow something like this:
#include <replit/replit.h>
#include <stdio.h>
int main(int argc, char* argv[]) {
if(argv<2) {
fprintf(stderr, "Not enough arguments.");
exit(1);
}
struct replit_user *user;
user = replit_getUserByUsername(argv[1], REPLIT_USERINFO_USERNAME | REPLIT_USERINFO_ID);
if(!user) {
fprintf(stderr, "Replit API error: %s\n", replit_errdesc(replit_errno));
exit(1);
}
printf("%s has user id %d\n", user->username, user->id);
}
I think libreplit would be good because then people could just use gcc -lreplit to link a binary with the API library, and it’d be easy to remember. (Also, I think using GNU autotools and libtool would be good, so it’d be easier to compile things with the library and compile the library on various systems)
After thinking about it, I have made the initial channel #replit.h on YoungIRC (my IRC network). I plan to add other ways to join the conversation soon. Please use the chatroom for support, development, and other discussions related to Replit APIs and the library. You can find the source code here: YoungGit. Soon it’ll be mirrored to GitHub and other providers. I’ll expand with online documentation soon.