arigato changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end ) | use cffi for calling C | mac OS and Fedora are not Windows
jcea has quit [Remote host closed the connection]
themsay has quit [Read error: Connection reset by peer]
speeder39_ has quit [Quit: Connection closed for inactivity]
fling has joined #pypy
dansan has quit [Ping timeout: 248 seconds]
dansan has joined #pypy
forgottenone has joined #pypy
_whitelogger has joined #pypy
ceridwen has quit [Remote host closed the connection]
_whitelogger has joined #pypy
alawrence has joined #pypy
alawrence has quit [Client Quit]
alawrence has joined #pypy
Ai9zO5AP has joined #pypy
alawrence has quit [Ping timeout: 256 seconds]
inhahe has quit [Ping timeout: 246 seconds]
dddddd has quit [Remote host closed the connection]
mvantellingen has quit [Ping timeout: 252 seconds]
_whitelogger has joined #pypy
mvantellingen has joined #pypy
<kenaan> arigo copystrcontents-in-rewrite c08ec5828388 /rpython/jit/: Finish the logic for CPUs that don't have good support for load_effective_address: rewrite.py em...
tsaka_ has quit [Remote host closed the connection]
tsaka_ has joined #pypy
mvantellingen has quit [Ping timeout: 252 seconds]
mvantellingen has joined #pypy
lritter has joined #pypy
<kenaan> arigo copystrcontents-in-rewrite 101b83933f94 /rpython/jit/backend/arm/opassembler.py: Fix for arm
<kenaan> arigo copystrcontents-in-rewrite fd181ce8809f /: close branch, ready for merge
<kenaan> arigo default 77c16f38a6e2 /rpython/jit/: hg merge copystrcontents-in-rewrite Remove copystrcontent and copyunicodecontent in the backends. Instead, replace...
<arigato> fijal: ^^^ reviewed and merged
antocuni has joined #pypy
forgottenone has quit [Quit: Konversation terminated!]
forgottenone has joined #pypy
_whitelogger has joined #pypy
ctismer has quit [Ping timeout: 252 seconds]
ctismer has joined #pypy
lauren has quit [Ping timeout: 258 seconds]
lauren has joined #pypy
alexge50 has joined #pypy
<alexge50> Hi, i am trying to embed pypy into c++. I have found this page: http://doc.pypy.org/en/release-2.5.x/embedding.html but I need to be able to get objects and interact with objects like you can with cython. is there any way to do that?
<arigato> alexge50: the latest version of that page is http://doc.pypy.org/en/latest/embedding.html
<arigato> i.e. it's very old and deprecated
<alexge50> alright, makes sense. so there isn't any "new" way to embed into c or c++?
<arigato> yes, there are
<arigato> see the url above, which mentions cffi
<arigato> that's for C
<arigato> for c++ we recommend cppyy (https://cppyy.readthedocs.io/en/latest/) but I don't know if that supports embedding or not
<alexge50> alright, but that's to call c from python
<alexge50> right?
<arigato> no, cffi is both directions
antocuni has quit [Ping timeout: 244 seconds]
<arigato> (that's only C, not C++)
<alexge50> so this page that you sent transpiles pypy code into c?
<alexge50> then you can call it as a shared object?
_whitelogger has joined #pypy
<arigato> it's not possible to transpile Python source code to C. Some other projects do that with a very restricted subset of Python. CFFI is just a way to embed a full pypy inside a regular .dll/.so that you can use from a bigger application
<alexge50> makes sense. in my initial message i made a type cpython* i want to embed pypy inside my c++ application like i can with cpython api. i can access objects from there and call them (not a dll, but the function itself)
<alexge50> is there any way i could do that?
<arigato> if you mean "does the PyPy emulation of 'PyObject *' support embedding", the answer is no
<alexge50> ah, that's a bummer :(
<alexge50> thanks for the help!
<arigato> PyPy can emulate 'PyObject *' (slowly) but only for the extending case
<arigato> with cffi you have basically a much, much simpler way to do that and that works for both extending and embedding and for both pypy and cpython, but you can't use 'PyObject'
<arigato> the drawback is only that you need to wrap your head around a very different approach :-)
<alexge50> i really needed that, as i am using python in my program as a scripting language for compute heavy things
<alexge50> i also need to introspect the function (type annotations) to update the ui
<simpson> You could consider using a language designed for embedding. You could consider rewriting your application's control, so that the majority of the application is in host language Python and that C++ is the language being bound.
<arigato> just saying, these are all things you can also do with cffi, but you need to learn the new way (not to mention, PyObject emulation on pypy is slow)
<alexge50> i will look more into cffi, thanks for the help
<arigato> you're welcome
dddddd has joined #pypy
_whitelogger has joined #pypy
jacob22 has quit [Read error: Connection reset by peer]
jacob22 has joined #pypy
mattip has quit [Ping timeout: 248 seconds]
mattip has joined #pypy
forgottenone has quit [Ping timeout: 272 seconds]
mvantellingen has quit [Ping timeout: 252 seconds]
mvantellingen has joined #pypy
mattip has quit [Ping timeout: 244 seconds]
mattip has joined #pypy
forgottenone has joined #pypy
forgottenone has quit [Quit: Konversation terminated!]
xcm has quit [Killed (orwell.freenode.net (Nickname regained by services))]
glyph has quit [Excess Flood]
jacob22 has quit [Read error: Connection reset by peer]
glyph has joined #pypy
xcm has joined #pypy
jacob22 has joined #pypy
forgottenone has joined #pypy
<kenaan> mattip default 70b04c922db4 /pypy/doc/whatsnew-head.rst: document merged branch
trfl has quit [Quit: ZNC - http://znc.in]
trfl has joined #pypy
forgottenone has quit [Quit: Konversation terminated!]
tsaka_ has quit [Ping timeout: 248 seconds]
tsaka_ has joined #pypy
tsaka_ has quit [Read error: Connection timed out]
tsaka_ has joined #pypy
speeder39_ has joined #pypy
<mattip> fijal: I enabled github-pages for the new site, it is available at https://pypy.github.io/pypy-website/
<mattip> I am thinking about rewriting the text content so it is generated from markdown,
<mattip> using pelican
antocuni has joined #pypy
lritter has quit [Ping timeout: 268 seconds]
jacob22 has quit [Read error: Connection reset by peer]
jacob22 has joined #pypy
_whitelogger has joined #pypy
tsaka_ has quit [Ping timeout: 248 seconds]
antocuni has quit [Ping timeout: 268 seconds]