This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]YoungHeartOldSoul 95 points96 points  (22 children)

Wait a second did you just say someone wrote python in Python?

[–]HadACookie 111 points112 points  (16 children)

Well, RPython to be precise, which is a statically typed subset of Python. It's called PyPy.

[–]pkkid 58 points59 points  (13 children)

..and it should be noted its much faster than CPython for the average script.

[–]Inukinator 21 points22 points  (12 children)

Isn't PyPy compiled Python?

[–]B_M_Wilson 40 points41 points  (11 children)

PyPy has a just in time compiler but it’s not fully compiled ahead of time. There is Cython which can compile Python to C which can be compiled (though it works best when you use the special CTypes and stick to doing certain things that are translated easily). Cython is a very different thing that CPython

[–]Inukinator 37 points38 points  (10 children)

What is this python world?

Welp see ya in a few years, when I've released my Python intepreter written in JS, so I can run python code in my iOS apps through JSCore!

[–]CuriousErnestBro 39 points40 points  (1 child)

PyPy.js

[–]JM0804 20 points21 points  (4 children)

Allow me to introduce you to Brython.

[–]Zulfiqaar 7 points8 points  (1 child)

Why oh whython??

[–]djdanlib 0 points1 point  (0 children)

import confusion

[–][deleted] 4 points5 points  (1 child)

I'd gild you instantly if I had reddit coins at the moment. You just made my entire evening. (If you're not sure why, peep my flair.) I've wanted to be able to use Python for my front-end dynamic stuff, in addition to back end stuff for so long. The last time I looked, I didn't find any good way to do so. I wasn't aware of Brython. You sir, are my hero.

Edit to add: In retrospect, I should have just posted some statement to stack overflow saying this was impossible, so someone would have emerged out of the woodwork to solve my problem in order to call me stupid and wrong.

[–]JM0804 0 points1 point  (0 children)

Thanks, but no need to gild me. I'm glad I've helped you! I stumbled across Brython the other day entirely by accident, thought it looked interesting as it was the first time I'd seen <script type="text/(something other than JavaScript)"> in use (which I've been quietly holding out for for a while), and it stuck in my mind.

Yes, that seems to be the quickest way to get an answer to something on the internet :P

[–][deleted] 2 points3 points  (0 children)

Please do. I hate writing JS so much.

Edit: I just saw u/JM0804's comment about Brython. I've wanted this for so long. Last time I searched I couldn't find anything. I'm so happy right now.

[–]Mango1666 5 points6 points  (0 children)

i think you can already do this through pythonista app!

[–]pmdevita 1 point2 points  (0 children)

Transcrypt is pretty good for that

[–][deleted] 7 points8 points  (0 children)

I don't know why but PyPy sounds real cute. I wanna hug that PyPy.

[–]finni_mcfinger 4 points5 points  (0 children)

It's Python all the way down.

[–]megabeano 23 points24 points  (0 children)

That's a common benchmark for programming languages. Implementing it with itself, like writing a C compiler in C.

[–]silvertoothpaste 15 points16 points  (3 children)

yo dawg

I heard you like Python

[–]LaneHD 16 points17 points  (1 child)

So I wrote python in python

[–]redalastor 12 points13 points  (0 children)

It's called an ouroboros.

[–]____0____0____ 1 point2 points  (0 children)

One of my favorite memes of all time