Will Carey

@SPQR (480) • Academies of Loudoun
Hi, I like code, ESPECIALLY C++. . I know Polygott, and I use it to port things. Currently pursuing a degree in Computer Science.
I have complied the following script & I am unable 2 understand the error to resolve it
posted to Ask by Aravind

When writing your main function (or any function for that matter) you have to initialize it as a type (i.e. int, char, bool). For main I think it has to be an int. What's happening here is, your compiler is interpreting main as a function of type emp, because without a type declaration before main it assumes the
type directly precedes it, which in this case is struct emp.

Essentially what you have is struct emp main which is simultaneously creating an emp struct and creating the main function which returns an object of type emp (which for any other function would be entirely valid BUT main has to be an int.)

1300's Peasant Simulator
posted to Share by RomeroSchwarz

10 ways to lose and 1 way to win, and winning is just not losing for 50 days. I love it!

so this is basically reddit...
posted to Ask by SansUnd3rtale

It's like reddit but less toxic and cringe, and more intelligent and programming

Artificial Intelligence Competition
posted to Share by lydiahallie

Fellas, fellas. Real talk. Let us start a pay-it-forward type thing by commenting ideas for an AI to help each other out. I'll go first :)
-Text prediction
-Maze navigation (like a lab rat sort of thing) (this is probably what I'll aim for)
-some sort of AI-based opponent for a game (i.e. pong) that learns from a particular player's playstyle

I hope at least one of these helps someone. Now, all we need is an AI that comes up with ideas for AI concepts (hey, that's not such a bad idea...)

Improved Dungeon Generation
posted to Ask by TaylorLiang

Try looking into procedural generation (especially maze generation algorithms.) Hate to self plug but I have a Dungeon Crawler project which utilizes procedural generation to create mazes with rooms scattered throughout. https://repl.it/@SPQR/Dungeon-Crawler-11
Take a look at the files level.h and level/level.cpp. I used this website to come up with that code, I'd advise taking a look :)

What kinds of keyboard shortcuts would you use on Repl.it?

Perhaps the ability to bind your own shortcuts? For example, say I wanted to easily switch between a couple files in my project, it would be nice if I could bind keyboard shortcuts to said files (say, alt+1 for the first file, alt+2 for the second, etc.)

What do you call people who use Repl.it?
posted to Ask by Four_Of_Clubs

i think that replers or replists or replators or replologists or reploids or replees are all good options. However my personal favorite is


Repl Talk Rules and Guidelines [README]
posted to Announcements by mat1

We have rules, now all we need is a ruler....

Game Jam FAQ
posted to Share by katyadee

We can come up with an idea and concepts and such before the challenge starts, right? Or does EVERYTHING have to be done within one month, not just the code itself?

What is the language you recommend the most? Why do you recommend it??
posted to Ask by enigma_dev

Depends on what you want to do with it. If you're looking for anything web related, I'd recommend JavaScript (and perhaps HTML and CSS), because it's by far the most common and useful language for that purpose. If you're looking to make anything desktop-based, I'd recommend C++, especially if you want to run it on your Raspberry Pi, because C++ is extremely optimized for performance and has a lot of low-level hardware access. However I won't lie to you, C++ is a bit tricky to learn, and a significant step up from python, so only get into that if you think you're up for it. To be fair, though, C++ is the only language I'm currently familiar with, so I'm a bit biased.

The Best Way To Code (Joke)
posted to Share by Edgod
this.willToLive = ~WillToLive()
Clickable terminal
posted to Ask by ash15khng

@Zavexeon I looked into it a bit and it seems that the terminal can sometimes detect mouse clicks but it doesn't seem to be able to get the mouse position on Linux, which is what repl.it runs on. So, clickable buttons on the terminal aren't really an option. @ash15khng If you really want buttons, though, you can have buttons which can be selected using the keyboard, like with arrow keys (don't use the arrow keys) or something of that nature.

please mark this response as the answer if I answered your question :)

What's your favorite thing about Repl.it? What about your least favorite?
posted to Ask by katyadee

Favorite thing(s):

  • Portability (the fact that i can access it from anywhere, even my chromebook)
  • ease of collaboration (multiplayer) and sharing
  • The community :) (just wanna mention that i'm under "more top contributors" in all time, past 7 days, and past 30 days, and i'm pretty darn proud of that)

Least favorite things:

  • Lack of configurability (you have to use polygott to do anything advanced)


I was thinking today that it would be nice if there was like a quick access for files (like where it says the filename at the top of the editor in the IDE there could be a couple tabs with different files you're currently working on, would be nice when working on large and/or complex projects), or even viewing more than one file at once, like side by side or something

I guess that could be dumbed down to more maneuverability with the editor window but you get the idea (i hope)

Game made for a class: D-2200
posted to Share by Corwin_Strahan

I wish my school's computer science class taught C++, it teaches Java which is OK but I am a die hard C++ fan so i never really got into it

Which Class Should I Take to Learn About Game Programming?
posted to Ask by MichelleA8

In terms of whether to learn an engine or raw C++, it really depends on whether you want to be programming in UE4 specifically or just C++ in general. While this may seem like an easy answer at first, one must also consider that UE4 is the primary mainstream game engine which uses C++, so assuming you would be using C++, Unreal is regardless the most likely game engine you would be using. Ultimately I can't give you advice on what you SHOULD pick, but hopefully this comment somewhat puts it in perspective and makes the choice easier for you. :)

EDIT: You could also think of it this way-- Do you want to make games or game engines? I believe a YouTube channel called TheChernoProject has a video on precisely that.

C++ Keyboard InputManager v1.0.0
posted to Share by CowNationz

Yeahhhh code readability isn't exactly my strong suit :P
side note: this isn't non-blocking (i know you never claimed it was but still)
Anyways good job, it's cool to see people make improvements on things i've made :)

What is polygott?
posted to Ask by Vandesm14

Polygott, to my understanding, is essentially a way of making makefiles and such on repl.it and to have multiple different languages running in conjunction. I'm sure there's more to it than that, though.

I want to use clear screen function in my c++ code on repl
posted to Ask by RishuMishra

@RishuMishra https://en.wikipedia.org/wiki/ANSI_escape_code
Outputting certain codes to some terminals (including the one repl.it uses) can do specific things to the terminal depending on the code.
The \033[2J clears the screen and resets the cursor and the \033[0;0H moves the cursor to 0,0 (again)
You can change the 0;0 to Y;X to move the cursor to line Y and column X thus allowing you to overwrite only certain portions of your screen. Handy for games and such.

Guide to Asking Coding Questions
posted to Ask by Mosrod

Do you think you could add "include programming language in title" or something of that nature? It'd make it a lot easier for one to tell if one can help or not. :)

What should we code?
posted to Ask by katyadee

@Wetyuip I've got a project going in C++ and SFML that i think shows a bit of promise, want to take a look at it?

First Person view [FPS Engine] in the console (C++)
posted to Share by SPQR

@mamamia5x perhaps..
The original doom is written in C soooo....

What advice would you give to someone new to coding?
posted to Ask by katyadee

What advice would you give to a newbie?

I'd say not to stress too much about choosing a first language. The skill set required to do coding is pretty easily transferable between modern languages. It's really just best to find a teaching resource that works for you and roll with it :)

And what advice do you wish someone had given you?

I really wish that someone had told me what @eankeen just told you -- Not to be afraid of trying new things. A few months ago I was really avoiding using the <vector> library (C++) after finding the documentation on it quite confusing at first glance. I was hell-bent on using plain arrays until i finally realized that if I wanted a dynamic array I needed a vector. Upon actually really using vectors, I discovered that it's a lot simpler once you get into it, as most coding-related things tend to be.

What advice would you give me, personally?

I don't know that I have advice for you specifically. I do, however, wish you the best of luck in your endeavors as the repl.it community person and as a programmer in general. :)

Phony and Makefile.
posted to Ask by IzanLarumbe

@a5rocks @IzanLarumbe yep. You've installed firefox but you have to run it to see any output. You can just add the firefox on the line below and you should be set.

Phony and Makefile.
posted to Ask by IzanLarumbe

You can run pretty much anything that runs on Ubuntu using the makefile. Just use install-pkg instead of sudo apt-get install. It uses Bash syntax btw.

Minecraft on Replit
posted to Share by SPQR

@amasad Well, the main issue i noticed is a discrepancy with controls. I noticed that the issue I'm experiencing somewhat reminds me of an issue I would see if using a touchscreen. No matter how I move the mouse, the game seems to interpret it as moving towards the bottom right corner of the screen. The only cause for that that I could think of would be that the frontend sends mouse position to X incorrectly, i.e. instead of X seeing that the mouse moved in a certain direction, it only sees that the mouse sort of teleported somewhere that i would assume is down and to the right of the crosshair. Also, The keyboard input is working very strangely in that Minecraft only seems to recognize about 1 of every 10 key presses (For comparison, when I ran DOOM, it recognized pretty much all of them.) I also noticed that X (or at least Minecraft) seems to think that Right Alt is being constantly held down (i noticed this when i tried to rebind one of the controls to the L key and it instead bound to Right Alt.) Other than that, there's really just the QOL improvements of easier interaction with the clipboard in the X window, and/or somehow getting the SHIFT key to work (I can't type caps or symbols, hence why i need copy and paste)

I dont want to seem like i'm ragging on replit though, because frankly, I didn't even expect this to work at all, so just being able to get it to run is pretty awesome. :)

Minecraft on Replit
posted to Share by SPQR

@Zavexeon LMAO im putting that in my bio

What language?
posted to Ask by mkhoi

C++ because of its sheer speed

Creating header files for a C++ class
posted to Ask by kmcrae

Could you link the repl? That way we'll be able to see exactly what's wrong :)

Python Resources
posted to Share by themaka

Could we expand this list to include other languages as well? There's a lot more languages out there than Python, after all. :)