#ruby - 05 January 2018
« Back 1 day Forward 1 day »
[03:06:56] al2o3-cr: >> require 'objspace'; ObjectSpace.each_object(Exception.singleton_class).to_a
[03:08:50] al2o3-cr: >> require 'objspace'; ObjectSpace.each_object(Exception.singleton_class).to_a.new
[03:37:23] mikhael_k33hl: Anyone using concurrent-ruby? I have this script: https://gist.github.com/marzdgzmn/d317e286d4cc4a087c3d811d252f6300 and it doesn't seem to work, only outputs 'printing . . .'
[03:49:11] Radar: mikhael_k33hl: according to the code in concurrent-ruby that should work... but I can't get it to work either. Taking a look.
[04:24:18] Radar: mikhael_k33hl: issue is because you're doing this: https://gist.github.com/marzdgzmn/d317e286d4cc4a087c3d811d252f6300#file-gistfile1-txt-L5
[04:24:35] Radar: line 5 there is combining the string "time" with the Time object time, which Ruby can't do.
[04:26:01] Radar: mikhael_k33hl: this code works: https://gist.github.com/radar/8125a3a8f6d88f73e6d6e7b4f4452820
[05:08:14] Radar: [15:43:06] <Radar> mikhael_k33hl: and if you give me money I'll tell you how I figured it out :D
[05:09:03] Radar: And I've provided a solution that works and I'm happy to provide an explanation too, but only one of these things is free.
[05:10:52] mikhael_k33hl: Radar: No, I meant I've run your code, tried printing out the "OMG" part but it isn't doing it
[05:13:22] mikhael_k33hl: Radar: haha, tried running it via ruby ./test.rb it only prints out printing . . .
[15:21:21] soahccc: Does anyone use acme-client with Ruby? It recently stopped working in that everything I try to do results in timeouts. That is with most recent acme-client 0.6.2. I thought maybe the API url changed or something but it seems like it just stopped a month ago
[16:05:37] soahccc: Any idea how to debug this? I can't communicate with a specific host (letsencrypt API) but only from within ruby and only from this machine... I just started pry, require net/http and do a SSL get on the same exact target, one is working normally, one is timing out. I can curl it though. There is no firewall action going on. I'm confused :(
[16:22:38] soahccc: nchambers: https://gist.github.com/2called-chaos/810009183783743ac23b602437133058
[16:23:39] soahccc: Because if I resolv the IP before it works (except SSL mismatch ofc but the connection establishes)
[16:24:24] soahccc: The thing is I can Net::HTTP get other domains that also have A & AAAA records :<
[16:25:44] nchambers: what is the output of `curl -sSvo /dev/null https://acme-v01.api.letsencrypt.org` ?
[16:26:51] soahccc: nchambers: https://gist.github.com/2called-chaos/21af9c9464be7ab3cefa799764f3cbfb
[16:29:52] elomatreb: You might try a different Ruby HTTP library, I know there is one that uses curl internally so you can get the same behavior
[16:30:48] soahccc: elomatreb: since I use acme client I guess I can use anything that faraday supports
[16:32:38] havenwood: soahccc: Of the supported adapters Patron is a libcurl wrapper. I thought they already supported Typhoeus as well but it seems not fully yet.
[16:50:00] soahccc: Thanks guys :) I use patron now. I wouldn't bet on it but I think the old way broke after a dist-upgrade or something.
[22:04:56] mrush: im using logger, and when i use it within a method, nothing gets written to the log, and strangely nothing can write to it after the method either. termbin.com/ngne works, termbin.com/5b2d demonstrates the issue. am i doing something incorrectly within the method definition?
[22:20:35] mrush: i dont need to pass $log into the method as a parameter, right? since it is global...
[22:33:08] icy`: mrush, https://stackoverflow.com/questions/6338908/ruby-difference-between-exec-system-and-x-or-backticks
[22:55:19] mrush: icy: thanks a million. yeah, i forgot about rickhull's chart showing all the ways to spawn a process