Elias Bomberger

@pyelias (1214)
What do you guys think about this syntax I came up with?
posted to Ask by eekboi

To me, it just looks like you've thrown together words related to the thing you're doing. I can't see any consistent structure or logic behind it.

As an example of some of the inconsistencies, your sample code contains:

</bin>
  is this or "Binary standard" the part that tells it to encode as binary?

</Output:/>
  where does the :/ come from?

</read Input>>>
  why 3 >s?

</display user input/>
  don't we already have Output and Say? (why are there 2?)
  and why is there a / at the end?
  is that just a comment? if so, it should look less similar to code

</web?URL/display ... 
  what does ? do?
  and why is there no closing > ?

"https://{input}.<"com", "net", "web", "org">"
  is this just an entirely different usage of <> ?

<Say, ("click me!") ...>
  why no / at the start?
  is this another different usage of <> ?

</action"click">
  as far as i can tell this is some kind of function
  but the Say function (is Say a function?) works completely differently

<action>
  missing the / again?

</Create"movements">
  why are these only sometimes capitalized?
  (that's not technically syntax, but still)

<"NORTH", "EAST", ...>
  is this the same as <"com", "net", "web", "org">?
  and why are they lowercase later?

</movement"...">

</movements>

</action>
  it didn't have / before
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])
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.

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

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

Tips and Tricks for Code Golfing in JavaScript
posted to Learn by MrEconomical

@Coder100 array.map(console.log) works too

Python Advanced Concepts Explanation
posted to Learn by pyelias

@Highwayman i have 2 posts with 400+ votes each, and my highest outside of those is only 36
i have no idea why this has so many

Python Advanced Concepts Explanation
posted to Learn by pyelias

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

[WARNING: ONE LINE POST] Code Golf: 99 Bottles (JS: 182 bytes)
posted to Share by Zavexeon

@Zavexeon also you can do b=a+(i>1?'s':'')+(c=' of beer') for 172

[WARNING: ONE LINE POST] Code Golf: 99 Bottles (JS: 182 bytes)
posted to Share by Zavexeon

you can take i-- out of the for loop and change i>1?i-1:'no more' to --i||'no more' for 176 chars

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>

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.

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
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).

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.

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

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.

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.

Empty lll
posted to Share by rediar

wasnt endgame number 3

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
JavaScript for loop isn't working
posted to Ask by ChezCoder

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

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)

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.

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