[#98621] Re: Function getlogin_r()'s protoype] — Bertram Scharpf <lists@...>
FYI,
3 messages
2020/06/02
[#98947] [Ruby master Feature#16986] Anonymous Struct literal — ko1@...
Issue #16986 has been reported by ko1 (Koichi Sasada).
66 messages
2020/06/26
[#98962] [Ruby master Bug#16988] Kernel.load loads file from current directory without '.' in path — misharinn@...
Issue #16988 has been reported by TheSmartnik (Nikita Misharin).
5 messages
2020/06/26
[#98969] [Ruby master Feature#16994] Sets: shorthand for frozen sets of symbols / strings — marcandre-ruby-core@...
Issue #16994 has been reported by marcandre (Marc-Andre Lafortune).
7 messages
2020/06/26
[#100117] [Ruby master Feature#16994] Sets: shorthand for frozen sets of symbols / strings
— matz@...
2020/09/25
Issue #16994 has been updated by matz (Yukihiro Matsumoto).
[ruby-core:98835] [Ruby master Feature#14722] python's buffer protocol clone
From:
muraken@...
Date:
2020-06-17 09:22:41 UTC
List:
ruby-core #98835
Issue #14722 has been updated by mrkn (Kenta Murata). I have a similar problem. I want to share raw memory among the different C extension libraries, such as numo-narray, red-arrow, numpy.rb, and pandas.rb. I intended to implement [PEP-3118](https://www.python.org/dev/peps/pep-3118/) like feature in Fiddle (See [ruby/fiddle#17](https://github.com/ruby/fiddle/issues/17) and [ruby/fiddle#18](https://github.com/ruby/fiddle/issues/18)), but it has not been done, yet. This feature is just related to C extension library layer, so Fiddle should be a suitable place to implement it. But it could not be done because we encountered the difficult issue: referring symbols in a C extension library from the other C extension library. We need to introduce functions like `PyObject_CheckBuffer` and `PyObject_GetBuffer` for realizing buffer protocol. If we introduce `rb_fiddle_check_buffer` and `rb_fiddle_get_buffer` in fiddle.so, there is no portable and legal way to refer them from the other C extension libraries. There are two ways to avoid this issue. 1. Introducing [libruby-fiddle.so](http://libfiddle.so) in Fiddle. This provides functions for C extension libraries. It is installed in the directory where [libruby.so](http://libruby.so) is located. 2. Implement buffer protocol features in Ruby's core. I guess the former way is very difficult because we let `gem install` put `libruby-fiddle.so` in the appropriate place. So it is better to provide buffer protocol in Ruby's core if possible. ---------------------------------------- Feature #14722: python's buffer protocol clone https://bugs.ruby-lang.org/issues/14722#change-86199 * Author: jsaak (jsaak jsaak) * Status: Open * Priority: Normal ---------------------------------------- Is there a way to implement, or even copy Python's buffer protocol in ruby? There is an article that describes the benefits quite well: https://jeffknupp.com/blog/2017/09/15/python-is-the-fastest-growing-programming-language-due-to-a-feature-youve-never-heard-of/ I did some work with machine vision, and the ability to manipulate images fast was also not realistic with ruby today. This could be another area where ruby could shine. Maybe this idea is worth a comment. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>