Elias Bomberger
hacker

@pyelias (1046)
My projects ip adress can’t be found
posted to Ask by Zexogon

The whole repl.run domain seems to have disappeared. It's still accessible by ip though (see here). Websites under the repl.co domain seem unaffected.

Code Golf - Rock Paper Scissors
posted to Share by mwilki7

28 bytes (Ruby)

https://repl.it/@pyelias/KindlyFabulousMolecule

x,y=gets.bytes;p"DWWLL"[y-x]

40 bytes (Python 3)

lmao gotem mat
https://repl.it/@pyelias/PunyScornfulSystemsoftware

x,y=input().encode();print("DWWLL"[y-x])
Know your age using Python codes in This new year(2020)
posted to Share by pollockplk

unless you were born after january 13th

repl mail: Email for repl.it
posted to Share by MrEconomical

sending passwords to a private repl is maybe a little suspicious but ok

Is there any way to run this "one-liner" inside a while loop, in one line
posted to Ask by rafrafraf

You could move the print(...) if ... else print(...) into a lambda, then call it on input(...) to remove the semicolon. Removing the with statement is harder, but you can do it with this monstrosity I just wrote up:

type(lambda: 1)(type((lambda: 1).__code__)(1, 0, 1, 6, 67, b'y\n|\x00\x83\x00\x01\x00W\x00n\x0c\x01\x00\x01\x00\x01\x00Y\x00n\x02X\x00d\x00S\x00', (None,), (), ("cb",), "", "", 0, b"\xff\xff"),{})(lambda: "replace this part with your code")

EDIT: or this one, which doesn't rely on CPython's implementation details:

(lambda cb, asyncio=__import__("asyncio"): asyncio.get_event_loop().run_until_complete(asyncio.gather(asyncio.coroutine(lambda: (cb(), (e for e in []))[1])(), return_exceptions=True)))(lambda: "replace this")

Or this:

(lambda cb: __import__("concurrent.futures").futures.ThreadPoolExecutor(1).submit(cb).exception())(lambda: "replace this")

Once you've done that, you can just wrap the whole thing in a while loop.

Iterables: A Crazy, Crazy World
posted to Learn by a5rocks

nice, these are definitely an interesting feature
<pedantry>technically you're describing generators here, which are just one type of iterable</pedantry>

A super simple chatroom that is fast and secure
posted to Share by Vandesm14

Your sanitize function doesn't work when given a string like <script 
>. You could fix this by just replacing all angle brackets with &lt; &gt; (I think, that might have problems too).

Prevent screen flickering/paint over screen
posted to Ask by TaylorLiang

Screen flickering happens when your program output gets split up and doesn't all arrive in your browser at the same time. To force it to be sent all at once, you can use code like this.

Proof that .99 repeating = 1?
posted to Ask by timmy_i_chen
.999999..
= 0.9 + 0.09 + 0.009 + ...
= 0.9 * (1 + 0.1 + 0.01 + 0.001 + ...)
= 0.9 * 1 / (1 - 0.1)
= 0.9 * 1 / 0.9
= 1
Empty lll
posted to Share by rediar

wasnt endgame number 3

Python 3
posted to Ask by ericyangeric

The plain "Python" option in the language list is Python 3. Python with Turtle is implemented in a separate project from repl.it, and Python 3 has not yet been added there.

Python Advanced Concepts Explanation
posted to Learn by pyelias

@CoolqB I just finished a rudimentary explanation of bytecode, and I'll be adding more to it when I can.

Python Advanced Concepts Explanation
posted to Learn by pyelias

@CoolqB Yeah, I might add some of that stuff in here when I have time.

JavaScript for loop isn't working
posted to Ask by ChezCoder

i === text.length -> i < text.length
textAdd = null -> textAdd = ''

Will paid plans ever include constant uptime for our REPLs?
posted to Ask by 426729

Servers shut down if 30 minutes pass without them being pinged, so you can work around this with a website like Uptime Robot that will ping your website periodically.

/t not working
posted to Ask by Mowatdynes

\t, not /t

Weird syntax error
posted to Ask by 20rduncan

else shouldn't be followed by a condition (like (age < 21)). Just use else { ... }

Language “sight range”?
posted to Ask by Highwayman

Can you know something's address?

In Python, you will almost never have to deal with memory addresses, but if you need to you can use the ctypes module to get an address (it can also do a few other things that C++ can).

Can you know their type?

Variables are dynamically typed, but you can get the type of an object with the type(obj) function.
For example, type(1) == int.

Can you know their size?

Again, you won't need to, but if you want to know, sys.getsizeof(obj) will find the size of an object (not counting things like elements of an array, see here)

And finally how does type casting work in Python.

Python doesn't have type casting in the same way C++ does. int(obj) just passes obj to int's constructor, which is able to convert types (it can also do user-defined conversions if obj has a __int__ method)

takin' a crack at cryptography
posted to Share by Rivase17

A few comments about code style:

  • function and variable names should be snake_case, not camelCase
  • no space after print in print ("stuff")

Code structure:

  • instead of having security, generatePassphrase, etc. print results, return them so you can store the results in a variable and re-use them later.
  • you don't need a reverse function, you can just use "abc"[::-1]

Other things:

  • Caesar cipher, not cesar cipher
  • Your passphrase generator should probably use cryptographically secure random numbers. Look into the secrets module
PyNet! Back from the dead!!
posted to Share by TimothyAnderso1

A few bugs:

  • there can only be one net app at a time
  • encryption needs more spaghet (or actual cryptography probably)
  • the nn key is never used
Text to spech python, Help
posted to Ask by EricBromstead

repl.it runs Linux, not Windows, so Windows modules like win32com don't work. Also, repl.it does not currently support playing sound, so if you want to run this code, you'll have to do it on your own computer.

Monopoly game
posted to Ask by juliomorenotos

When you import main, that re-runs the main.py file, including all your game code. To fix this, you could pass the things you need as arguments, or move card_chooser into main.py.

How are the comments sorted in profile
posted to Ask by spybrave

They appear to be sorted by votes.

The Quest into Abquoria
posted to Share by JohnnyWobble

You might want to salt your hash or something, it's still not very hard to break.

Need help correcting an error * urgent*
posted to Ask by NanaOhene_Nyark

On repl.it your class has to be named Main. (you could also move it to another file named Lab03.java)

problem with TESTOS 2
posted to Ask by Ryanand

Opening a .sh file is not the same as running its contents. If you want to run the files, use os.system like you did in main.py.

Not a coding question (for once)
posted to Ask by FARHEENPALAGIRI

I think what happens here is that once you think of a solution, you just use it without consider other possible approaches. Planning is always helpful. (and if your code is too complicated, you're probably doing something wrong)
Even most large projects I've worked on usually have simple code, just a lot of it.