Re: [pypy-dev] pypy 2.3.1 json encoding performnce is Extremely slow (30x slower ).

2014-08-30 Thread Armin Rigo
Hi Alex, On 30 August 2014 00:09, Alex Gaynor alex.gay...@gmail.com wrote: FWIW, I'm not sure your commit helped, at least, it seems to be worse for some usecases: (PyPy default vs 2.3.1): Ah. Yes, my commit helped really a lot: $ ./pypy-c -mtimeit -simport json;x=u'\u1234'*1

Re: [pypy-dev] pypy 2.3.1 json encoding performnce is Extremely slow (30x slower ).

2014-09-01 Thread Armin Rigo
Hi Alex, On 30 August 2014 08:43, Armin Rigo ar...@tunes.org wrote: went down from 5.8ms per loop to 208us. However, I see that running the same example with 1 ascii chars went up from 41.4us to 139us. Time to tweak. Tweaked! See 65ac482d28d6. This was because if you used this kind

Re: [pypy-dev] pypy 2.3.1 json encoding performnce is Extremely slow (30x slower ).

2014-09-01 Thread Armin Rigo
Re-hi, On 1 September 2014 12:20, Armin Rigo ar...@tunes.org wrote: Tweaked! Note that the final result is 33% faster in your example. Armin ___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev

Re: [pypy-dev] pypy 2.3.1 json encoding performnce is Extremely slow (30x slower ).

2014-09-01 Thread Armin Rigo
Hi, On 1 September 2014 17:06, Phyo Arkar phyo.arkarl...@gmail.com wrote: Thanks a lot. I haven't get to test lastest commit yet. So in that , attached benchmark in pypy is running faster than python now? Yes, for the utf-8 test (the tests with double didn't change). Here is what I get on

Re: [pypy-dev] Will pypy reach performance of HHVM?(one Day)

2014-09-07 Thread Armin Rigo
Hi all, On 7 September 2014 03:01, Maciej Fijalkowski fij...@gmail.com wrote: did you read my previous post how this is apples to oranges? You should setup some more barebone thing than tornado to compare Maybe we should mention that PyPy's JIT technology, when applied straight to the Hippy

Re: [pypy-dev] pypy 2.4-beta1 (Snow White) is available for testing

2014-09-08 Thread Armin Rigo
Hi Matti, On 8 September 2014 00:23, Matti Picus matti.pi...@gmail.com wrote: Get it while it's hot, let me know if something is wrong. Great :-) https://bitbucket.org/pypy/pypy/downloads No 32-bit Linux? About 32-bit Linux, we should remember to update the main download.html when we do the

Re: [pypy-dev] Pypy3 supporting Python 3.3

2014-09-18 Thread Armin Rigo
Hi Ram, On 18 September 2014 17:41, Matti Picus matti.pi...@gmail.com wrote: Sorry, the 3.3 is a typo, it should read 3.2.5 Some in-progress betas are available from: http://buildbot.pypy.org/nightly/py3.3/ Maybe someone working on it can trigger a further, more up-to-date build; most of them

[pypy-dev] PyPy Warsaw Sprint (October 21-25th, 2014)

2014-09-23 Thread Armin Rigo
Hi all, Here's the announcement (below) for the next PyPy sprint, in one month's time in Warsaw. It will take place just after the Polish PyCon Pl'14 conference, which is also in Poland, although not in Warsaw. See http://pl.pycon.org/2014/en/ in case you're interested. (There is of course no

Re: [pypy-dev] Declaring a function that returns a string in CFFI

2014-09-23 Thread Armin Rigo
Hi Lefteris, On 22 September 2014 19:37, Eleytherios Stamatogiannakis est...@gmail.com wrote: b = unicode( ffi.buffer( clib.getString(...) ) ,'utf-8') because it'll only return the first character of getString, due to being declared as a 'char*'. The issue is only that ffi.buffer() tries to

Re: [pypy-dev] Declaring a function that returns a string in CFFI

2014-09-25 Thread Armin Rigo
Hi, On 25 September 2014 09:06, Elefterios Stamatogiannakis est...@gmail.com wrote: Unfortunately, the C library that i use (libsqlite3) does not provide a function like that :( . It has a function that returns the size of the string, but in my tests the overhead of doing another CFFI call (to

Re: [pypy-dev] Declaring a function that returns a string in CFFI

2014-09-26 Thread Armin Rigo
Hi, On 25 September 2014 16:57, Eleytherios Stamatogiannakis est...@gmail.com wrote: Wouldn't an strbuffer that does this scan (opportunistically) be faster for cases like above? No, it can't be faster than my last solution. There is no way we're going to add custom logic for a special case

Re: [pypy-dev] Problem with PyPy3 and lxml

2014-09-26 Thread Armin Rigo
Hi, On 25 September 2014 18:01, Eugenio Cano-Manuel Mendoza eugenioca...@gmail.com wrote: (error message here http://pastebin.com/LUw3FrDK) A bug of PyPy3. Please report it to our bug tracker. I don't know if it's already known or already fixed, though. A bientôt, Armin.

Re: [pypy-dev] JITing non looping interpreted functions

2014-09-29 Thread Armin Rigo
Hi Alex, On 29 September 2014 01:31, Alex Gaynor alex.gay...@gmail.com wrote: So, one solution is to simply write this loop in the interpreted language (this is what I did for Topaz, methods such as Array#each are just some ruby code). An alternative is to make a JitDriver for that function,

Re: [pypy-dev] PyPy Warsaw Sprint (October 21-25th, 2014)

2014-09-30 Thread Armin Rigo
Hi Kostia, On 27 September 2014 21:09, Костя Лопухин kostia.lopu...@gmail.com wrote: My name is Kostia Lopuhin, and I would like to come to the sprint. Welcome :-) I would like to work on JIT optimizations, I am particularly interested in improving short loops, but understanding that this is

Re: [pypy-dev] Stacklet problems

2014-10-05 Thread Armin Rigo
Hi Timothy, On 3 October 2014 05:51, Timothy Baldridge tbaldri...@gmail.com wrote: I have an interpreter that takes advantage of the rstacklet api. My tests pass fine when running untranslated in CPython, but after translating via rpython I get a Segmentation fault: 11, are there any major

Re: [pypy-dev] GCArray vs list

2014-10-11 Thread Armin Rigo
Hi Timothy, On 11 October 2014 17:18, Timothy Baldridge tbaldri...@gmail.com wrote: Awesome, thanks, that's exactly what I was thinking. I'll audit my code for such usages and see if that helps. An automated way to do that is to use rpython.rlib.debug.make_sure_not_resized() on the frame's

Re: [pypy-dev] [pypy-commit] pypy default: investigate mark_opaque_ptr

2014-10-13 Thread Armin Rigo
Hi Hakan, On 13 October 2014 11:52, Hakan Ardo ha...@debian.org wrote: On Mon, Oct 13, 2014 at 11:45 AM, Armin Rigo ar...@tunes.org wrote: Hi Hakan, On 13 October 2014 10:11, Hakan Ardo ha...@debian.org wrote: mark_opaque_ptr is used by unrolling to prevent moving getfield_gc(p1

Re: [pypy-dev] [pypy-commit] pypy default: investigate mark_opaque_ptr

2014-10-13 Thread Armin Rigo
Hi Hakan, On 13 October 2014 13:10, Hakan Ardo ha...@debian.org wrote: I think the problematic case is actually when mixing with arrays. There will already be a guard_class protecting the getfiled in the short preamble, but it crashes when operating on an array. Also, there is no

Re: [pypy-dev] [pypy-commit] pypy default: investigate mark_opaque_ptr

2014-10-14 Thread Armin Rigo
Hi Hakan, On 13 October 2014 18:59, Hakan Ardo ha...@debian.org wrote: Are we certain opaque pointers always refer to GC-objects? Yes. Right, but mark_opaque_ptr prevents this case as well by not moving operations using opaque pointers into the short preamble. So I guess we are currently

Re: [pypy-dev] Status of SSE support?

2014-10-14 Thread Armin Rigo
Hi Alex, On 14 October 2014 18:42, Alex Gaynor alex.gay...@gmail.com wrote: I'm talking about an explicit vector_3f_add() primitive, would be pretty straightforward to do the mapping. IIRC it took us less than a day to add READ_TIMESTAMP instruction. I agree with Maciej on this point. The

Re: [pypy-dev] Status of SSE support?

2014-10-14 Thread Armin Rigo
On 14 October 2014 18:46, Armin Rigo ar...@tunes.org wrote: The alternative would be to have a vector_3f_add() that takes 4 xmm registers, combine them into two, add them, and re-split the result. ...or, as Maciej says, have only the ability to operate on memory data. But even ignoring

Re: [pypy-dev] Please update the buildbot

2014-10-18 Thread Armin Rigo
Hi Philip, On 16 October 2014 21:19, Philip Jenvey pjen...@underboss.org wrote: Could someone with access update and cycle the buildbot when they get the chance? Updated it one or two days ago. It is at current tip (a768fa781d1b). Armin ___

Re: [pypy-dev] PyPy Warsaw Sprint (October 21-25th, 2014)

2014-10-20 Thread Armin Rigo
Hi Valentina, On 19 October 2014 22:43, Valentina Mukhamedzhanova umi...@gmail.com wrote: I'm in Warsaw these days and I learned that the next PyPy sprint is taking place here, so I'd like to attend it on October 21st. Welcome :-) Armin ___

Re: [pypy-dev] translation error on jit.unroll_safe with jit_libffi

2014-10-25 Thread Armin Rigo
Hi, On 25 October 2014 10:10, Maciej Fijalkowski fij...@gmail.com wrote: I would not be surprised if static methods are simply unsupported by the JIT (but likely for no good reason) That's not a crash of the JIT: /Users/tim/oss-not-dropbox/externals/pypy/rpython/annotator/bookkeeper.py,

Re: [pypy-dev] translation error on jit.unroll_safe with jit_libffi

2014-10-25 Thread Armin Rigo
Hi Carl Friedrich, On 25 October 2014 15:00, Carl Friedrich Bolz cfb...@gmx.de wrote: OK, that's a very nice statement for people that know the internals of the annotator, but for not really helpful for people like me who don't ;-). What does that mean on the language level? How do you 'ask

Re: [pypy-dev] translation error on jit.unroll_safe with jit_libffi

2014-10-25 Thread Armin Rigo
Hi Timothy, On 25 October 2014 15:48, Timothy Baldridge tbaldri...@gmail.com wrote: If you get latest, you should be able to get the PBC error on linux now. I mostly develop on OSX so that was an error I needed to fix for the Linux people. Fixed in 76cd145da640 - 41343203ab73. I'm not 100%

Re: [pypy-dev] Weird Unicode errors

2014-10-27 Thread Armin Rigo
Hi Timothy, For future reference: the issue was moved to the PyPy issue tracker at https://bitbucket.org/pypy/pypy/issue/1898 and resolved there. Armin ___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev

Re: [pypy-dev] Silly Question re PIP

2014-11-01 Thread Armin Rigo
Hi Gary, On 31 October 2014 16:47, Gary Furash furashg...@gmail.com wrote: I didn't understand the documentation, but is it the case that you cannot use PIP with pypy? When I run pypy get_pip.py, it fails. Works for me (PyPy 2.4.0 on Linux 64-bit). You need to be more specific. A bientôt,

Re: [pypy-dev] Optimize constant float division by multiplication?

2014-11-06 Thread Armin Rigo
Hi, On 5 November 2014 23:02, Alex Gaynor alex.gay...@gmail.com wrote: If this optimization is valid for any float, we should definitely do it, and this is a missed optimization. If it's not valid for all floats, I'm not sure how we should handle it, if at all. gcc seems to perform this

Re: [pypy-dev] Optimize constant float division by multiplication?

2014-11-06 Thread Armin Rigo
Hi Toni, On 6 November 2014 10:00, Armin Rigo ar...@tunes.org wrote: gcc seems to perform this optimization for divide-by-constant where the constant is exactly a finite power of two that is not a denormal. These are the cases where the result is exactly the same. We could do it too

Re: [pypy-dev] Optimize constant float division by multiplication?

2014-11-06 Thread Armin Rigo
Hi Toni, On 6 November 2014 18:29, Toni Mattis toni.mat...@student.hpi.uni-potsdam.de wrote: thanks for the advice. I tried what Armin proposed and like to share my results with you: https://bitbucket.org/amintos/pypy/commits/937254cbc554adfb748e3b5eeb44bf765d204b9d?at=default Thanks! Maybe

Re: [pypy-dev] Optimize constant float division by multiplication?

2014-11-07 Thread Armin Rigo
Hi Toni, On 6 November 2014 23:19, Toni Mattis toni.mat...@student.hpi.uni-potsdam.de wrote: that sounds more convenient than manipulating floats as architecture dependent integers ;) So this is my implementation now:

Re: [pypy-dev] Optimize constant float division by multiplication?

2014-11-07 Thread Armin Rigo
Hi, On 7 November 2014 10:44, Armin Rigo ar...@tunes.org wrote: `rfloat.double_to_string(x, 'r', 0, 0)[0]`. The last argument should be `rfloat.DTSF_ADD_DOT_0`, otherwise a number like 3.0 will be confusingly represented as 3. A bientôt, Armin

Re: [pypy-dev] Segfault in Hy for PyPy 2.4

2014-11-09 Thread Armin Rigo
Hi Ryan, On 5 November 2014 19:07, Ryan Gonzalez rym...@gmail.com wrote: That's the weird issue: it's already fixed! A version compiled from tip works, but the prebuilt 2.4 binaries are the ones that crash. I ran it up to the crash, which occurs somewhere in the compiler. My guess is that

Re: [pypy-dev] Crashes with rffi

2014-11-09 Thread Armin Rigo
Hi Timothy, From the docs, the signature of uv_fs_read() is this (http://docs.libuv.org/en/latest/fs.html#c.uv_fs_read): int uv_fs_read(uv_loop_t* loop, uv_fs_t* req, uv_file file, const uv_buf_t bufs[], unsigned int nbufs, int64_t offset, uv_fs_cb cb) This seems to differ from what you're

Re: [pypy-dev] How to profile in Pypy?

2014-11-10 Thread Armin Rigo
Hi Robert, On 9 November 2014 23:04, Robert Grosse n210241048...@gmail.com wrote: Is there any easy way to profile code under Pypy? When I try to run using the usual pypy -m cProfile foo.py, I get nonsensical results, like negative time or billions of seconds. That's a bug. Can you open a

Re: [pypy-dev] Crashes with rffi

2014-11-10 Thread Armin Rigo
Hi Timothy, We're talking past each other. I think that I already found that your code is not correct according to the docs. You need to fix the signature of uv_fs_read() and create an array 'uv_buf_t[]', possibly of length 1. I may be wrong though. A bientôt, Armin.

Re: [pypy-dev] Crashes with rffi

2014-11-13 Thread Armin Rigo
Hi Timothy, I did a git checkout of the branch async-io-file; then cd pixie/pixie/vm/libs/test; then touch README.md (unsure how you're supposed to run from the top directory); then: PYTHONPATH=~/git/pixie:~/pypysrc python -m unittest test_uv_file It seems to work for me (Ran 2 tests in xx

Re: [pypy-dev] Unify lib_pypy by vendoring six

2014-12-06 Thread Armin Rigo
Hi, On 6 December 2014 at 15:01, Maciej Fijalkowski fij...@gmail.com wrote: I'm -1 on the idea unless proven otherwise (it does add burden on people writing stuff for lib_pypy on python2 for example) We mostly never write new stuff in lib_pypy on Python 2. But this makes it a perfect example

Re: [pypy-dev] Poor performance for Krakatau

2014-12-08 Thread Armin Rigo
Hi Robert, On 10 November 2014 at 05:27, Maciej Fijalkowski fij...@gmail.com wrote: I've been looking at krakatau performance for a while, it's almost exclusively warmup time. We are going to address it, I hope rather sooner than later :-) We added Krakatau to the official benchmark suite.

Re: [pypy-dev] Experiments with PyPy and libgccjit

2014-12-14 Thread Armin Rigo
Hi, On 13 December 2014 at 13:59, Maciej Fijalkowski fij...@gmail.com wrote: * Can libgcc tell us where on stack are GC roots? (also necessary) This constraint can be relaxed nowadays: it's enough e.g. if we tell gcc to reserve register %rbp to contain the jitframe object. That's the only GC

[pypy-dev] Fwd: [Python-Dev] More compact dictionaries with faster iteration

2015-01-03 Thread Armin Rigo
Hi all, About ordered dictionaries: -- Forwarded message -- From: Armin Rigo ar...@tunes.org Date: 3 January 2015 at 17:39 Subject: Re: [Python-Dev] More compact dictionaries with faster iteration To: Maciej Fijalkowski fij...@gmail.com Cc: Serhiy Storchaka storch...@gmail.com

Re: [pypy-dev] how to register to sprint in Leysin, Switzerland

2015-02-02 Thread Armin Rigo
Hi Sik, On 2 February 2015 at 17:50, Sik mail...@gmail.com wrote: We live close, but not that much ;) I guess that we'll try to find a place at the Chalet. (In this manner we can jump early out of bed to go for skimo). We were waiting to see if we could come. Now I think is time to book the

Re: [pypy-dev] Another idea for improving warm-up times

2015-02-07 Thread Armin Rigo
Re-hi, In fact, after more discussion on irc, it seems that we can (almost or completely) decide we can reuse this saved trace like this: if we trace it again, we follow the same path in the jitcodes. Indeed, this path implicitly encodes all the relevant information, like which Python opcodes we

Re: [pypy-dev] A question about RPython's JIT in scheduler

2015-02-05 Thread Armin Rigo
Hi, For future reference: we discussed this question on IRC yesterday, Feb 4th (see logs). Let me repeat here the main answer: the JIT works well because you're using a scheme where some counter is decremented (and the soft-thread interrupted when it reaches zero) only once in each app-level

Re: [pypy-dev] Windows: pypyw.exe?

2015-02-05 Thread Armin Rigo
Hi, On 4 February 2015 at 20:04, Matti Picus matti.pi...@gmail.com wrote: When you say it is just a hassle that leads me to believe you already know how to fix it (Hint: |cl /subsystem:windows|) It's probably as easy as tweaking the generated Makefile, to call once cl and once cl

Re: [pypy-dev] [pypy-commit] pypy default: Rename the --output option to --really-force-output, and document it

2015-02-06 Thread Armin Rigo
Hi Fijal, On 6 February 2015 at 09:54, Maciej Fijalkowski fij...@gmail.com wrote: This change breaks places that recommend you to use --output (e.g. check that you're not translating with the same executable) Grepping for --output, I can find only translate.py that says use --output=... so

Re: [pypy-dev] Windows: pypyw.exe?

2015-02-06 Thread Armin Rigo
Hi, On 6 February 2015 at 11:15, Amaury Forgeot d'Arc amaur...@gmail.com wrote: This has other implications. For example, sys.stdout points to an invalid file descriptor, and I remember that old versions of pythonw.exe used to freeze after printing 8192 characters. I'm not finding anything

[pypy-dev] Fwd: [pypy-commit] pypy default: Rename the --output option to --really-force-output, and document it

2015-02-06 Thread Armin Rigo
Hi Tobias, (answering an off-list-by-mistake mail) On 6 February 2015 at 13:50, Tobias Pape das.li...@gmx.de wrote: So this is changed in rpython for a pypy issue? Yes, someone else made the same point on IRC. I have now reverted this change, and added a check to targetpypystandalone.py that

[pypy-dev] Next sprint in Leysin, Switzerland (20-28 Feb 2015)

2015-01-15 Thread Armin Rigo
. Armin Rigo ___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev

Re: [pypy-dev] Sudden failures during compile-c

2015-01-20 Thread Armin Rigo
Hi Timothy, On 20 January 2015 at 15:59, Timothy Baldridge tbaldri...@gmail.com wrote: I find this odd as it works just fine without the JIT, and compiles fine on OS X. The code in question is basically a copy-and-paste from PyPy's code:

Re: [pypy-dev] Sudden failures during compile-c

2015-01-20 Thread Armin Rigo
Re-hi, On 20 January 2015 at 16:04, Armin Rigo ar...@tunes.org wrote: Maybe related: there is a copy mistake in after_external_call(). It should not call the get/set_saved_errno() functions. Also, did you mean _cleanup_() instead of __cleanup__()? Armin

Re: [pypy-dev] Numpy Topics

2015-01-20 Thread Armin Rigo
Hi Dan, On 21 January 2015 at 03:19, Dan Stromberg drsali...@gmail.com wrote: It includes a pure-python version of timsort, among others. There is one in PyPy too. Kind of obvious, in fact: we need one for implementing `list.sort()`. I think the original question was instead very

Re: [pypy-dev] Sudden failures during compile-c

2015-01-20 Thread Armin Rigo
Hi Timothy, On 21 January 2015 at 02:07, Timothy Baldridge tbaldri...@gmail.com wrote: I switched all builds to use shadowstack and the build error goes away. So I guess that was the issue. Can you tell us how to reproduce anyway? It's strange that you get this problem, because a void

Re: [pypy-dev] could it be that cpyext is faster than python + cffi?

2015-02-15 Thread Armin Rigo
Hi Matti, On 14 February 2015 at 17:44, Matti Picus matti.pi...@gmail.com wrote: That makes sense, thanks. I will see if I can easily reuse the c code as a shared object rather than a module, and what effect that has on timing. Note that it's what ffi.verify() is for: you add any amount of

Re: [pypy-dev] contribute in the project

2015-02-17 Thread Armin Rigo
Hi! On 17 February 2015 at 17:16, Ahmed Abdalrahman ahmedabdalrahm...@gmail.com wrote: my name is Ahmed , i want to join u and i am interested in open source what ever your will join google summer of code or not i want to coding , trying to learn and help you if

Re: [pypy-dev] GSoC 2015

2015-02-17 Thread Armin Rigo
Hi Rohan, On 15 February 2015 at 21:23, Rohan Goel rohangoel0...@gmail.com wrote: I am Rohan Goel , Computer Science undergraduate at BITS Pilani , India and am interested in working for your organization in GSoC 2015. As I am a beginner in open source coding , it would be great help if you

Re: [pypy-dev] Fwd: pypy memory test

2015-02-17 Thread Armin Rigo
Hi Christian, On 15 February 2015 at 21:36, Christian Walder walderchrist...@gmail.com wrote: I seem to be running into a problem with freeing memory. The problem you have, as I understand it, is that the OS-visible size of the process goes up but not down. This is expected. I don't really

Re: [pypy-dev] starting 2.5 release cycle, help needed with macos

2015-01-29 Thread Armin Rigo
Hi all, On 29 January 2015 at 06:22, Matti Picus matti.pi...@gmail.com wrote: We have a persistent crash with macos nightly builds in the _continuation module, help is needed to track it down I am willing to look into this bug provided someone provides an OS/X machine where I can log in and

Re: [pypy-dev] PyPy improving generated machine code

2015-01-31 Thread Armin Rigo
Hi Richard, On 31 January 2015 at 10:51, Richard Plangger r...@pasra.at wrote: By using the PEP 484 proposal I think this opens up new possibilities. The short answer is - no, it doesn't make sense. User-supplied type annotations wouldn't help at all if they must still be checked, like PEP 484

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

[pypy-dev] errno and GetLastError in RPython

2015-01-23 Thread Armin Rigo
Hi all, I recently merged the errno-again branch. This branch moves the reading/saving of errno (and on Windows Get/SetLastError) closer to the actual function call. It should avoid bugs about rarely getting the wrong value for errno, in case something special happened: for example, it was not

Re: [pypy-dev] Ordered dict in PyPy

2015-01-11 Thread Armin Rigo
Hi Laura, On 11 January 2015 at 19:57, Laura Creighton l...@openend.se wrote: Can we talk the CPython developers into raising RunTimeError for concurrent modifications? No, we can't expect them to change that: http://bugs.python.org/issue19414 shows they have no plan to have well-defined

[pypy-dev] Ordered dict in PyPy

2015-01-11 Thread Armin Rigo
Hi all, The all-ordered-dicts branch is not quite ready for merging, but getting there. In one word, it makes all dicts ordered by default, by a subtle change of the internal model which also makes them *more* compact. An annoying detail is the OrderedDict subclass. We can simplify it a lot in

Re: [pypy-dev] Ordered dict in PyPy

2015-01-11 Thread Armin Rigo
Hi all, Thanks for the feedback. It looks like the general opinion is to raise RuntimeError when detecting changes. I'll do that then. About '__reversed__', I suppose it should be implemented the same way, with an RPython-provided iterator which raises RuntimeError too. A bientôt, Armin.

[pypy-dev] Leysin Sprint location

2015-02-09 Thread Armin Rigo
Hi all, If you're coming back to Leysin for the sprint at the end of February: warning, the main entrance to the two chalets Ermina was moved from the upper chalet to the lower chalet. In case you need it, here's a map showing how to go to the lower chalet (red marker) when you're standing in

Re: [pypy-dev] could it be that cpyext is faster than python + cffi?

2015-02-14 Thread Armin Rigo
Hi Matti, On 13 February 2015 at 14:46, Matti Picus matti.pi...@gmail.com wrote: I am close to releasing a blog post about numpy.linalg A comment: saying In order to test it out, download PyPy 2.5.0 or later, and install the pypy version of numpy in the conclusion is, in my opinion, both too

Re: [pypy-dev] GSoC 2015: Implement copy-on-write list slicing

2015-03-18 Thread Armin Rigo
Hi Tushar, In the past few years, we have found GSoC to be tricky to handle. As a result of this, we're likely to have a high bar for student acceptance this year. The main criteria will be whether you have already contributed to PyPy in a significant way. If you only come up with a GSoC

Re: [pypy-dev] Release 2.5.1 is close, please help test

2015-03-22 Thread Armin Rigo
Hi, On 22 March 2015 at 13:31, anatoly techtonik techto...@gmail.com wrote: Looks like there is a regression in pypy-2.5.0 since 2.4.0 in virtualenv https://github.com/pypa/virtualenv/issues/725 That's because pypy comes with a shared library since 2.5. I'll leave it to virtualenv people to

Re: [pypy-dev] Language Parser Ontology

2015-03-16 Thread Armin Rigo
Hi, On 16 March 2015 at 12:01, anatoly techtonik techto...@gmail.com wrote: Yes, but developing a new language in RPython requires choosing a parser first, no? No. Some of RPython's interpreters are only interpreters, without any parser. I'm not saying yours must be too, but in general we

Re: [pypy-dev] Compiling PyPy interpreter without GC

2015-03-21 Thread Armin Rigo
Hi Kunshan, On 20 March 2015 at 04:16, Kunshan Wang kunshan.w...@anu.edu.au wrote: (...) Others (including PyPy) build a whole new VM, doing everything from scratch. There are many high-performance VM projects like PyPy (LuaJIT, v8, JavaScriptCore, HHVM to name a few), but the most important

Re: [pypy-dev] Specialization for app level types

2015-03-21 Thread Armin Rigo
Hi Timothy, On 21 March 2015 at 01:43, Timothy Baldridge tbaldri...@gmail.com wrote: I'd like to add some optimization to app level types in Pixie. What I'm thinking of is something like this (in app level PyPy code): There was some experiment in the PyPy branch 'type-specialized-instances'

Re: [pypy-dev] UTF8 string passing in cffi and PyPy internal string optimizations

2015-03-21 Thread Armin Rigo
Hi, On 18 March 2015 at 15:49, Amaury Forgeot d'Arc amaur...@gmail.com wrote: 2015-03-17 18:27 GMT+01:00 Eleytherios Stamatogiannakis est...@gmail.com: Right now when PyPy receives a utf8 string (from a C function) it has to do 2 copies: 1. convert the cdata string to a pypy byte string via

Re: [pypy-dev] [pypy-commit] pypy vmprof: uh

2015-03-09 Thread Armin Rigo
Hi Fijal, On 9 March 2015 at 09:21, Maciej Fijalkowski fij...@gmail.com wrote: uh, I really don't think this checkin is correct (it was meant to seek to the end, not 2 bytes) -ec.code_info_file.seek(2, 0) +ec.code_info_file.seek(0, 2) Sorry, I may be missing something, but

Re: [pypy-dev] culling non-functional build slaves

2015-03-14 Thread Armin Rigo
Hi Yuriy, Looking at the situation Matti describes where some buildslaves have not been running for months, it seems that nobody was really interested in looking at the results enough to care about sending a mail to their owners... So while we do appreciate some buildslaves, and they are not a

Re: [pypy-dev] trsnslating pypy to another language besides C

2015-03-04 Thread Armin Rigo
Hi Joonas, To make sense out of it, you would need an ootype backend, as opposed to a lltype backend which generates C-like code. Google for Antonio's thesis High performance implementation of Python for CLI/.NET with JIT compiler generation for dynamic languages. But we killed support for

Re: [pypy-dev] Vectorizing numpy traces

2015-02-28 Thread Armin Rigo
Hi Bengt, On 25 February 2015 at 15:20, Bengt Richter b...@oz.net wrote: Maybe it's worth a re-think, if only to say no, we really mean no in the FAQ ;-) It's unclear to me if you're suggesting something more than adding a checkpointing system to stop and restart the process. It's a hack that

Re: [pypy-dev] Mod typing error

2015-03-28 Thread Armin Rigo
Hi Timothy, hi Ryan, On 28 March 2015 at 00:00, Ryan Gonzalez rym...@gmail.com wrote: I don't know much about RPython internals, but PyPy calls rpython.rtyper.lltypesystem.module.ll_math.math_fmod for modulus operations on floats. Yes, % on floats is not supported. You should use math.fmod()

Re: [pypy-dev] RFC: Copy-on-write list slices

2015-01-23 Thread Armin Rigo
Hi Mike, On 20 January 2015 at 05:26, Mike Kaplinskiy mike.kaplins...@gmail.com wrote: https://bitbucket.org/mikekap/pypy/commits/b774ae0be11b2012852a175f4bae44841343f067 has an implementation of list slicing that copies the data on write. (The third idea from

Re: [pypy-dev] EuroPython?

2015-04-11 Thread Armin Rigo
Hi, On 11 April 2015 at 11:29, Antonio Cuni anto.c...@gmail.com wrote: my plan was to submit a talk about profiling/optimizing, possibly together with fijal if he comes (but I didn't do yet :)). Probably the talk which suits best for talking about the general status is Romain's one? I just

Re: [pypy-dev] Which pypy with =3.3 Python compatibility

2015-04-14 Thread Armin Rigo
Hi Ludovic, On 13 April 2015 at 19:03, Ludovic Gasc gml...@gmail.com wrote: FYI, I'm trying to implement monotonic timer in PyPy3.3 during PyCON sprint code, Benoît Chesneau finds me an example: Fwiw, clock_gettime() and similar functions are already present in PyPy2 in the module

Re: [pypy-dev] Porting PyPy/rpython to Python 3

2015-04-20 Thread Armin Rigo
Hi Laura, On 20 April 2015 at 12:45, Laura Creighton l...@openend.se wrote: Sounds to me as if you are talking youself into it. ;) I'm not. I'm talking myself into thinking it would be the most approachable route (which can of course be wrong). But I'm not looking forward to what would come

Re: [pypy-dev] Porting PyPy/rpython to Python 3

2015-04-20 Thread Armin Rigo
Hi Laura, On 20 April 2015 at 11:53, Laura Creighton l...@openend.se wrote: I worry that this will be slow. Slow at which level? The final speed of some translated PyPy should not be influenced, but maybe translation itself can become slower. But then it would be good motivation to do

Re: [pypy-dev] Porting PyPy/rpython to Python 3

2015-04-20 Thread Armin Rigo
Hi Ronan, On 19 April 2015 at 19:49, Ronan Lamy ronan.l...@gmail.com wrote: Well, I think that the only sane way to port something as big as RPython is to do it incrementally - by getting tests to pass on 3 one subpackage at a time. The parts that are ported will have to be written in mixed

Re: [pypy-dev] Porting PyPy/rpython to Python 3

2015-04-20 Thread Armin Rigo
Hi Laura, On 20 April 2015 at 12:18, Laura Creighton l...@openend.se wrote: I was worried about translation speed. Ok. Then yes, I think there should be little intrinsic reason for it to be slower (apart from some bytes/unicodes changes, which should not be too important in this case), and it

Re: [pypy-dev] [pypy-commit] pypy default: Detect objects with h_tid==-42

2015-04-22 Thread Armin Rigo
Hi Maciej, On 22 April 2015 at 08:59, Maciej Fijalkowski fij...@gmail.com wrote: Are you sure this is unsigned? IMO I've seen '0xffd5' or something like that. As far as I can tell, the C code contains the declaration Signed h_tid;. So I would guess that hdr['h_tid'] returns a signed

Re: [pypy-dev] Allegro64 buildslave disappeared

2015-04-25 Thread Armin Rigo
Hi, On 25 April 2015 at 01:32, Maciej Fijalkowski fij...@gmail.com wrote: This can be resolved on the slave level, not on master level Yes, you can stop (disconnect) the slave, and then restart it. I never really understood the Stop buttons on the buildbot web pages, because some of them seem

Re: [pypy-dev] How to embed PyPy when there's no filesystem?

2015-04-25 Thread Armin Rigo
Hi Tom, On 25 April 2015 at 01:32, Maciej Fijalkowski fij...@gmail.com wrote: On Sat, Apr 25, 2015 at 1:13 AM, t...@twhanson.com wrote: Thanks for the idea. I played with the sandboxed version and it looks like it has potential. It's not necessarily the only option. A sandboxed process

Re: [pypy-dev] [pypy-commit] pypy default: Detect objects with h_tid==-42

2015-04-23 Thread Armin Rigo
Hi Alex, On 22 April 2015 at 19:31, Alex Stewart foo...@gmail.com wrote: Sorry, I couldn't help noticing this: if sys.maxsize 2**32: offset = tid 0x # 32bit 0x is not 32 bit, it's 16 bit.. Should that be 0x instead? No, this 32bit comment

Re: [pypy-dev] How to embed PyPy when there's no filesystem?

2015-04-28 Thread Armin Rigo
Hi Tom, On 28 April 2015 at 19:56, t...@twhanson.com wrote: Correction: non-functional without the *peer* class VirtualizedSandboxedProc Modern PyPy versions try to get some environ variables, at least as documented in rpython/doc/logging.rst. It makes the do_ll_os__ll_os_getenv() method

Re: [pypy-dev] How to embed PyPy when there's no filesystem?

2015-04-30 Thread Armin Rigo
Hi Tom, On 30 April 2015 at 00:21, t...@twhanson.com wrote: 1) Am I correct in assuming that these are imports? Yes. 2) Can these be eliminated? These opens are problematic in the absence of a file system. Try running pypy with the -s option. Likely, it doesn't remove them all; you have

Re: [pypy-dev] How to embed PyPy when there's no filesystem?

2015-04-27 Thread Armin Rigo
Hi Tom, On 27 April 2015 at 18:10, t...@twhanson.com wrote: We can't hard-code the scripts into the binary becuase their purpose is to adapt behavior to new configurations. Because of this the scripts will be read from an external source and then executed. This is what makes the the

Re: [pypy-dev] (no subject)

2015-05-04 Thread Armin Rigo
Hi Laura, hi all, On 4 May 2015 at 05:27, Steven D'Aprano st...@pearwood.info wrote: Mario Reingart has been trying to internationalise CPython since at least 2012. Fwiw, I found a 2012 text that says since 2010. I'm absolutely +1 on the idea. I recall my own experience as a child: learning

Re: [pypy-dev] PyPy on Windows 7: Icon file for pypy.exe

2015-05-04 Thread Armin Rigo
Hi Eun, On 4 May 2015 at 09:58, Eun Che eun.ch...@gmail.com wrote: I wished to contribute via Bitbucket fork, but i'm so new to that, don't know how to do. So I had to send this mail. Thanks! Can you give us a link that explains how to embed this icon inside pypy.exe? Maybe it's just a

Re: [pypy-dev] PyPy on Windows 7: Icon file for pypy.exe

2015-05-04 Thread Armin Rigo
Hi all, On 4 May 2015 at 16:44, Ryan Gonzalez rym...@gmail.com wrote: You can use rcedit: I found the official way described here: http://doc.qt.io/qt-4.8/appicon.html . Interestingly, Windows looks like the simplest of all the platforms described there. The rc tool (unlike rcedit) comes

Re: [pypy-dev] Internationalization Proposal (was Re: (no subject))

2015-05-05 Thread Armin Rigo
Hi Mariano, On 5 May 2015 at 09:57, Mariano Reingart reing...@gmail.com wrote: I'll try to clone PyPy too, I think it could be even easier to internationalize, as it is pure python and no C API should be changed, but please correct me if I'm wrong. It's easier in some ways, but harder in

Re: [pypy-dev] [pypy-commit] pypy default: The gdbm library is not thread-safe. Add a global lock.

2015-05-07 Thread Armin Rigo
Hi Fijal, On 6 May 2015 at 23:15, Maciej Fijalkowski fij...@gmail.com wrote: I was thinking, maybe instead we can add a feature to cffi don't release the GIL and use that there? (it would be faster for example) It would not work here: one problem is that gdbm_*() functions set the global

Re: [pypy-dev] Internationalization Proposal (was Re: (no subject))

2015-05-05 Thread Armin Rigo
Hi Mariano, On 5 May 2015 at 20:21, Mariano Reingart reing...@gmail.com wrote: Or using a pure python implementation already in the stdlib? https://hg.python.org/cpython/file/2.7/Lib/gettext.py Ah, yes. This comes with potential performance issues, but let's not focus on performance to start

Re: [pypy-dev] Could PyPy be embeded running in sanbox?

2015-05-15 Thread Armin Rigo
Hi Yicong, No, PyPy cannot be embedded running sandbox. The way we present embedding is by using the cffi module on the Python code; but this module is not available at all in a sandboxed PyPy (as it allows random invalid things to occur). If you really want to use the sandbox, you need to

Re: [pypy-dev] How to convert python string to C char*?

2015-05-14 Thread Armin Rigo
Hi Yicong, (CC to the cffi mailing list) On 14 May 2015 at 05:02, Yicong Huang hengha@gmail.com wrote: We had a python function that return a string value. The function will callback in C code. The below is an example of the code: @ffi.callback(char *(char *, char *)) def strconcat(x,

<    2   3   4   5   6   7   8   9   10   11   >