HNHacker News
TopNewBestAskShowJobs

autopoiesis

139 karma · joined August 25, 2017

submissionscomments
autopoiesis··on Warming is accelerating
I do not know if you are joking here, but I suspect many people do think indeed like this. It is simply astonishingly selfish and irresponsible. Individual actions together make up population trends, and minimizing meat consumption and energy waste are things that you can do that really would have a big impact in aggregate on our future environment.
autopoiesis··on TransferWise announces $280M investment
Can anyone say how TransferWise compares to CurrencyFair?
autopoiesis··on America has a monopoly problem
Archive link: http://archive.is/02i6P
autopoiesis··on Sorting with GPUs: A Survey
Also there's work towards a pure C++ abstraction layer for programming these accelerators, called SYCL [0]. It lets you define your compute kernels using normal C++ lambdas or functions, and then automatically infers the data dependencies to do the kernel execution. In particular, it provides an implementation of the C++ "Parallel STL" [1] (some intro slides at [2]), which in turn provides "execution policies" for various standard library functions, such as sorting. The aim is precisely the kind of thing you're talking about!

[0] I found a nice intro at https://blog.tartanllama.xyz/sycl/

[1] http://en.cppreference.com/w/cpp/experimental/parallelism

[2] https://www.khronos.org/assets/uploads/developers/library/20...

autopoiesis··on Pybind11 — Seamless operability between C++11 and Python
You're right about the CERN stuff, though recent efforts seem to have been made to split at least some of that out. I hope that it continues. I think, aside from anything else, that cling is a really cool project, and if it could be easily available more widely, that would be great.

I was being quite literal when I wrote "no need to maintain a compiled C++ part": of course, you probably do want to maintain /some/ extra layer! And, in that sense, I do think that cppyy lets you maintain just one set of bindings (not two); and, as in pybind11, the ultimate aim is to transparently translate any "vectors, or maps, or template arguments" into idiomatic Python: this is why cppyy has a 'Pythonization' API.

Perhaps there are just two slightly different niches: cppyy is good when you need more a interactive interface to C++, for prototyping or exploration (for example), because of its JIT nature; and pybind11 is good for building something more static in the longer term, and where you don't mind the cost of keeping the compiled part up to date with the relevant C++ API.

It's certainly an interesting space at the moment, and I do hope both projects keep the momentum up and keep innovating!

autopoiesis··on Pybind11 — Seamless operability between C++11 and Python
Indeed; I was using "derived" somewhat loosely. But I think there is certainly a visible lineage there. Indeed, pybind11 is much nicer than boost::python (and I did evaluate it for the future of the project I mentioned above).

However, the very nice feature of cppyy is that it does much (most?) of what pybind11 does, but it can also be completely on-the-fly, in the sense that it relies on the cling JIT interpreter. This means that there is absolutely no need to maintain a compiled C++ part for your bindings, and so the problem of keeping the interface up to date is greatly mitigated: the equivalent changes to match the interface when using cppyy are _much_ smaller.

Often, one maintains a "C++ interface" layer in one's Python bindings (which could be created by pybind11, boost::python, or SWIG, for example), with a pure Python shim layer on top of that. cppyy allows you to do away with this two-layer structure entirely; all you need is the shim, if you need anything at all.

autopoiesis··on Pybind11 — Seamless operability between C++11 and Python
Pybind is derived from boost::python, so it's not much different. I wrote a large Python binding in the past for a moving C++ library target, using boost::python, and keeping the C++ binding code up to date was a nightmare akin to maintaining a fork of any fast-moving project.

Try cppyy [1]. It's very nice, though quite fresh. It's used extensively (as far as I can tell) at CERN, and derives from their cling C++ JIT interpreter. Plus it does lots of nice automatic transformations to make a C++ API more pythonic.

[1] http://cppyy.readthedocs.io/en/latest/index.html

autopoiesis··on Pybind11 — Seamless operability between C++11 and Python
Also as teajunky notes below, cppyy (which was born out of PyROOT) is quite nice: http://cppyy.readthedocs.io/en/latest/
← PreviousPage 2 of 2