Minecraft in JavaScript
posted to Share by lilpeen

This (on notblockedgames.cf) is illegal. You have to give an option to opt out of cookies.

Edit: Ok, your entire website is very dodgy. Why does it give an unstoppable alert when I try to use inspect element?
Also, nice job obfuscating your IP-grabbing code. Nope nope nope.

Export Files
posted to Ask by HarveyH

You can already do this:

  • Next to the Add file and Add folder buttons, there's a little menu button
  • Click that and click Download as zip

I hope you found this comment helpful
Upvote for vee freebucks!

Happy Pi Day!
posted to Share by Nayoar

@Kookiez
"british english" --> "correct english"
"american english" --> "english with mistakes"
(thanks for the updoot though)

Advent of Code Sponsorship
posted to Announcements by 21natzil

@Whippingdot

How does AoC work?

Each problem will have an input, which will be some text containing a list of numbers or words or other characters. The values will be different for every user. You will need to write a program to process these as the puzzle says, and output a single short answer.
Check out the 2019 questions if you want some examples!

Where do we solve the problems?

In a repl of course!

How does the website get our answers?

The answer will be a single number or word or string of characters. The website can easily check if it's correct, by processing the input itself.

How does it time how long it takes?

It just times how long from when the problem is released to when you submit a correct answer.

What does fork do?
posted to Ask

Hey,
Forking someone else's repl creates a copy of the repl in your account, which you can edit. Although this is very good if you want to, for example, improve someone else's code, you musn't fork someone else's repl and claim it as your own, and it's always good to put in the repl's description that it's a fork of someone else's.

Hope you found this comment helpful
Upvote for vee freebucks!

Weekly Challenge #17

@Codemonkey51 lmao you used recursion idot

Chat on the terminal
posted to Tutorials by jajoosam

Hey! Nice tutorial but a few issues:
Firstly, it doesn't work, in that messages you send aren't actually posted. Easy fix: replace

rl.question("» ", (answer) => {
    // "» " Gives a prompt for the user
    socket.emit("message", buffer);
    chat();
});

with

rl.question("» ", (answer) => {
    // "» " Gives a prompt for the user
    socket.emit("message", answer); // <-- There - replace buffer with answer!
    chat();
});

and it should work fine!

Also, if you want it to display who posted the message, change socket.emit("message", answer); to socket.emit("message", id+": "+answer);

Awesome tutorial though, I'm no good with JS so I would never have been able to create something like this without a tutorial!

Repl
My chatroom

Happy New Years from the Repl Talk Mods!
posted to Announcements by Dart

@CodingCactus ALWAYS VALIDATE BACKEND (but if possible, validate frontend too, that way a user can get a response quicker if they're not malicious and trying to bypass checks)

Happy Pi Day!
posted to Share by Nayoar

@BotProgrammer uh, I didn't get this info from an article. It's a very basic method and I'm sure there are hundreds if not thousands of articles on it.

Code Jam #10 RESULTS

pog. Challenges were being added every day to Eon, but now Crosis is oofed so Eon will no longer be running :(

Eon: A New Way to Code Competitively
posted to Share by Nayoar

@ZDev1 did you READ the thing that says READ BEFORE SUBMITTING? As NoNameByProgram says, the variable data already contains the input, as you would know if you had read the help that it says you should read.

Brute Force Password Cracker
posted to Share by CyanCoding

Hi! This is a cool project and I really like the use of colour. However, in places, there are major issues with the code: in under 10 minutes, I cut your 323 lines of code down to 259, with several lines becoming much shorter and easier.
The key to this is the string module:

import string

This module has several highly useful constants:

print(string.ascii_lowercase)
print(string.ascii_uppercase)
print(string.digits)
print(string.punctuation)
print(string.printable)
abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789
!"#$%&\'()*+,-./:;<=>[email protected][\\]^_`{|}~
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>[email protected][\\]^_`{|}~

I went through your code and replaced instances of "abcdefghijklmnopqrstuvwxyz" with string.ascii_lowercase for example.
The other thing I did was the section where you detect if certain groups of characters are in the password. You did

if "A" in password or "B" in password...

I changed this to

if any([char in password for char in string.acii_uppercase]):

The any function requires a list and if any of the items in the list are True, it returns True. The [char in password for char in string.acii_uppercase] creates a list: each item is True of False, depending on whether each character in string.ascii_uppercase is in the password. This means that if any of the upper case letters are in the password, our any() returns True. I did the same thing with the lowercase, digits and punctuation bits, the punctuation one being particularly satsisfying because previously you had individual if statements for each separate character.
Hope you found this comment useful, please upvote!
-minx

AI that will guess your age Beta
posted to Share by galaxyraider9

Nice, it got my age exactly right!
Can I suggest something to improve this? It would be cool if you added allowed the user to choose their input unit (for example, for weight, they could type either "170cm" or "68in"). Another nice thing would be to make gender input case-insensitive - small touches like this are what really push a program to the next level.
If you're not sure how to go about unit conversion - you might want to have a look at my API hehe

24/7
posted to Ask by StrawBester

@Patu

from flask import Flask
from threading import Thread

app=Flask("")

@app.route("/")
def index():
    return "<h1>Bot is running</h1>"

Thread(target=app.run,args=("0.0.0.0",8080)).start()
Introducing Replpedia
posted to Share by HackermonDev

lmao, https://repldex.com has existed for months and has more content and memes than this will ever have.

Password Vault! #WEEKLY
posted to Share by Nayoar

@Bookie0 hehehehehehe yes you should certainly put your passwords here absolutely 100%

Language/project recommendations
posted to Ask by Dart

Make an AI to moderate Repl Talk

24/7
posted to Ask by StrawBester

@VFDan @TheDrone7 has made a nice tutorial on it - on his profile page, select the posts tab and it's one of his most recent ones

BrainF - A Complete Guide
posted to Tutorials by Nayoar

@larryk thx for that correction, I'll fix it right away.
BrainF has exactly zero practical use - that's one of the reasons that I personally like it so much!

Noob here: How do I call a python script from another python script?
posted to Ask

No @gbafana25, it does work - you just need to create another file my_module.py (or whatever you want to call it) and do import my_module wherever you want to use it.

If you have my_function in my_module.py which is inside the folder my_folder, you can do

import my_folder.my_module
my_folder.my_module.my_function()

or you can do

from my_folder.my_module import my_function
my_function()

Hope you found this helpful!
Upvote for vee freebucks

Use a web site as a console for a code, without showing the code
posted to Ask by afsalazar

Hi afsalazar,
The easiest way to do what I think you mean is probably to use repl.run. To do this, enable explorer mode in your account (account > roles > explorer) and then whenever you use a python repl, a repl.run page will display instead of the normal terminal. You can then share the link to this page, and the repl.run automatically runs the code whenever anyone visits it, without showing people the actual code.

Upvote for vee freebucks

Discord Bot Competition
posted to Share by timmy_i_chen

@freddyamarsden you already can, the python tutorial linked on this page (i don't know about the js and ruby ones) includes a bit about creating a server

Where did Nathan go?
posted to Ask by BenOfWillis

@Water_Wizard ahhhhh you guys don't remember those glorious days when we used to get weekly emails from our lord Timmy from Repl.it

Eon: A New Way to Code Competitively
posted to Share by Nayoar

@SeamusDonahue I hope so too, and latest rumours say it will

Advent of Code Sponsorship
posted to Announcements by 21natzil

@Whippingdot no problemo :)

Advent of Code Sponsorship
posted to Announcements by 21natzil

@Whippingdot yes, it doesn't matter how you log in

Weekly Challenge #18

Will the inputs be case sensitive? If so, how should case be sorted? Should it be abAB or aAbB etc?

Local Time (Clock)
posted to Share by SharpCodeDev

The const h1 should be defined outside of the function. This will also make it insignificantly faster :)