Live data from Hacker News

Pyjion – A Python JIT Compiler

trypyjion.com

121–126 of 126 posts

Re: Pyjion – A Python JIT Compiler

#121

Earlier quoted context omitted.

Sorry, but "names aren't unique" does not even begin to define uniqueness - "from ... import X" imports and X; great; should it replace an "X" in a different encoding in the local namespace, or not? I can tell you it has to do with iterators, and maybe someone will comment on what that is.

I mean... I had not even yet heard the talk that others have pointed you to (from Armin Ronacher); after having gone several times down the rabbit hole of looking at what the interpreter is doing in specific scenarios (and I like lots of things, at the language level, that python does, the terseness and expresiveness that it brings) I also think that python is a very complex language under a soft-looking skin.

I follow Python since 1.6, and occasionally use it for portable scripting when on UNIX platforms (PowerShell on Win), and many aren't really aware that Python is Ada/C++ level of complexity, even if on the first contact seems like the new BASIC.

Besides the nuances of how everything is executed, there are occasionally breaking changes between minor language revisions.

You cannot just pick up a random Python script and be sure it still behaves the same way across all minor revisions.

Re: Pyjion – A Python JIT Compiler

#122
post #63

Earlier quoted context omitted.

That's exactly what PyPy does do. You get a specialized version of the interpreter which is specialized to the particular program.

No you don't get that. A tracing JIT is not capable of producing an executable like that under normal circumstances. If a certain path is not taken during execution it might not be compiled at all. The point of the first futurama projection is that you get a fully runnable executable that is semantically equivalent to running the original program in the interpreter. A JIT only produces what it sees during execution.…

An pure executable no, but a JIT cache certainly.

Used across Java implementations, and modern Android.

Re: Pyjion – A Python JIT Compiler

#123

Earlier quoted context omitted.

> What more do you want? Something formal, so I can actually reason about it and test it. These documents are just informal prose. Are they sound? I don't know. Do you? Does anyone? Does my implementation match what they say? Who knows. Does CPython even match it? Does anyone know?

Out of curiosity, how many languages would meet those criteria? Only one I can think of off the top of my head is CompCert's C dialect. Are there others?

Standard ML certainly has clear specifications and proofs of soundness of the type system.

Re: Pyjion – A Python JIT Compiler

#124

Earlier quoted context omitted.

By names aren't unique, I mean with respect to "encoding", everything is the same. It seems like you're using "encoding" to mean something it doesn't? Do you just mean like "value"? > I can tell you it has to do with iterators, and maybe someone will comment on what that is. This sounds like you don't know what it is.

> By names aren't unique, I mean with respect to "encoding", everything is the same. It seems like you're using "encoding" to mean something it doesn't? Do you just mean like "value"? I think the GP means character encodings. So the intent here is to ask whether (for example) a foo defined in a ISO 8859-1 encoded file is overidden by a foo imported from a Windows-1256 encoded file.

> I think the GP means character encodings.

Then the link I posted answers their question. Names aren't unique in how encodings are handled. Files are decoded and canonicalized as a unicode string. If the identifiers are the same after canonicalization, then yes they are equivalent. If they aren't, then they aren't.

Re: Pyjion – A Python JIT Compiler

#125

Earlier quoted context omitted.

> By names aren't unique, I mean with respect to "encoding", everything is the same. It seems like you're using "encoding" to mean something it doesn't? Do you just mean like "value"? I think the GP means character encodings. So the intent here is to ask whether (for example) a foo defined in a ISO 8859-1 encoded file is overidden by a foo imported from a Windows-1256 encoded file.

> I think the GP means character encodings. Then the link I posted answers their question. Names aren't unique in how encodings are handled. Files are decoded and canonicalized as a unicode string. If the identifiers are the same after canonicalization, then yes they are equivalent. If they aren't, then they aren't.

Ah, I misunderstood what you meant by "aren't unique". I would have phrased that as "names aren't treated differently", or something similar.

Re: Pyjion – A Python JIT Compiler

#126
post #120
post #68

Earlier quoted context omitted.

https://gist.github.com/tomykaira/3159910 This gist talks specifically about PyPy using the Futamara projection.

The linked text is pretty bad, having many mistakes. Please see the two comments at the end of the page. For a better overview on what the projections are, please see http://blog.sigfpe.com/2009/05/three-projections-of-doctor-f... , or the original paper by Futamura.

Thank you, this is super helpful -- I didn't look close enough to spot that myself. :)
Post reply on HN