I'm pretty sure I'll need a Repl.it developer.
If you make your own .replit file and configure it correctly, it will override the predefined default.
I have never seen nor accessed the predefined file, I have no proof it even exists, but creating your own file does work. (If you're a moderator please explain if anything here is wrong, and comment with what needs to be modified)
This can be applied to practically any Repl, but I found out it doesn't work with every Repl, as it failed on HTML Repls, so how do Repl.it's HTML Repls work? Are there any other Repls that will fail?
The actual question
If I'm correct, what do the predefined .replit files look like?
Ideally, I could view the code that is used in every Repl, because I am interested in what they contain.
we know that repl handles html repls differently not just from those facts, but because loading time on html repls is much faster and doesn't have that loading / progress bar. i don't know precisely the differences between html repls and non-html repls.
you can find all repl types that are treated like non-html repls, or regular repls on their polygott repository. we know the environment of each repl of those different languages is the same. and by environment, i mean libraries (ex. libc), programming langauges (nodejs, python), binaries (ex.
/sbin/fdisk), and other stuff you would expect in a linux operating system. this is all pacakged up in a process container compliant with the OCI spec, (like a docker container). it does say 'base image', so i'm not sure exactly what kind of sugar they put on top, if any - would have to inspect a little bit more
and i doubt the difference in the existence and behaviors of a "predefined
.replit file" is dependent on how the operating is setup. so it's not like replit patches the
readdir syscall on the host machine or patches
ls to specifically exclude
.replit files, that would be absolutely ludicrous
and the only reference to
.replit in their public code is in the same repository that i linked, in the polygott-gitignore file. they are specifically ignoring a folder called
whether specifically this is stored in a file (unlikely) or whether the defaults can be accessed over an internal, beats me, so maybe someone else can shed some light over it
so if you actually open up one of the files in the repository i linked, you can see the defualt run command under the
so that directly answers your question XP
@StudentFires the ext4 filesystem stores files and folders exactly the same way with inodes (linux folers are files), and linux doesn't post that type of restrictions on files so i wouldn't see a reason why it wouldn't be totally valid.
but if you're asking about why it's there, maybe they plan to store extra replit-specific files in that folder in the future, and don't want that committed to version control, and don't want or can't (easily) update previous repls with the new
.gitignore file (if they add it down the road instead of now). tbh i don't think there is much rhyme or reason, other than for 'just in case' and 'why not' purposes
.replit files control what command repl.it uses to run code in languages that are run server-side. HTML repls don't actually execute any code when they are run, so
.replit files don't change anything. There are a few other languages that aren't run server-side (the new Basic, some esolangs, etc.), most of which don't have files at all (but if they did,
.replit wouldn't work).
It's hard to be sure, but I don't think the default run settings are determined with
.replit files. In languages without prybar, the default settings create a bash shell, while languages with prybar replace that with an interactive console for that language. If you add a
.replit file to a prybar language repl, it will revert back to a bash shell. As far as I know, there's no way to hide the shell using a
.replit file, so it's more likely that there's something more powerful somewhere else that's changing how the code is run.
Excluding that, the interactive shell can be replicated with a command like
prybar-<insert language here> -i --ps1=?? --ps2=?? <insert main file here>, where
ps1 is some unicode character combined with ANSI color codes and
ps2 depends on the language. I don't know if this is actually what happens, but it seems to do the same thing.
In languages without prybar, the bash shell shows the command being run, so while there may be no
.replit file, it's easy to make one that has the same behavior.
Just a little thing that I thought to add,,,,
Repl.it also has a little tool called run-project that makes program compilation far more uniform, determining the language type and what to compile / run for you. Also if you check all the hidden files on a repl, I’ve found a config file named
.upm, which leads me to believe that the .replit file’s language argument is basically just being passed to that probably. So maybe it’s more like they just
run-project everything and slap a partially configured
.upm file on it.
I am not a mod anymore but I can answer the question so I will.
It does work on an HTML repl because repl.it runs an HTML repl on your computer instead of their computer and your computer doesn't know what
.replit is so it doesn't work. And what do you mean by what is the predefined
.replit file look like?
@Highwayman I got kicked out of mod and to this today I don't want to know why I got kicked. but I think it is because they thought I "abused my powers."
So I created a post asking people if they wanted to help me on a project and another moderator locked the post because they said it didn't have anything to do with repl.it and then I unlocked the post and eventually, the moderator deleted the post and I got kicked.
@PDanielY That's why they have the
.replit files. To configure what the
RUN button does, for example, C++ needs to be compiled, so it is something along the lines of
run="clang++-7 -pthread -o main main.cpp; ./main", while the NodeJS looks something like