[pypy-dev] rpython/rlib/parsing/parsing.py broken

2023-07-20 Thread Samuel Ytterbrink
It seams like the CompuledParser have been broken for the last 16 years, and that seams unbelievable. The error I get is that "symbol" can't be found, and even I "fix" that the parser always succeed, but with no children Is there a working copy of this file somewhere else that people use

[pypy-dev] rpython: first steps?

2023-07-04 Thread dave . long
I've managed to write a small rpython interpreter, and the jit seems to be working for both single loops and bridged loop nests. Does anyone have any suggestions for what I should be looking at next? Is attempting to play with the structure of the interpreter worthwhile? Or should I be looking

[pypy-dev] rpython tests

2022-12-30 Thread Oliver Margetts
Hello all, Are the tests in the rpython/ directory expected to pass when run via `pypy pytest.py rpython/`? And do you have a current CI setup for running these tests? With zero modifications to the codebase, I'm seeing quite a few test failures in the CI pipelines over here:

[pypy-dev] RPython by Example

2019-08-19 Thread Mingshen Sun
Hi all, I think RPython is a very promising language in some scenarios other than implementing PyPy itself. However, the usages (specs) of RPython are not very intuitive. Therefore, after reading the documentations and source code of PyPy/RPython, I started to write a "book" titled RPython by

Re: [pypy-dev] RPython translation error on generated code

2018-05-01 Thread Timothy Baldridge
Well, I switched to using sourcetools.compile_template and the error went away, so I was probably doing something wrong with how I compiled the template. Timothy On Tue, May 1, 2018 at 4:21 PM, Timothy Baldridge wrote: > I have a strange error, I'm generating code for a

[pypy-dev] RPython translation error on generated code

2018-05-01 Thread Timothy Baldridge
I have a strange error, I'm generating code for a RPython program and get this error: [translation:ERROR] AttributeError: 'FrozenDesc' object has no attribute 'pycall' Processing block: block@9[fn_0...] is a in (?:10)make_thunk containing the following operations: v2 =

Re: [pypy-dev] RPython proposed deprecation: translator.platform .distutils_platform

2017-11-09 Thread Maciej Fijalkowski
+1 On Mon, Nov 6, 2017 at 3:45 PM, Matti Picus wrote: > In addition to the arm, bsd, cygwin, darwin, freebsd, linux, maemo (really?) > netbsd, openbsd, posix, and windows rpython/translator/platforms, we have > one called "distutils_platform" that is allegedly supposed to

[pypy-dev] RPython proposed deprecation: translator.platform .distutils_platform

2017-11-06 Thread Matti Picus
In addition to the arm, bsd, cygwin, darwin, freebsd, linux, maemo (really?) netbsd, openbsd, posix, and windows rpython/translator/platforms, we have one called "distutils_platform" that is allegedly supposed to allow one to specify the target platform and use distutils

Re: [pypy-dev] '@rpython/$(TARGET)' problem

2017-02-20 Thread Armin Rigo
Hi John, On 16 February 2017 at 01:50, John Zhang wrote: > Hi all (Armin?), > I have been troubled by the line rpython/translator/platform/drawin.py:35, > where it adds ‘@rpath/$(TARGET)’ to the linker arguments for shared > libraries. This assumes that the usage case will

[pypy-dev] '@rpython/$(TARGET)' problem

2017-02-16 Thread John Zhang
Hi all (Armin?), I have been troubled by the line rpython/translator/platform/drawin.py:35, where it adds ‘@rpath/$(TARGET)’ to the linker arguments for shared libraries. This assumes that the usage case will be from a Makefile, where $(TARGET) is defined. However, in

Re: [pypy-dev] RPython hashes no longer preserved across translation

2017-01-28 Thread Armin Rigo
Hi, On 28 January 2017 at 13:42, Carl Friedrich Bolz wrote: > That sounds like a good simplification to me. Might come with a few bugs for now :-( I just realized I missed prebuilt non-empty RWeakValueDictionary(). Armin ___ pypy-dev

Re: [pypy-dev] RPython hashes no longer preserved across translation

2017-01-28 Thread Carl Friedrich Bolz
Hi Armin, That sounds like a good simplification to me. Cheers, Carl Friedrich On January 28, 2017 1:28:18 PM GMT+01:00, Armin Rigo wrote: >Hi all, > >I would like to merge the branch "rpython-hash". That branch drops >the RPython requirement that hashes (notably of

[pypy-dev] RPython hashes no longer preserved across translation

2017-01-28 Thread Armin Rigo
Hi all, I would like to merge the branch "rpython-hash". That branch drops the RPython requirement that hashes (notably of prebuilt instances) don't change across translation. By dropping it, I could remove some cruft at various places, and it makes the life a bit easier for other systems like

Re: [pypy-dev] RPython Darwin platform description so_prefixes empty

2016-12-28 Thread Armin Rigo
Hi John, On 7 December 2016 at 02:06, John Zhang wrote: >> I think we can include 'lib' in so_prefix of all Posix platforms, is >> that right? > > I can’t seem to find a definitive answer for all POSIX platforms. But for > all the ones that PyPy currently supports, I think

Re: [pypy-dev] RPython Darwin platform description so_prefixes empty

2016-12-06 Thread John Zhang
Hi Armin, I think we can include 'lib' in so_prefix of all Posix platforms, is that right? I can’t seem to find a definitive answer for all POSIX platforms. But for all the ones that PyPy currently supports, I think the answer is true. So if you want to make the changes then I think it’s a

Re: [pypy-dev] RPython Darwin platform description so_prefixes empty

2016-12-06 Thread Armin Rigo
Hi John, On 6 December 2016 at 03:06, John Zhang wrote: > So I think it’s right to make a simple fix as suggested in the patch to > include ‘lib’ in the so_prefix on Darwin platforms. I think we can include 'lib' in so_prefix of all Posix platforms, is that right? It's

Re: [pypy-dev] RPython Darwin platform description so_prefixes empty

2016-12-06 Thread John Zhang
Hi Armin, The test `rpython.rtyper.lltypesystem.test.TestPlatform.test_prefix` illustrates the problem quite well. Currently this test is skipped on non-linux platforms. When that is turned off, the test fails on macOS X. With `Darwin_x86.so_prefix == (‘’, )`, line ll2ctypes:1218 will fail,

[pypy-dev] RPython Darwin platform description so_prefixes empty

2016-11-30 Thread John Zhang
Hi all, I have been doing some coding using RFFI to load function pointers from shared libraries (`llexternal` function). However what bothers me is that apparently `Darwin_x86_64` platform class (defined in translator/platform/darwin.py) does not include ‘lib’ in `so_prefixes`. This is causing

Re: [pypy-dev] rpython and pep 484

2015-01-25 Thread Robert Grosse
Wouldn't it be possible to get a performance improvement from type annotations without sacrificing correctness? From the perspective of static compilation, if you have an infinitely powerful type inference engine, there shouldn't be any difference to have type annotations or not. The reason that

Re: [pypy-dev] rpython and pep 484

2015-01-25 Thread Armin Rigo
Hi, On 25 January 2015 at 00:05, Ho33e5 ho3...@gmail.com wrote: What is your view on the new typing/mypy things that are happening on python-dev (pep 484)? What I mean is will this make the typing system of rpython evolve? Could RTyper be adapted to work on pep 484 annotations (would it

Re: [pypy-dev] rpython and pep 484

2015-01-25 Thread Maciej Fijalkowski
In theory it's possible. In practice I struggle to imagine an example where it would make real difference (unlike other hints, e.g. this value tends to be smaller than 5 or this list tends to store only/mostly integers etc.) On Sun, Jan 25, 2015 at 11:13 AM, Robert Grosse n210241048...@gmail.com

[pypy-dev] rpython and pep 484

2015-01-24 Thread Ho33e5
Hi everybody, firstly, this is just an email for personal interest and has nothing to do directly with development so this mailing list may not be quite the right place (I am going to hang around on #pypy...). I am a student and generally interested with the pypy development, especially with

Re: [pypy-dev] RPython as a separate package

2014-04-16 Thread Armin Rigo
Hi Bogdan, On 16 April 2014 06:59, Bogdan Opanchuk manti...@gmail.com wrote: it's not even available as a package in the PyPy itself What do you mean? rpython is the name of the top-level directory we're talking about, with __init__.py and everything. It is a regular package. A bientôt,

Re: [pypy-dev] RPython as a separate package

2014-04-16 Thread Bogdan Opanchuk
Hi Armin, It is a package, but it is not discoverable. I cannot install it with pip, and I cannot set it as a dependency for some other package. On Wed, Apr 16, 2014 at 6:45 PM, Armin Rigo ar...@tunes.org wrote: Hi Bogdan, On 16 April 2014 06:59, Bogdan Opanchuk manti...@gmail.com wrote:

Re: [pypy-dev] RPython as a separate package

2014-04-15 Thread Benjamin Peterson
On Tue, Apr 15, 2014, at 21:31, Bogdan Opanchuk wrote: Hello, I would like to use the RPython toolchain in my project. The problem is, RPython is currently hidden inside PyPy and therefore not readily available. I found this thread

Re: [pypy-dev] RPython as a separate package

2014-04-15 Thread Bogdan Opanchuk
Hi Benjamin, Thank you, I've seen it in the repo. But one still cannot install it as a separate package, say, in CPython, and it's not even available as a package in the PyPy itself (it's only used at build stage, as far as I understand). Are there any plans to complete the splitting and make it

[pypy-dev] RPython question about the lifetime of global state

2014-03-05 Thread Lenard Lindstrom
Hi everyone, I am developing a new image blit system for Pygame 2.0 - the SDL2 edition. A blitter prototype project is maintained at https://bitbucket.org/llindstrom/blitter. The prototype implements a blit loop JIT; Pixel format specific blit code is generated dynamically as needed. The

Re: [pypy-dev] RPython question about the lifetime of global state

2014-03-05 Thread Armin Rigo
Hi Lenard, On 6 March 2014 07:16, Lenard Lindstrom le...@telus.net wrote: The prototype is written in RPython as an interpreter for executing array copies. The JIT comes automatically from the RPython tool chain, of course. Cool :-) RPython can certainly be used in this way, although critics

[pypy-dev] RPython Environment Variables

2013-10-31 Thread Ryan Gonzalez
I am writing a tool in RPython that needs to access environment variables. Now, all has been going well, but I noticed something interesting. The RPython translator sees os.environ as constant. But, will it still be constant on other platforms? What I'm saying is, are the environment variables

Re: [pypy-dev] RPython Environment Variables

2013-10-31 Thread Benjamin Peterson
Presumably, you can just use get/setenv() 2013/10/31 Ryan Gonzalez rym...@gmail.com: I am writing a tool in RPython that needs to access environment variables. Now, all has been going well, but I noticed something interesting. The RPython translator sees os.environ as constant. But, will it

Re: [pypy-dev] RPython Environment Variables

2013-10-31 Thread Amaury Forgeot d'Arc
2013/11/1 Ryan Gonzalez rym...@gmail.com I am writing a tool in RPython that needs to access environment variables. Now, all has been going well, but I noticed something interesting. The RPython translator sees os.environ as constant. But, will it still be constant on other platforms? What

Re: [pypy-dev] RPython: write generic native library / write CPython C module

2013-06-17 Thread Armin Rigo
Hi Albert, On Sun, Jun 16, 2013 at 1:37 PM, Albert Zeyer alb...@googlemail.com wrote: You may or may not get help with your questions: see http://doc.pypy.org/en/latest/faq.html#do-i-have-to-rewrite-my-programs-in-rpython Well, not quite. No, sorry for the misunderstanding :-) What I meant

Re: [pypy-dev] RPython: write generic native library / write CPython C module

2013-06-17 Thread Albert Zeyer
Hi Armin, Thanks for the clarification! I was wondering: Why is it that RPython is not a good general purpose language? In the original paper (http://rpython.googlecode.com/svn/trunk/doc/rpython-DLS08.pdf), it is said: The result is a language that is more expressive than C# and Java, but

Re: [pypy-dev] RPython: write generic native library / write CPython C module

2013-06-17 Thread Carl Friedrich Bolz
On 06/16/2013 01:37 PM, Albert Zeyer wrote: Hi Armin, Well, not quite. I think I know about the limitations and restrictions of RPython. But that is why I think it is especially useful in some cases where I have written some library in Python with some strict subset of Python (or already mostly

Re: [pypy-dev] RPython: write generic native library / write CPython C module

2013-06-17 Thread Armin Rigo
Hi Albert, On Mon, Jun 17, 2013 at 11:20 AM, Albert Zeyer alb...@googlemail.com wrote: I was wondering: Why is it that RPython is not a good general purpose language? In the original paper (http://rpython.googlecode.com/svn/trunk/doc/rpython-DLS08.pdf), it is said: RPython dates further

Re: [pypy-dev] RPython: write generic native library / write CPython C module

2013-06-16 Thread Armin Rigo
Hi Albert, You may or may not get help with your questions: see http://doc.pypy.org/en/latest/faq.html#do-i-have-to-rewrite-my-programs-in-rpython Armin ___ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev

[pypy-dev] RPython: write generic native library / write CPython C module

2013-06-15 Thread Albert Zeyer
Hi, I got the idea to use RPython to use my Python code to write a generic native library. I have looked roughly at the RPython translator code and it seems like there are ways to export custom symbols. Has that already been done? Or is it possible to do that? --- Then, I got the further idea

[pypy-dev] RPython

2013-05-28 Thread Dirk Hünniger
Hello, I am working on a compiler for MediaWiki to LaTeX. Currently it is written in Haskell and Python3. I feel very insecure about the Python part and I would feel much safer if I had static typechecking in the Python part. Still I want the Python part to be able to run with normal Python

Re: [pypy-dev] RPython

2013-05-28 Thread Amaury Forgeot d'Arc
Hello, 2013/5/28 Dirk Hünniger dirk.hunni...@googlemail.com Hello, I am working on a compiler for MediaWiki to LaTeX. Currently it is written in Haskell and Python3. I feel very insecure about the Python part and I would feel much safer if I had static typechecking in the Python part. Still

Re: [pypy-dev] RPython

2013-05-28 Thread Steven D'Aprano
On 29/05/13 01:27, Dirk Hünniger wrote: Hello, I am working on a compiler for MediaWiki to LaTeX. Currently it is written in Haskell and Python3. I feel very insecure about the Python part and I would feel much safer if I had static typechecking in the Python part. Please read this article,

Re: [pypy-dev] [rpython] What might prevent a function call from beeing invlined by the JIT?

2013-02-22 Thread Костя Лопухин
Yes, it had a little loop that was setting arguments for a function call, now the call is inlined, thank you! But in the inlined code there is immidately call_assembler, followed by a keepalive of the frame. Does it have an equally simple answer? Or it has to do with the function arguments?

Re: [pypy-dev] [rpython] What might prevent a function call from beeing invlined by the JIT?

2013-02-22 Thread Maciej Fijalkowski
On Fri, Feb 22, 2013 at 1:56 PM, Костя Лопухин kostia.lopu...@gmail.com wrote: Yes, it had a little loop that was setting arguments for a function call, now the call is inlined, thank you! But in the inlined code there is immidately call_assembler, followed by a keepalive of the frame. Does it

Re: [pypy-dev] RPython

2011-12-08 Thread Armin Rigo
Hi, On Thu, Dec 8, 2011 at 06:30, Rinu Boney rinu.mat...@gmail.com wrote: where can i get more information on rpython ( i have already seen what is written in the coding guide! ) ? The coding guide describes the basics, and we have a number of examples of small interpreters besides the Python

[pypy-dev] RPython

2011-12-07 Thread Rinu Boney
[ forgive me if it is a dumb question ] is there any article or a tutorial that shows how to use the rpython toolkit for a beginner ( just to hack around and learn stuff ) ? what is the relation between rpythonic ( http://code.google.com/p/rpythonic/ ) and rpython ? where can i get more

Re: [pypy-dev] RPython

2011-12-07 Thread Benjamin Peterson
2011/12/8 Rinu Boney rinu.mat...@gmail.com: [ forgive me if it is a dumb question ] is there any article or a tutorial that shows how to use the rpython toolkit for a beginner ( just to hack around and learn stuff ) ? what is the relation between rpythonic (