Activity Graph

Page 1 of 3 | Next »


[14:58:02] mikhael_k33hl: has joined #ruby
[15:00:59] mikhael_k33hl: al2o3-cr: hey man, how you doin?
[16:08:54] mikhael_k33hl: Quit: Page closed


[07:20:50] mikhael_k33hl: has joined #ruby
[07:21:32] mikhael_k33hl: I have a module Marz::Rsync.run, how do I mock it so I can test that it receives the correct paramters when invoked?>
[07:21:50] mikhael_k33hl: https://docs.ruby-lang.org/en/2.0.0/MiniTest/Mock.html Seems to mock the method directly
[08:35:57] mikhael_k33hl: rindolf: https://gist.github.com/marzdgzmn/f4c423327d56bfe37afea617d39d7152 Nope, trying to test if the method is receiving the correct arguments though
[08:37:43] mikhael_k33hl: rindolf: pretty new to ruby and minitest, can you give me an example?
[08:46:16] mikhael_k33hl: rindolf: hmmm, tried this one https://gist.github.com/marzdgzmn/f4c423327d56bfe37afea617d39d7152 still can't make it work. Why am I getting the error: NoMethodError: undefined method `to_sym' for #<Marz::Rsync::Result:0x00000000019918c0> when I've mocked it?
[10:24:53] mikhael_k33hl: rindolf: sorry about the late reply man, something came up that I needed to attend to
[10:43:00] mikhael_k33hl: Why am I getting a `undefined method 'to_sym'` for #<Marz::Rsync::Result:0x000000000124dd98> https://gist.github.com/marzdgzmn/518836865851d148abbdfc00e136bf01
[10:43:21] mikhael_k33hl: I've stubbed my command module to return a mocked object
[11:09:14] mikhael_k33hl: Do you have to indicate the parameters to a stubbed method?
[11:22:31] mikhael_k33hl: Tried mocking my module method via mock.expect(Marz::Rsync.run, result, ['/foo1', 'root@', ['-a']]) but I'm getting an error: ArgumentError: wrong number of arguments (given 0, expected 2..3)
[11:37:13] mikhael_k33hl: I've selected minitest when I setup my gem, is there a way I can change it to rspec?
[15:13:31] mikhael_k33hl: rindolf: nah, I've switched from minitest to rspec now
[15:13:40] mikhael_k33hl: rindolf: hopefully I can make it work with rspec
[15:14:08] mikhael_k33hl: rindolf: thanks man . . just can't seem to make the stub/mock work with modules I guess
[15:14:33] mikhael_k33hl: rindolf: I guess minitest is for hardcore ruby programmers hehe
[15:16:25] mikhael_k33hl: what's a good rspec video from beginner to advance?
[15:23:52] mikhael_k33hl: g-: I'll take a look, it's just video tutorials, based on my experience, gets your hands dirty asap, hehe
[16:04:25] mikhael_k33hl: Why am I getting a syntax error for a freshly generated spec_helper.rb from bundle gem
[16:04:45] mikhael_k33hl: https://dpaste.de/yM1w
[16:07:25] mikhael_k33hl: apeiros_: Sorry about that, https://gist.github.com/marzdgzmn/c3d7af36c00e52387d50ae12df050e2a
[16:09:13] mikhael_k33hl: hmm, wait, let me see . . . it's the only file I have in my atom project view
[16:10:31] mikhael_k33hl: by the way, have you guys tried the pragmatic studio ruby/rails course? care to share your thoughts? is it good? :)
[16:15:38] mikhael_k33hl: Quit: Page closed


[10:11:27] mikhael_k33hl: has joined #ruby
[10:11:49] mikhael_k33hl: Line 48: https://github.com/jbussdieker/ruby-rsync/blob/master/lib/rsync/change.rb `send(prop)`, can someone tell me what it does?
[10:15:17] mikhael_k33hl: Radar: Oh okay, thanks for clarifying that one. First time stumbling on send() :)
[19:16:55] mikhael_k33hl: Will it be okay to publish a gem that is based on another one? like you just added a feature to it or changed a section?
[19:17:26] mikhael_k33hl: al2o3-cr: what's ofc?
[19:17:53] mikhael_k33hl: oh okay, thanks
[19:18:14] mikhael_k33hl: elomatreb: nah, I don't think the owner wants to add the functions/features though
[19:18:41] mikhael_k33hl: https://github.com/jbussdieker/ruby-rsync/issues/18
[19:21:15] mikhael_k33hl: thanks, I'll do that and make some changes according to my needs hehe
[19:24:11] mikhael_k33hl: nah, I'll place mine on a different namespace, just wanted to create a gem honestly. haha
[19:25:59] mikhael_k33hl: al2o3-cr: nah I don't
[19:26:15] mikhael_k33hl: al2o3-cr: why? can I use that for rsync?
[19:30:21] mikhael_k33hl: al2o3-cr: https://linux.die.net/man/3/libuuid this?
[19:30:47] mikhael_k33hl: what would I use libuuid for?
[19:31:30] mikhael_k33hl: Oh, you mean if I was to create a gem.
[19:31:37] mikhael_k33hl: Sorry about that, hehe.
[19:32:38] mikhael_k33hl: al2o3-cr: right. however, I need to be able to retrieve stats information of an rsync job which I can't using the current rsync gem
[19:34:46] mikhael_k33hl: al2o3-cr: Uhhhm, not really but if you know how, that'd be great
[19:34:54] mikhael_k33hl: will save me time hehe
[19:37:00] mikhael_k33hl: al2o3-cr: I'll hold you on that. and thanks
[19:43:53] mikhael_k33hl: is there a spec.before(:suite) alternative for minitest?
[20:12:34] mikhael_k33hl: Quit: Page closed


[12:56:39] mikhael_k33hl: has joined #RubyOnRails
[12:57:02] mikhael_k33hl: How do I log in rails production mode? tried Rails.logger.info, but it doesn't seem to log in log/production.log
[12:59:53] mikhael_k33hl: ariejan: I can see config.log_level = :debug, but nothing that point to log to production.log even though I can see some logs there
[13:04:30] mikhael_k33hl: https://gist.github.com/marzdgzmn/c5146d9b9e83fb321c19233168d2e64b So there's no default logger in ruby rails?
[13:57:04] mikhael_k33hl: Quit: Page closed


[04:59:48] mikhael_k33hl: has joined #RubyOnRails
[05:00:07] mikhael_k33hl: Can you guys direct me to an article or guide pertaining good model creation?
[05:19:59] mikhael_k33hl: sevenseacat: Yeah, where should I go to get started?
[06:28:42] mikhael_k33hl: How do i generate models with associations?
[06:31:28] mikhael_k33hl: or will it best to make the models manually?
[06:32:24] mikhael_k33hl: sevenseacat: So just generate model then edit it?
[06:32:37] mikhael_k33hl: In that case, what happens to the migrations automatically generated as well?
[06:34:01] mikhael_k33hl: okay so generate -> edit -> then migrations
[06:35:04] mikhael_k33hl: sevenseacat: So how do I update the migration after I edit the model?
[06:36:35] mikhael_k33hl: So when I generate model User, it will create a user migration. Then I edit User for associations. Can I just run rails generate migration User?
[06:36:45] mikhael_k33hl: Will it generate a new migration based on the the modified model?
[06:37:09] mikhael_k33hl: How should it be done?
[06:40:40] mikhael_k33hl: Oh, so manually edit the migration too
[06:40:46] mikhael_k33hl: let me give it a try
[06:41:42] mikhael_k33hl: sevenseacat: so first I generate a model without the associations right?
[06:42:56] mikhael_k33hl: okay thanks, let me give it a try
[07:43:56] mikhael_k33hl: Tried to run rails generate model, but why does my model doesn't have the right fields/attributes? https://gist.github.com/marzdgzmn/cac840acd0a87b8c955e8bf29b949428
[07:47:44] mikhael_k33hl: Oh okay. So regardless of what you used, either has_one and belongs_to, in the migration file, it will add only the belongs_to field to the appropriate model?
[07:52:10] mikhael_k33hl: sevenseacat: So I have the models: Hog, Supplier, Feed, and PigPen. I want to create an association for Hog belongs_to: supplier, has_many:feeds, has_one: PigPen
[07:56:58] mikhael_k33hl: can't seem to find the rails g migration command for that: https://edgeguides.rubyonrails.org/association_basics.html
[07:58:05] mikhael_k33hl: I'd like to create a new migration for the associations
[07:58:36] mikhael_k33hl: I run `rails generate model #{model}` for each models. Now I want to create a migration for their associations
[07:59:07] mikhael_k33hl: I simply run `rails generate migration add_hogs_to_pen`?
[07:59:13] mikhael_k33hl: then edit the generate file?
[08:10:50] mikhael_k33hl: Okay, I run `rails generate migration add_hog_to_pig_pen hog:references` now i have :https://gist.github.com/marzdgzmn/9c745e19d08748fd03c789da5f36ea7d Should I just add a has_many: to my hog model manually?
[08:15:17] mikhael_k33hl: sevenseacat: thanks mate
[12:07:29] mikhael_k33hl: Quit: Page closed


[13:44:16] mikhael_k33hl: has joined #RubyOnRails
[13:45:48] mikhael_k33hl: How do I generate a production database? whenever I run rake db:create, it only generate development and test databases
[14:02:19] mikhael_k33hl: nzst: thanks, I got that working now, have you encountered this issue though? Permission denied - bs_fetch:atomic_write_cache_file:open (Errno::EACCES) I'm running on ruby2.4/rails5.2
[14:07:28] mikhael_k33hl: Currently reading that, can't see how they fixed it
[14:17:19] mikhael_k33hl: nzst: how do I get rid of bootsnap?
[14:17:38] mikhael_k33hl: oh remove from Gemfile, I see
[14:21:23] mikhael_k33hl: I have config.public_file_server.enabled = true but I still get the error The asset "application.css" is not present in the asset pipeline.
[14:26:34] mikhael_k33hl: rake tmp:clear and rake assets:precompile did it
[14:27:29] mikhael_k33hl: App 4359 output: [c99ad2d2-1c94-4e4b-b623-d288989b255c] Completed 500 Internal Server Error in 26ms (ActiveRecord: 1.3ms) App 4359 output: [c99ad2d2-1c94-4e4b-b623-d288989b255c] App 4359 output: [c99ad2d2-1c94-4e4b-b623-d288989b255c] ActiveRecord::StatementInvalid (SQLite3::ReadOnlyException: attempt to write a readonly database: INSERT INTO "users" ("provider", "uid", "email", "token", "refresh_token", "created_at", "upd
[14:30:38] mikhael_k33hl: nzst: yeah, that'd be a good idea, new to rails and find it a bit complicated though
[15:08:26] mikhael_k33hl: nzst: thanks I'll give it a read
[15:08:30] mikhael_k33hl: has joined #ruby
[15:08:45] mikhael_k33hl: When using pry, how do you exit from pry as well as the ruby script you are debugging?
[15:20:42] mikhael_k33hl: apeiros: thanks
[15:24:43] mikhael_k33hl: Quit: Page closed


[17:45:27] mikhael_k33hl: has joined #RubyOnRails
[17:45:54] mikhael_k33hl: there's this method gibbon.lists(list_id).members.create(body: {email_address: "foo@bar.com", status: "subscribed", merge_fields: {FNAME: "First Name", LNAME: "Last Name"}}). However, I want to iterate through a hash to pass in the key and value of merge_fields, how do I do that?
[17:47:58] mikhael_k33hl: I'm getting an error: https://gist.github.com/marzdgzmn/bfa544acbeaa96523ee82a7b2fc19bbe
[17:49:50] mikhael_k33hl: Andr3as: the line with the keyword 'end'
[17:52:23] mikhael_k33hl: Andr3as: https://gist.github.com/marzdgzmn/523890b44862bb3a21dd92a5b587bbec is working though
[18:08:54] mikhael_k33hl: Andr3as: bit a hard to do that as it is an API, let me try though
[19:30:27] mikhael_k33hl: Andr3as: thanks, I'll give it a try
[20:07:00] mikhael_k33hl: Quit: Page closed


[12:32:13] mikhael_k33hl: has joined #RubyOnRails
[12:32:29] mikhael_k33hl: What's the best way of defining a environment variable containing sensitive information for ruby on rails 5?
[12:33:59] mikhael_k33hl: Is this still the convention? https://gist.github.com/marzdgzmn/5dbb3b2af7bc13c62312cf31b0f1a5e6
[20:31:49] mikhael_k33hl: Quit: Page closed


[19:00:37] mikhael_k33hl: has joined #ruby
[19:02:50] mikhael_k33hl: has joined #RubyOnRails
[19:03:25] mikhael_k33hl: I'm currently reading this: http://railsapps.github.io/rails-environment-variables.html. And on some part it said to find the line: config.assets.version = '1.0' but I couldn't find it though, what is it for anyway?
[19:13:46] mikhael_k33hl: nzst: it seems that the guide I'm reading is old, where should I place config.before to initialize my environment variables?
[19:32:15] mikhael_k33hl: Quit: Page closed


[05:30:10] mikhael_k33hl: has joined #ruby
[05:30:40] mikhael_k33hl: regarding this file? https://gist.github.com/marzdgzmn/9d8173a0db527e54b5d2a9ec899c253c Is this wrapper gem something that wraps the export that will only be usable for ruby? I can't seem to see the exported variables in linux
[05:35:15] mikhael_k33hl: havenwood: like `export -p` to see environment variables
[05:36:14] mikhael_k33hl: havenwood: isn't exporting making the variables an environment variables for linux itself?
[05:37:27] mikhael_k33hl: havenwood: Oh I see now, the variables were exported in the ruby environment
[05:40:01] mikhael_k33hl: havenwood: I see. I'm still a little bit confused about it though as I've been used to export environment variables in linux just running the export command, hehe
[05:40:59] mikhael_k33hl: the exports were run under the /bin/sh context though
[05:42:34] mikhael_k33hl: Okay, so how do you create a env var for linux?
[05:46:11] mikhael_k33hl: and you will see it when you run `printenv` right? Though I'm slowly getting it. So the wrapper/ruby has exec ruby "$@" which I've read pertaing to backtraces, is that correct?
[05:46:22] mikhael_k33hl: Or is there another use for that that I'm now aware of?
[05:46:46] mikhael_k33hl: Cause what I'm looking for perhaps is how those exports were sent to the ruby environments? cause they are used in a rails application
[05:48:50] mikhael_k33hl: havenwood: yep, I did it has the lines source "/usr/local/rvm/gems/ruby-1.9.3-p547/environment" ; exec ruby "$@"
[05:49:04] mikhael_k33hl: I guess that' what redirecting the exports eh?
[05:49:41] mikhael_k33hl: havenwood: I did, and it should the lines with the exported variables
[05:54:30] mikhael_k33hl: havenwood: I see, will look more into it, thanks man
[09:20:59] mikhael_k33hl: Quit: Page closed


[05:25:06] mikhael_k33hl: has joined #ruby
[05:25:49] mikhael_k33hl: I'm using sinatra and I have an init.rb inside a folder. How do I require or include all other files inside the folder within my init.rb? Dir[__dir__].each {|file| require file} doesn't seem to work
[05:30:31] mikhael_k33hl: I guess I'll go with Dir[File.basename(File.join(__dir__, '*.rb'))].each do |file| , thought there was a more elegant way to do it. :(
[05:30:42] mikhael_k33hl: typo, that was suppose to be :)
[05:39:52] mikhael_k33hl: has left #ruby: ()


[06:27:22] mikhael_k33hl: has joined #ruby
[06:27:37] mikhael_k33hl: Is there an article/documentation for best practices pertaining model creation in Ruby?
[20:20:40] mikhael_k33hl: Ping timeout: 260 seconds


[08:26:17] mikhael_k33hl: has joined #ruby
[08:26:32] mikhael_k33hl: Does the Signal.kill(0) acts the same as kill -0 in linux?
[08:38:03] mikhael_k33hl: What's the equivalent of kill -0 in ruby? Process.kill(0) doesn't seem to work the same
[08:45:49] mikhael_k33hl: jhass: whether its running
[08:46:08] mikhael_k33hl: jhass: just like how kill -0 works in linux
[08:47:10] mikhael_k33hl: jhass: no, just to check if it is running or it is owned by another process
[08:48:41] mikhael_k33hl: jhass: so when it returns 1, what does it mean?
[08:54:50] mikhael_k33hl: jhass: Oh, I see, only 'false' and 'nil' is considered false in ruby
[09:31:54] mikhael_k33hl: Where can I see what errors a method or module would raise?
[13:13:13] mikhael_k33hl: Is there an instance method that I can override that will be run no matter how the application exits(crash)?
[13:14:31] mikhael_k33hl: leitz: exceptions?
[13:14:40] mikhael_k33hl: leitz: can you direct me to an article or documentation please?
[13:14:56] mikhael_k33hl: leitz: I need my program to cleanup even if the server crashes
[13:15:08] mikhael_k33hl: leitz: I mean if the app crashes
[15:20:36] mikhael_k33hl: Quit: Page closed


[04:44:45] mikhael_k33hl: Ping timeout: 260 seconds


[07:58:47] mikhael_k33hl: has joined #ruby
[09:42:39] mikhael_k33hl: My wait_while block seems to be not working or am I even using it right? I'm getting the error `[]=': no implicit conversion from nil to integer (TypeError) in my code: https://gist.github.com/marzdgzmn/4266a16d78cd3baf8b3ba76fa0db3ae2
[15:26:56] mikhael_k33hl: I'm using ruby 2.0, it appears that the MonitorMixin#wait_while is not working as it is not blocking when the block is true. code: https://gist.github.com/marzdgzmn/4266a16d78cd3baf8b3ba76fa0db3ae2


[03:02:48] mikhael_k33hl: has joined #ruby
[09:23:19] mikhael_k33hl: Quit: Page closed


[06:53:06] mikhael_k33hl: has joined #ruby
[06:54:11] mikhael_k33hl: Why am I getting an error: No live threads left. Deadlock? (fatal) when trying to wait(join) for a thread: https://gist.github.com/marzdgzmn/19e7bed23a86c95bf9a47f0202bd877b
[06:56:28] mikhael_k33hl: dminuoso: what do you mean?
[07:11:50] mikhael_k33hl: phaul: Yeah, I was using that before, I was thinking of doing this manually since this is just a bit simple script, and just to dirty my hands with concurrency :)
[07:14:17] mikhael_k33hl: dminuoso: what's stm? software transactional memory?
[07:25:19] mikhael_k33hl: just a bit tempting to make this code work though hehe
[09:21:45] mikhael_k33hl: Ping timeout: 260 seconds


[01:54:07] mikhael_k33hl: has joined #ruby
[01:54:30] mikhael_k33hl: How do you format a string like I want to create a table with columns and populate its rows as a report before sending it as an email.
[02:03:23] mikhael_k33hl: havenwood: I was thinking of having it like: https://gist.github.com/marzdgzmn/aba35001e7a3260efd10f3f70fbabf6a
[02:04:32] mikhael_k33hl: havenwood: That is data I will be retrieved from a database(sqlite3). I'm trying to implement a function to send it to me in my email.
[02:06:09] mikhael_k33hl: havenwood: Uhhhm, it serves as a report so I just need to know the dates and status. If I need to do anything, it will be done manually by me logging in to the server where the script it :)
[02:06:54] mikhael_k33hl: If I format the string in ruby using formatting flags(e.g. "%20{ruby}".% ruby: "Idiosyncratic"), will it be formatted that way once I send it as an email?
[02:07:06] mikhael_k33hl: havenwood: Just so that it can be easily read
[02:07:25] mikhael_k33hl: havenwood: Nah, it'll be like 20 line tops, I'd rather have it in an email body
[02:08:43] mikhael_k33hl: oh I see, i'll try using html tags then
[02:18:34] mikhael_k33hl: havenwood: thanks, I"ll give JSON a try
[07:21:06] mikhael_k33hl: Quit: Page closed


[00:02:45] mikhael_k33hl: havenwood: heya! hahaha, I've looked into what you provided, but still looking something simpler like: https://www.tutorialspoint.com/ruby/ruby_sending_email.htm
[00:04:23] mikhael_k33hl: havenwood: The mail gem seems to be quite a project: https://github.com/mikel/mail. Forgot about Pony though, I'll take a look at it
[00:06:41] mikhael_k33hl: jenrzzz_: I will look into that, thanks
[01:38:38] mikhael_k33hl: I'm trying to test a class within a module. How do I instantiate it? I'm getting an error: "./mirror_notification.rb:46:in `<main>': uninitialized constant Report (NameError)"
[01:41:57] mikhael_k33hl: havenwood: I'm getting an error: "uninitialized constant "#{ModuleName}" (NameError)
[01:57:40] mikhael_k33hl: What text editors are you using guys? vim?
[02:08:28] mikhael_k33hl: mozzarella: haha, love the caption "literally the future of vim", I'll give this one a try :)
[09:28:06] mikhael_k33hl: Quit: Page closed


[05:12:42] mikhael_k33hl: has joined #ruby
[05:13:21] mikhael_k33hl: Am I implementing the product-consumer design pattern correctly in this ruby code? https://gist.github.com/marzdgzmn/8b5a9e996e814051d508a50bba5b31eb
[05:16:17] mikhael_k33hl: Sorry about that, https://gist.github.com/marzdgzmn/8b5a9e996e814051d508a50bba5b31eb
[05:17:19] mikhael_k33hl: baweaver: Oh, trying to do parallel IO tasks, 10 rsyncs at a time :)
[05:22:04] mikhael_k33hl: baweaver: thanks, I'll try using that instead
[05:33:28] mikhael_k33hl: baweaver: thanks mate, I'll look into it
[08:54:10] mikhael_k33hl: Ping timeout: 260 seconds
[23:57:38] mikhael_k33hl: has joined #ruby
[23:57:58] mikhael_k33hl: What's the best gem for generating reports and sending it as an email?


[06:42:51] mikhael_k33hl: has joined #ruby
[06:49:00] mikhael_k33hl: If thread.kill is not recommended, what's the best way to stop a thread?
[14:19:30] mikhael_k33hl: Ping timeout: 260 seconds


[01:42:13] mikhael_k33hl: has joined #ruby
[01:46:25] mikhael_k33hl: I have a script that uses concurrent-ruby, however, all threads exit even when it hasn't finished what it is doing yet. How do I make my script wait for all threads to finish before exiting?
[01:49:08] mikhael_k33hl: havenwood: https://gist.github.com/marzdgzmn/00c308f2e9cc964f7ff5d8c80e9ed21b
[01:53:04] mikhael_k33hl: havenwood: tried adding that, let me look closely, something isn't right though
[01:55:17] mikhael_k33hl: havenwood: Oh yeah, tried adding that, still exits though
[01:56:07] mikhael_k33hl: havenwood: can you suggest any other gem where I can create threads and run jobs asynchronously and then collect the results of those jobs afterwards?
[01:58:33] mikhael_k33hl: havenwood: hmmm, that methods seem to be invoked when the appp exits
[02:00:05] mikhael_k33hl: havenwood: yup, but what I need is for my app to not exit before all threads finish their job
[02:07:54] mikhael_k33hl: havenwood: Okay so basically, what my script/app needs is to run rsync to different upstreams, there will be a `n` number of rsync so I want to run the processes concurrently in a maximum of 10 threads
[02:08:32] mikhael_k33hl: havenwood: So I got a pool of threads(10), with queue size of 20. I want my app to exit and generate a report about the rsync processes when they are all done.
[02:09:15] mikhael_k33hl: havenwood: to answer the question, I need the threads to stay alive. When no more jobs are in queue, and all jobs are done, then the script can exit. :)
[02:11:58] mikhael_k33hl: havenwood: maybe I should just use sleep and read scheduled_task_count on the pool and wait till it gets 0 before exiting. hmmm
[02:27:45] mikhael_k33hl: Oh, I don't think i'tll work though hehe
[02:33:38] mikhael_k33hl: havenwood: thanks mate, I'll look into it, not that familiar with threads and how to work with them in ruby . . .
[02:35:11] mikhael_k33hl: havenwood: Yeah, I will. Can you direct me to any article/blogs/reference abou threads in general or ruby thread handling?
[02:36:16] mikhael_k33hl: havenwood: I all boils down to java hehe
[02:37:21] mikhael_k33hl: havenwood: I'd like to pick your brain on this. If it is advised not to use threads, what are the alternatives?
[02:37:44] mikhael_k33hl: havenwood: Like when running a number of rsync processes
[02:39:40] mikhael_k33hl: havenwood: I'm starting off with 10, but I'll increae it depending on how much the system can handle I/O operations
[02:40:28] mikhael_k33hl: havenwood: parallel with rsync?
[02:42:24] mikhael_k33hl: havenwood: Not really, I'll take a look at that too. Gee, this project just got exciting haha
[02:44:24] mikhael_k33hl: havenwood: I would love to
[02:44:38] mikhael_k33hl: havenwood: okay man, thanks, see you later, enjoy your dinner
[02:49:10] mikhael_k33hl: Ping timeout: 260 seconds


[01:10:45] mikhael_k33hl: has joined #ruby
[01:13:54] mikhael_k33hl: How do I make a subclass inherit a class instance variable? https://gist.github.com/marzdgzmn/eba98eeeaff63e97779c49d0e7ebd28d
[02:14:55] mikhael_k33hl: How do I make my app wait for all threads to finish before terminating? https://gist.github.com/marzdgzmn/6d15987e51c04e41b8b5885eaf69866a
[03:01:45] mikhael_k33hl: Ping timeout: 260 seconds


[02:07:31] mikhael_k33hl: Quit: Page closed
[06:29:25] mikhael_k33hl: has joined #ruby
[06:29:47] mikhael_k33hl: I can't seem to raise a custom exception/error: https://gist.github.com/marzdgzmn/9814f23f38918f8af446a26254b0e98d
[06:30:29] mikhael_k33hl: line 65 is executed, but line 66 which raises and exception/error doesn't seem to be executed or it is but I'm not catching/rescuing it correctly
[07:56:48] mikhael_k33hl: I have a thread-safe array that I want to pass on a singleton that acts as an observer that should delete an element when the thread is done. How do I pass that array?
[08:01:08] mikhael_k33hl: apeiros: So it'll be pass by reference eh? thought it would be passed by copy
[08:04:08] mikhael_k33hl: dminuoso: i passes the reference to a right?
[09:22:12] mikhael_k33hl: Quit: Page closed


[08:02:15] mikhael_k33hl: Quit: Page closed
[17:25:14] mikhael_k33hl: has joined #ruby
[17:26:06] mikhael_k33hl: Using concurrent-ruby, when I call @pool.kill, docs says it'll call thread.kill to its threads, how do I handle that so my app could do something when that happens?
[18:26:04] mikhael_k33hl: apeiros: So basically, my app rsyncs files, and I can't seem(probably just a noob) to implement how to stop the rsync process(running in a thread) when the app gets restarted by systemd.
[18:26:45] mikhael_k33hl: http://ruby-concurrency.github.io/concurrent-ruby/file.thread_pools.html#Thread_Pool_Status_and_Shutdown


[02:11:38] mikhael_k33hl: has joined #ruby
[02:12:48] mikhael_k33hl: Anybody using concurrent-ruby gem? Are you guys having problems with @pool.kill too? I have this code: https://gist.github.com/marzdgzmn/8e15d57e58bc7c8b278fcc477b5e8d3d and killing the pool doesn't seem to work.
[03:05:25] mikhael_k33hl: Quit: Page closed


[00:42:05] mikhael_k33hl: How to handle Thread.kill?
[00:58:13] mikhael_k33hl: gizmore: I'm using concurrent-ruby and I want my threads to invoke a method before getting killed
[01:00:44] mikhael_k33hl: gizmore: https://github.com/ruby-concurrency/concurrent-ruby/blob/master/doc/thread_pools.md, it says here that when I shutdown the pool, it calls Thread.kill to its threads
[02:47:55] mikhael_k33hl: Ping timeout: 260 seconds
[03:02:06] mikhael_k33hl: has joined #ruby
[03:06:20] mikhael_k33hl: I'm trying to debug my ruby script which uses concurrent-ruby. I'm setting brekapoints via `binding.pry` but it's gibing me an error "before_session hook failed: ThreadError: can't be called from trap context /usr/share/rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/monitor.rb:187:in `lock' (see _pry_.hooks.errors to debug)"
[03:11:15] mikhael_k33hl: Ping timeout: 260 seconds
[05:15:18] mikhael_k33hl: has joined #ruby
[07:42:30] mikhael_k33hl: Ping timeout: 260 seconds