#ruby - 25 March 2018
« Back 1 day Forward 1 day »
[02:37:29] pilne: I'm a little bit confused: https://gist.github.com/LamentConfiguration/58c6237d6d5b167e54703faeb9e4318d
[10:57:14] foxxx0: hey, i have a sinatra "classic" app, that is using datamapper (i know...). due to the deprecation of Fixnum/Bignum it gives warnings here: https://github.com/datamapper/do/blob/master/data_objects/lib/data_objects/pooling.rb#L149
[10:57:48] foxxx0: seeing as datamapper upstream seems to be dead, i'd like to monkey patch that initialize function from within my app, but i'm not sure how to do that
[10:59:03] foxxx0: or: how do i specify in my Gemfile that a gem should be retrieved from a git subfolder?
[10:59:16] foxxx0: they have all their gems in subfolders in their repo: https://github.com/datamapper/do
[11:00:05] foxxx0: i created a fork and patched the offending file but i don't now how to tell bundler that "do_postgres/do_postgres" is inside that "do" repo
[15:27:19] Nobun: some one of you here suggested to use mruby instead of ruby if I want to embed ruby in my application.
[15:27:58] Nobun: I'd like to know if those advantages (in terms of easier embedding) are still valid if you use mruby static library WITHOUT using ruby/rake/minirake
[15:28:37] Nobun: becouse my project need to use cmake as build system (or, eventually, scons, but not rake) since it uses qt5 framework
[16:11:39] Nobun: darix: I mean that usually (if I understood correctly) mruby is thinked to create applications wich embeds ruby, using ruby/rake/minirake to build the application
[16:12:14] darix: and then tell my app's build system. "look for the mruby library" "look for mruby header files"
[16:13:13] Nobun: yeah. I will use another approach, instead, but it is almost the same (I will include mruby in my source tree and let mruby build itself then add the library to my application)
[16:14:19] Nobun: why? I think it is not a nasty thing. Simply build mruby with mruby/rake than use cmake/scons to build the rest. You can setup cmake and scons in order to do it.
[16:15:17] Nobun: my question is more about how mruby ensures less "headaches" to developers than ruby itself when coming to possible issues on managing library in the application
[18:00:34] Nobun: darix: sorry but I didn't understand (intree libraries are a maintanance burden)... I don't understand what "burden" means in this context, very sorry
[18:16:21] darix: Nobun: lets use openssl as an example. lets say you copy that code into your app. now the next security update comes around. Instead of fixing just one system copy ... which then would give the fixed library to all apps using openssl. you fix N copies of the library. and it also means you need to track upstream fixes to learn which change is actually a security fix. hint: not every upstream marks them
[18:29:07] MonicleLewinsky: I'm trying to use this library in a Rails controller:https://github.com/rest-client/rest-client and I'm getting an error that I think means that my 'require' statement is wrong: cannot load such file -- rest-client
[18:29:37] Nobun: darix: now I understood. You surely got a shot. But I have good reason to inherit some external libraries in my source
[18:31:34] Nobun: those are mruby and lua 5.2 (however it is a desktop application and not a net application)
[18:33:44] darix: Nobun: so if you feel like support intree copies ... you should check for system libraries first and fallback to intree libraries.
[18:36:04] Nobun: for lua I had a reason why I added it. Becouse I choosed to use lua 5.2 and the lua C api I use is that one. It was a choice to avoid possible issues on linking on a newest library (even if lua usage is very very minimal in my application)
[18:36:36] phaul: MonicleLewinsky: try requiring from irb/pry see if that works. If that works then rails runs in a different environment than what you expect. My bet is on that you need bundle install.
[18:36:58] Nobun: for mruby the only reason is becouse it is hard to figure that mruby can be installed in a system by default. However letting check it could be a nice solution
[18:40:59] Nobun: yeah this could be an idea, but I am afraid since 5.2 is a bit old lua release and usually the system version could be at least 5.3
[18:41:38] Nobun: I'd like void to avoid possible compile issues, but I can allow this chance and see if my code is compatible with 5.3
[18:42:46] darix: because the security maintenance burden is on you if upstream doesnt supply patches for 5.2 anymore e.g.
[18:43:48] Nobun: it is used to scan and update the information about extra packages that are available
[18:47:42] Nobun: 23 + 126 = 149 <==> those are the total lines where lua api is used (only two files in my source actually use lua api - if you exclude lua state initialization and finalizing)