Live data from Hacker News

Pyjion – A Python JIT Compiler

trypyjion.com

111–120 of 126 posts

Re: Pyjion – A Python JIT Compiler

#111

Earlier quoted context omitted.

> Well, even for the section "names" it just forgets to say if imported and non-imported names all share the same encoding and which should it be - just a nitpick, but with less than 5 seconds https://www.python.org/dev/peps/pep-0263/ Names aren't unique. > Do you know that there are some behavioral limitations of dict that arise from a specific optimization in the implementation in C of dictionary iterators? I'm rat…

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.

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.

Re: Pyjion – A Python JIT Compiler

#112
post #106

Earlier quoted context omitted.

> Java does have a formal semantics, with a whole chapter on its soundness. No, there's a chapter on the soundness of its type system . The spec being sound and the type system being sound are very different things. If we consider typescript to be JS's type system, then JS's type system is unsound. If we consider cpython in isolation, under the definition you're using, cpython cannot be unsound, as it is untyped, QED…

You're arguing with the guy who did truffleruby. I'd say he knows a thing or 2 about the soundness of dynamic languages and adhering to a formal spec.

[deleted]

Re: Pyjion – A Python JIT Compiler

#113

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.

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.

[deleted]

Re: Pyjion – A Python JIT Compiler

#114

Earlier quoted context omitted.

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?

It's a spectrum - some languages do it a lot better than others. Not having anything more than a conversational English description of what it does is definitely the lower end of the spectrum. I'm sure very few are doing it perfectly, but for example Java has a formal semantics.

> but for example Java has a formal semantics.

I don't think that's really true. The Java language specification is entirely prose. The book you linked to was written by "outsider" authors and published in 1999 (!).

Re: Pyjion – A Python JIT Compiler

#115
post #114

Earlier quoted context omitted.

It's a spectrum - some languages do it a lot better than others. Not having anything more than a conversational English description of what it does is definitely the lower end of the spectrum. I'm sure very few are doing it perfectly, but for example Java has a formal semantics.

> but for example Java has a formal semantics. I don't think that's really true. The Java language specification is entirely prose. The book you linked to was written by "outsider" authors and published in 1999 (!).

That was just one example of many - there's a whole cottage industry of writing formal semantics for Java.

https://fsl.cs.illinois.edu/publications/bogdanas-rosu-2015-...

Re: Pyjion – A Python JIT Compiler

#116
post #82

> Pyjion does not currently support with blocks. > Pyjion does not currently support async..await (YIELD_FROM) statements. Those are some major limitations for modern Python code. https://pyjion.readthedocs.io/en/latest/limitations.html

The point for with blocks claims that this is related to exceptions. How can it handle CPython reference counting during exceptions but fail at cleaning up with blocks?

Re: Pyjion – A Python JIT Compiler

#117
post #114

Earlier quoted context omitted.

> but for example Java has a formal semantics. I don't think that's really true. The Java language specification is entirely prose. The book you linked to was written by "outsider" authors and published in 1999 (!).

That was just one example of many - there's a whole cottage industry of writing formal semantics for Java. https://fsl.cs.illinois.edu/publications/bogdanas-rosu-2015-...

None of them are official, and I bet they make major simplifications (the one you just linked to is for Java 1.4). I doubt actual language/tooling implementors benefit much from them.

Re: Pyjion – A Python JIT Compiler

#118
post #106

Earlier quoted context omitted.

> Java does have a formal semantics, with a whole chapter on its soundness. No, there's a chapter on the soundness of its type system . The spec being sound and the type system being sound are very different things. If we consider typescript to be JS's type system, then JS's type system is unsound. If we consider cpython in isolation, under the definition you're using, cpython cannot be unsound, as it is untyped, QED…

You're arguing with the guy who did truffleruby. I'd say he knows a thing or 2 about the soundness of dynamic languages and adhering to a formal spec.

Argumentum ab auctoritate.

Re: Pyjion – A Python JIT Compiler

#119

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.

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.

Re: Pyjion – A Python JIT Compiler

#120
post #68

Earlier quoted context omitted.

Can you link me to some sources? I'm not familiar with PyPy but I thought it's a normal tracing JIT. In fact quick googling shows a blog post explicitly saying PyPy does NOT use PE: https://www.pypy.org/posts/2018/09/the-first-15-years-of-pyp... . Besides not every PE instance is a Futurama Projection.

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.

Post reply on HN