Dne 1.12.2014 v 11:04 Martin Vidner napsal(a):
On Tue, Nov 25, 2014 at 04:56:50PM +0100, Ancor Gonzalez Sosa wrote:
A first prototype of the systemd journal reading module is available at: https://github.com/ancorgs/yast-journal [...] I implemented the classes for retrieving and processing the journal entries as pure ruby classes living in /lib. But I'm not sure if it's a good decision. Wouldn't it be better to implement them as a module so it can be accessed from other programming languages?
I prefer native Ruby libraries.
+1
Those other languages are just Perl. We also have Python bindings which are unmaintained.
IMHO in the long term we should get rid of all other languages and use Ruby as the only language. This is a legacy from the old YCP based Yast, the YCP-killer obviously could not convert the non-YCP code... The non-Ruby code makes everything more difficult, e.g. we cannot simply generate test code coverage, it requires different testing framework, we cannot use the same tools like code-climate or rubocop for code quality checks, debugging is very difficult (you cannot debug the Perl calls from Ruby and even starting a debugger is not trivial as y2base is a binary, not a regular Ruby script)... Access from other languages was nice when we used our proprietary language (YCP) as the main language, with Ruby it's not that important IMHO. And if somebody really needs access from other languages we should use some common solution, for example DBus which can be used even from shell (a side note to a different topic: this could provide kind of CLI...). -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org