Ask coding questions

← Back to all posts
C/C++ Developers for ReplAPI.it
h
RayhanADev

Hey there Replit! You may have heard of ReplAPI.it or the ReplAPI.it Project in whispers across ReplTalk. Recently I've been looking for more contributors and maintainers for the project, and with a few others started transpiling the biggest Replit API package to other languages. Right now we're working on:

  • Python
  • Typescript
  • Java

and I'm interested in getting a C/C++ package up as well! I'm not familiar at all with the language and I don't want to overwhelm anyone on the team so I'm looking to ReplTalk for anyone who is interested in helping out! If you're interested in helping make sure you meet the following requirements:

  • Advanced Experience in C (or C++)
  • Has time to work on transpilation and maintaining the package
  • Willing to work with a team

Also if you have any noteworthy projects that use C/C++ for fetching that would be ✨ awesome ✨. I'll evaluate anyone who comments below and get back to you with the team's Top 2 picks. Thank's for reading and be sure to share this out with anyone who would ❤️ you for sharing!

Also, if you have experience in the above except for C/C++ but are proficient in another language feel free to let me know as well and I'm remember you when drafting up Phase 2 :D

Team Pings:
@BD103 @EpicGamer007 @JBYT27 @Coder100

Voters
programmeruser
BD103
kadirselcuk
DynamicSquid
AmazingMech2418
EpicGamer007
RayhanADev
Comments
hotnewtop
AmazingMech2418

Going to ping a few people who I know from working on Rex know a few things about C/C++... @DynamicSquid @HahaYes Any chance you want to help out with this?

DynamicSquid

@AmazingMech2418, @RayhanADev

I'm good with C++, and some C, but I don't know JS :(

However this sounds really interesting, and I really want to help! So you want to create a C++ API that can access parts of Replit?

I could definitely help, maybe not as an official maintainer, but I could contribute to the repo a bit and potentially work with issues and PRs if needed.

Also, how "official" is this? Does the Replit team know about this? Cause this seems like a really goooooood feature for Replit :)

RayhanADev

@DynamicSquid heya! I can add you as an outside contributor so you can pop in when you want. We don't really have anyone working on this yet :(.

It's kinda a transpilation of the JS ReplAPI.it but some minor differences here and there because of the changes in the languages.

It certainly not official and never will be. The Replit team "likes" people using the API but will never endorse it.

If this sounds like I typed it up really fast, it's cause I'm supposed to be cramming. More info later this week.

AmazingMech2418

@RayhanADev Well, if we get the documentation complete for everything, Node.js experience might not be needed to be a dev for any of the non-JS languages.

RayhanADev
AmazingMech2418

@RayhanADev By the way, I'm doing a test with it and it seems like we need to use libcurl for it, so tests will probably have to build that from source.

DynamicSquid

@RayhanADev Cool! Is there a way to communicate? Like Discord?

RayhanADev

@DynamicSquid We have a team discussion, but I'm considering making a server.

AmazingMech2418

@RayhanADev Server wouldn't work. I don't have Discord.

ANDREWVOSS

I'm probably not good enough with C++ to contribute :(, but I'll totally make something with ReplaAPI.it if a C++ lib for it is released.

RayhanADev

@ANDREWVOSS awesome! We also have other packages/modules/libs we're working on (idk if you can see the board lmk lol) but if anything else suits your fancy go ahead and ask a maintainer :D.

realTronsi

I have some extensive C and NodeJS background, but how exactly are you planning to port a node package to C/C++?

RayhanADev

@realTronsi heya! i know you, hmm but from where...

anyways it's transpiliation converting all the code written in NodeJS to C++ code. Just rewriting the whole thing from top to bottom while preserving the structure and usage so it should feel similar using it in either lang (plus or minus language differences).

You I definitely know would make a great addition to the team, if you're interested I'll talk about it with the rest :D.

realTronsi

@RayhanADev

i know you, hmm but from where...

That part's a joke right? I can't tell

Anyways, I need to see what I'm working with first. C can't directly interact with the web as easily as javascript can, and it will probably require some libraries I'm not familiar with.

EpicGamer007

@realTronsi at the bare minimum, you need a json parser and stringifier library and some http library to send requests.

RayhanADev

@realTronsi

That part's a joke right? I can't tell

yes, it's a joke lol xD

and yeah what @EpicGamer007 said at bare minimum to make the graphql queries you'd need json parser and stringifier and a http requests library.

realTronsi

@RayhanADev are you just using get requests?

RayhanADev

@realTronsi for the restful api bits yes, for graphql it's POST requests

realTronsi

@RayhanADev hmm alright, invite me in and I'll just try making it grab a user's cycles or something first as a poc

RayhanADev

@realTronsi I'll talk it over with the team just b4, but if you can do a poc that would be awesome :D

realTronsi

@RayhanADev Oh, I'll need some help with the poc though since I don't know any of the necessary headers and where to find everything in the response.

RayhanADev

@realTronsi gotcha, invite me to a rel

braveman9080

[ redacted by moderators for advertising ]

EpicCodeWizard

@RayhanADev I made this, a fast user info API, just make a GET request to https://replit-user-info-api.epiccodewizard.repl.co/@USERNAME. It will return a lotta info in a short time. Add ?count=true for the number of posts, comments, and repls.

xxpertHacker

(Came because of the "C++" in the post)

Are you trying to do a full rewrite into every language? That's an awful idea and will make maintainability of the ReplitAPI as a whole terrible!

Not to mention how the implementations across languages will quickly fall out of sync with each other...

I'd suggest setting up an API similar to how Discord sets up their API, it's all done through HTTP, users only implement wrappers that make HTTP connections/requests to their server.

RayhanADev

@xxpertHacker that actually is an idea I've been thinking about, but then it'd end up being a wrapper than fetches the custom api that fetches the graphql. Not very efficient although I do see how it would be easier for everyone. And having as native as possible implementations in most (it's not going to be every language) is better for maintainers once the main setup is created because the API functions are more-or-less the same, the only change being the Request body.

I'll definitely take this in mind for some other languages though...

CSharpIsGud

@RayhanADev efficiency doesn't matter too much for a reply API, noone is going to really be using it in a place where performance is critical

RayhanADev

@CSharpIsGud hmm true but I'm still adverse to the idea to the idea of waiting on two promises/two fetches...

CSharpIsGud

@RayhanADev They aren't that slow and creating the same thing in a ton of different languages is just pointless when a simple wrapper can be done instead.
A few milliseconds is not worth maintaining many versions of the same thing

Not sure why the login part of original package has a whitelist either, since its open source and can easily be removed by anyone that didn't want it.

CSharpIsGud

@RayhanADev If you still would rather maintain many many packages for no reason you can invite me to the C repl

I found it and read the current code and I can say that my eyes didn't like it I needed a cleanse.

RayhanADev

@CSharpIsGud
1. I'll run it over with the team :). We'd probably love to have you.
2. When I get ReplAPI.it for NodeJS up and running (again) I think I'll work on that Discord-like API for simplicity sake.

FlaminHotValdez

Wrong ping, it's JBloves27 now.

Also:

Me: sees word c++
Me: Yay!
Me: Sees word advanced
Me: cries

RayhanADev

@FlaminHotValdez XD yeah we kinda want people who are intermediate to advanced so we can speed through this. Do you know how to do fetching with C/C++?

FlaminHotValdez

@RayhanADev nope only the basics, I'm a competitive programmer so I don't know fancy stuff like that

RayhanADev

@FlaminHotValdez ah gotcha, that's cool :D

ch1ck3n

I would like to join but i don't know c langs :(

RayhanADev

@ch1ck3n dude you were the first person that I asked to join xD. The offer still stands, care to help me out on the NodeJS package?

ch1ck3n

@RayhanADev i humbly accept your offer

ch1ck3n

@RayhanADev https://e-dashboarde.ch1ck3n.repl.co/

im good at css

as shown in that repl

RayhanADev

@ch1ck3n make css replapi.it module

Awesome! To get you started with the NodeJS package the typical way I've invited people to the organization for NodeJS is by having them submit a PR with a minor fix or improvement to ReplAPI.it-NodeJS. Maybe pitch an improvement in an issue and work on it :D/

ch1ck3n
RayhanADev

@ch1ck3n whys :>?

ch1ck3n

@RayhanADev you said you were working on the python package

can I join?
😊
👉👈

RayhanADev

@ch1ck3n ah for python ask @BD103 he leading the project but I'm not sure if he's looking for more people but give it a shot :D

BD103

I'm still laying down the framework for the package, but you may soon! @ch1ck3n