« Back to channel list

#ruby - 17 May 2019

« Back 1 day Forward 1 day »
[00:02:04] leitz: Anyone have insight into how Travis-CI the company is doing? I heard they were having issues. I love having code tested there but am pretty sure I can't keep them solvent.
[00:04:26] Nicmavr: has joined #ruby
[00:06:08] fredolinhares: has joined #ruby
[00:09:40] adam12: leitz: Haven't heard anything. I moved all my OSS Ruby to Circle, for no real reason other than using the Docker images vs Travis test matrix was easier.
[00:10:42] leitz: adam12, URL? Circle gives a lot of hits.
[00:10:48] leitz: And I loved that show, too.
[00:11:36] adam12: leitz: CircleCI. https://circleci.com/
[00:11:52] adam12: leitz: Here's one of my configs for Circle. https://github.com/adam12/rack-server-timing/blob/master/.circleci/config.yml
[00:12:19] adam12: I use Gitlab CI too, which is also great. I run my own worker.
[00:12:59] adam12: leitz: Most people don't get the show reference :)
[00:13:10] leitz: Yeah, GitHub being bought is a thing. I haven't built the energy or "want to" to move stuff to GitLab. Is GL still using Ruby?
[00:13:32] leitz: adam12, I'm old and watched some of the originals.
[00:13:40] adam12: leitz: Yeah, tho their worker/runner is in Golang.
[00:13:51] adam12: leitz: Pretty sure their frontend is Rails+Vue.
[00:14:13] leitz: Golang is pretty cool, just not as fun for me. I'd recommend people try it out.
[00:16:36] adam12: leitz: I write a mix of both, tho I definitely favour Ruby for a ton of stuff.
[00:17:27] adam12: leitz: I'm sitting here staring at the ruby 2.0 shipped with CentOS7 and longing to write this tooling in Go to skip the dependency. But Go+XML parsing is pain and Ruby+XML is bliss.
[00:17:59] leitz: I finally found a programmer job (Perl) and have tried to get myself to like it. A friend recommended another look at Go for system programming and I was doing a little of that.
[00:18:40] leitz: adam12, I'm of the opinion that most anything in XML is a pain. Though Nokogiri really helps.
[00:18:50] adam12: leitz: I'm partial to Oga :)
[00:19:09] leitz: Being able to ship a binary and no dependencies is nerdvana.
[00:19:28] leitz: Haven't looked at Oga, just getting back into Ruby. Like, as of a couple hours ago. :)
[00:19:40] fphilipe_: has joined #ruby
[00:19:52] jenrzzz_: has joined #ruby
[00:20:11] adam12: leitz: wb.
[00:21:41] adam12: Oga has no dependency on libxml2, which admittedly has been less of an issue since nokogiri shipped with it, but it was a source of pain in the past.
[00:21:43] leitz: adam12, thanks. The other way to resolve dependencies seems to be "put it on a web page". I did that with some Go code and it was nice. Well, the effect was nice, the code leaves a lot to be desired. Someone on windows says it's broken but I don't have a Winderz box to test on.
[00:22:10] leitz: Care for a funny non-Ruby story?
[00:22:18] zacts: has joined #ruby
[00:22:32] adam12: leitz: I'm all ears, lest the mods decide it's offtopic O_O
[00:22:51] leitz: They're usually pretty cool.
[00:23:33] leitz: I'm a Linux guy by trade. One day the security folks come in and require us to remove libxml2 from all RHEL boxes. I shook my head and said we didn't want to do that.
[00:24:08] leitz: Went back and forth but I was over ruled. Next time they told me to patch, I said. "Sorry, can't. Yum requires libxml2 and you made me remove it."
[00:24:22] leitz: They listened a little more after that.
[00:25:06] adam12: libxml2 definitely has it security bugs. In competition with ImageMagick, I heard.
[00:26:07] leitz: I'm still in the "Apprentice Coder" stage of life, even after years of trying. Haven't gotten that deep into much.
[00:26:35] leitz: Most places I've worked wait for the vendor patches.
[00:27:09] adam12: Write some more Perl and then apply retroactively for your grey-beard, I used Linux when Slackware shipped on 14 floppies badge. Bonus points if it's a web app and you deploy it to cgi-bin.
[00:28:10] leitz: plbbgh...my first linux came with the book "Slackware Unleashed" and a hand me down single speed Mitsumi cdrom on a 386.
[00:28:42] leitz: That was my advanced time, I trained on teletypes and 5 bit code for my military service.
[00:29:29] zacts: has joined #ruby
[00:29:55] adam12: Well just remember: Not being able to read yesterdays Perl isn't a sign of sinility. It's just Perl.
[00:30:42] leitz: I...uh...won't say what crosses my mind. It makes others look bad. I'm just happy to realize Ruby is still there.
[00:31:05] leitz: It was funny seeing some of Ruby's roots, though.
[00:32:12] tf2ftw: has joined #ruby
[00:32:15] jottr: has joined #ruby
[00:32:37] adam12: The Perl portion definitely shows through in some parts.
[00:37:01] leitz: Yup. I was reading something else and I think some of the Smalltalk (?) roots showed as well. Of course, I could be off, it's been a while.
[00:37:50] espinet: has joined #ruby
[00:52:47] doodlebug: has joined #ruby
[00:53:14] txdv: has joined #ruby
[01:00:08] zacts: has joined #ruby
[01:02:21] leitz: My first big "get back into Ruby" project will be to break everything. I need to make some code into an actual module and convert it to a web based thingy. Last time I tried the module route ti took me two weeks to get all the tests to pass.
[01:02:55] ur5us_: has joined #ruby
[01:06:13] espinet: has joined #ruby
[01:08:56] skryking: has joined #ruby
[01:14:19] espinet: has joined #ruby
[01:18:03] baweaver: Yeah, it was ImageTragic
[01:18:15] leitz: While I'm breaking things, is "free_trader" a decent Gem/Module name?
[01:18:27] leitz: Hey baweaver!
[01:24:49] octos: has joined #ruby
[01:29:57] haxx0r: has joined #ruby
[01:37:55] leitz: Enjoy all. Nappy time for me.
[01:46:50] ur5us: has joined #ruby
[01:50:07] fphilipe_: has joined #ruby
[02:00:55] tdy: has joined #ruby
[02:01:52] esrse: has joined #ruby
[02:06:17] doodleb48: has joined #ruby
[02:22:35] Swyper: has joined #ruby
[02:29:45] dsmythe: has joined #ruby
[02:33:23] jenrzzz: has joined #ruby
[02:44:02] jottr: has joined #ruby
[02:51:09] fphilipe_: has joined #ruby
[03:02:50] scapegoa_: has joined #ruby
[03:04:27] Kestrel-029: has joined #ruby
[03:04:41] wald0: has joined #ruby
[03:06:49] Guest46052: has joined #ruby
[03:09:51] braincrash: has joined #ruby
[03:17:29] jmcgnh: has joined #ruby
[03:18:51] duderonomy: has joined #ruby
[03:19:26] Nicmavr: has joined #ruby
[03:20:58] joast: has joined #ruby
[03:21:05] Swyper: has joined #ruby
[03:21:50] Swyper_: has joined #ruby
[03:23:05] fphilipe: has joined #ruby
[03:25:55] moei: has joined #ruby
[03:32:02] syndikate: havenwood, I am creating a server of out of WebRick::HTTPServer, ( I will be looking into making use of unix sockets soon). So right now I want to write all the logs into a file. The logger should log things in detail like for example in rails app
[03:41:31] ramfjord: has joined #ruby
[03:48:51] teej: has joined #ruby
[03:50:58] LtHummus: has joined #ruby
[03:54:18] doodlebug: has joined #ruby
[03:56:11] fphilipe: has joined #ruby
[04:04:26] Nicmavr: has joined #ruby
[04:12:31] Swyper_: has joined #ruby
[04:13:41] noobineer: has joined #ruby
[04:19:28] Kestrel-029: has joined #ruby
[04:22:02] altigraph: has joined #ruby
[04:22:57] jenrzzz: has joined #ruby
[04:36:46] laaron: has joined #ruby
[04:40:12] tdy: has joined #ruby
[04:45:17] envex: has joined #ruby
[04:45:56] jottr: has joined #ruby
[04:49:26] Nicmavr: has joined #ruby
[05:06:33] mistym: has joined #ruby
[05:06:33] mistym: has joined #ruby
[05:13:43] haxx0r: has joined #ruby
[05:16:56] sauvin: has joined #ruby
[05:19:08] dellavg_: has joined #ruby
[05:22:37] conta: has joined #ruby
[05:26:40] fphilipe: has joined #ruby
[05:32:37] ur5us_: has joined #ruby
[05:36:40] conta: has joined #ruby
[05:37:52] Swyper: has joined #ruby
[05:41:30] dsmythe: has joined #ruby
[05:50:31] bamdads: has joined #ruby
[05:52:30] aupadhye: has joined #ruby
[05:55:56] bamdads: has joined #ruby
[05:56:17] bamdads: has joined #ruby
[05:57:56] dionysus69: has joined #ruby
[06:00:53] kyrylo: has joined #ruby
[06:00:54] bamdads: has joined #ruby
[06:03:44] bamdads: has joined #ruby
[06:08:06] altigraph: has joined #ruby
[06:16:16] Dbugger: has joined #ruby
[06:19:06] LightStalker: has joined #ruby
[06:35:32] prestorium: has joined #ruby
[06:40:19] slackmare: has joined #ruby
[06:44:33] jenrzzz: has joined #ruby
[06:46:41] vondruch: has joined #ruby
[06:46:50] jottr: has joined #ruby
[06:54:38] TomyWork: has joined #ruby
[07:00:13] miskatonic: has joined #ruby
[07:19:25] lxsameer: has joined #ruby
[07:20:15] Nebros: has joined #ruby
[07:24:06] Nebros: good morning guys! i'm really new on ruby and to be honestly, i need it now only for one thing, opal. now i have installed ruby for windowsn, but how to install opal? i really can't find the way. :(
[07:27:08] Swyper: has joined #ruby
[07:28:10] jenrzzz: has joined #ruby
[07:30:31] bamdads: has joined #ruby
[07:31:41] bamdads: has joined #ruby
[07:33:56] bamdads: has joined #ruby
[07:36:41] haxx0r53: has joined #ruby
[07:38:19] blackmesa: has joined #ruby
[07:39:19] fphilipe: has joined #ruby
[07:45:50] bamdads: has joined #ruby
[07:48:23] ovnimancer: has joined #ruby
[07:51:53] djbkd: has joined #ruby
[07:52:10] laaron: has joined #ruby
[07:53:10] jenrzzz: has joined #ruby
[07:58:07] Jonopoly: has joined #ruby
[08:00:36] jottr: has joined #ruby
[08:08:54] laaron: has joined #ruby
[08:12:38] jefffrails35: has joined #ruby
[08:14:48] kapilp: has joined #ruby
[08:16:45] jefffrails35: has joined #ruby
[08:19:26] Nicmavr: has joined #ruby
[08:20:50] michael_mbp: has joined #ruby
[08:23:58] relyks: has joined #ruby
[08:27:16] Ekho: has joined #ruby
[08:27:22] alem0lars: has joined #ruby
[08:29:12] BH23: has joined #ruby
[08:29:47] _joes_: has joined #ruby
[08:31:50] alem0lars_: has joined #ruby
[08:32:24] bamdads: has joined #ruby
[08:34:33] Kestrel-029: has joined #ruby
[08:39:29] tjj: has joined #ruby
[08:45:00] tjr_: has joined #ruby
[08:45:34] bamdads: has joined #ruby
[08:48:05] michael_mbp: has joined #ruby
[08:49:08] ellcs: has joined #ruby
[08:49:55] ur5us: has joined #ruby
[08:59:32] BH23: has joined #ruby
[08:59:36] RougeR: has joined #ruby
[09:00:08] RougeRR: can i ask if this is bas practice
[09:00:21] RougeRR: ; @client.ping rescue false
[09:00:41] RougeRR: ignore the horrific styling, i was trying to show it on one line
[09:01:00] Ai9zO5AP: has joined #ruby
[09:01:01] tjj: has joined #ruby
[09:01:16] RougeRR: i dont have control over the @client code and it raises an exception when the client is not pingab;e
[09:02:46] jenrzzz: has joined #ruby
[09:04:31] Nicmavr: has joined #ruby
[09:05:41] ur5us: has joined #ruby
[09:08:31] tjr_: has joined #ruby
[09:17:49] jottr: has joined #ruby
[09:17:50] fphilipe: has joined #ruby
[09:20:00] ur5us: has joined #ruby
[09:25:01] silviu: has joined #ruby
[09:26:01] ur5us: has joined #ruby
[09:35:11] agent_white: has joined #ruby
[09:46:31] conta: has joined #ruby
[09:46:43] ta: RougeRR: The ruby style guide thinks so - https://github.com/rubocop-hq/ruby-style-guide#dont-hide-exceptions - You can maybe use implicit begin-blocks instead... something like `def ping; @client.ping; rescue StandardError; false; end`
[09:59:42] arup_r: has joined #ruby
[10:00:42] RougeRR: ta_, yeah ive seen that as well. and i know its not regarded as good style perse
[10:00:51] RougeRR: but what if its scoped within a block/method?
[10:01:09] RougeRR: most do seem to recommend the full block syntax, its just messy
[10:01:42] tjr_: has joined #ruby
[10:03:43] BH23: has joined #ruby
[10:05:33] noboruma: has joined #ruby
[10:05:54] DTZUZO: has joined #ruby
[10:09:16] ta: I've seen it used as a guard clause and it looks very clean
[10:09:44] ta: I'm personally a huge fan of the implicit begin-blocks
[10:13:39] Ai9zO5AP: has joined #ruby
[10:19:32] Nicmavr: has joined #ruby
[10:19:38] tjr_: has joined #ruby
[10:21:09] RougeRR: ta, yeah i can see what you mean
[10:21:25] RougeRR: tbh i think its a mistake of whoever made these clients
[10:21:34] RougeRR: a ping request should raise an exception imo
[10:21:42] RougeRR: it should give a string response or true/false
[10:31:16] laaron: has joined #ruby
[10:36:42] sagax: has joined #ruby
[10:51:34] Quintasan: has joined #ruby
[10:51:34] Quintasan: has joined #ruby
[10:58:06] jenrzzz: has joined #ruby
[10:58:52] Swyper: has joined #ruby
[11:01:59] fphilipe: has joined #ruby
[11:03:30] laaron: has joined #ruby
[11:03:49] jenrzzz: has joined #ruby
[11:05:09] blackmesa: has joined #ruby
[11:11:03] jottr: has joined #ruby
[11:11:32] Nicmavr: has joined #ruby
[11:17:45] aupadhye: has joined #ruby
[11:22:44] nowhereman: has joined #ruby
[11:25:04] fphilipe: has joined #ruby
[11:30:23] Kestrel-029: has joined #ruby
[11:33:28] VSpike: Was there a change in the way forking processes or IO pipes worked between 2.4.x an 2.5.x?
[11:35:15] laaron: has joined #ruby
[11:38:17] zapata: has joined #ruby
[11:40:46] BH23: has joined #ruby
[11:40:54] laaron: has joined #ruby
[11:41:50] doodleb71: has joined #ruby
[11:42:27] johnp: has joined #ruby
[11:42:44] banisterfiend: has joined #ruby
[11:59:02] nowhereman: has joined #ruby
[12:03:06] laaron: has joined #ruby
[12:13:25] duderonomy: has joined #ruby
[12:16:07] doodlebug: has joined #ruby
[12:18:36] banisterfiend: has joined #ruby
[12:31:07] duderonomy: has joined #ruby
[12:37:12] jacksoow: has joined #ruby
[12:40:02] doodlebug: has joined #ruby
[12:45:37] tf2ftw: has joined #ruby
[12:46:04] doodleb22: has joined #ruby
[12:58:10] leitz: has joined #ruby
[12:58:15] Dbugger: has joined #ruby
[12:59:09] ricekrispie: has joined #ruby
[12:59:25] Dbugger: has joined #ruby
[13:01:34] englishm: has joined #ruby
[13:09:37] jcalla: has joined #ruby
[13:10:20] Fusl: has joined #ruby
[13:11:30] regedit: has joined #ruby
[13:15:44] BH23: has joined #ruby
[13:25:05] jenrzzz: has joined #ruby
[13:30:54] doodleb8: has joined #ruby
[13:32:51] BH23: has joined #ruby
[13:36:55] doodleb77: has joined #ruby
[13:42:32] ramfjord: has joined #ruby
[13:43:47] tjj: has joined #ruby
[13:49:09] SeepingN: has joined #ruby
[13:54:21] matthewd: has joined #ruby
[13:55:28] kyrylo: has joined #ruby
[13:57:32] cow[moo]: has joined #ruby
[13:57:42] iNs: has joined #ruby
[14:05:20] apparition: has joined #ruby
[14:06:26] bdonnahue: has joined #ruby
[14:11:37] Nicmavr: has joined #ruby
[14:16:12] dsmythe: has joined #ruby
[14:17:33] jeremycw: has joined #ruby
[14:20:00] laaron: has joined #ruby
[14:21:17] zacts: has joined #ruby
[14:23:38] tf2ftw: has joined #ruby
[14:24:02] mkroman: has joined #ruby
[14:25:10] tf2ftw2: has joined #ruby
[14:26:33] Kestrel-029: has joined #ruby
[14:32:31] j`ey: has joined #ruby
[14:33:17] j`ey: hello, I have an array, and want to turn it into an array of arrays, with N elements in each
[14:33:23] j`ey: is there an easy way of doing that?
[14:33:35] BH23: has joined #ruby
[14:34:33] j`ey: each_slice looks like it might be what I need
[14:34:47] ytti: [3] pry(main)> [1,2,3,4,5,6].each_slice(2).to_a
[14:34:47] ytti: => [[1, 2], [3, 4], [5, 6]]
[14:36:08] zacts: has joined #ruby
[14:40:06] j`ey: lol what a horror: a.to_i(16).to_s(16).ljust(2, '0')
[14:40:38] dionysus69: has joined #ruby
[14:42:12] leman: has joined #ruby
[14:42:26] Rapture: has joined #ruby
[14:49:51] hays: has joined #ruby
[14:52:43] dsmythe_: has joined #ruby
[14:53:03] xco: has joined #ruby
[15:00:48] dionysus69: has joined #ruby
[15:10:07] polishdub: has joined #ruby
[15:10:10] digitalnomad: has joined #ruby
[15:12:00] laaron: has joined #ruby
[15:12:30] havenwood: j`ey: rjust?
[15:12:45] havenwood: ljust doesn't seem right (zeros on the right)
[15:14:46] ramfjord: has joined #ruby
[15:21:42] s3nd1v0g1us: has joined #ruby
[15:24:52] j`ey: havenwood: oh, nice spot
[15:24:55] bdonnahue: has joined #ruby
[15:25:25] jenrzzz: has joined #ruby
[15:26:49] eddof13: has joined #ruby
[15:27:44] sauvin: has joined #ruby
[15:29:19] havenwood: j`ey: I'm curious about the context. Seems it's already hex, so wouldn't just ljust suffice?
[15:29:40] havenwood: rjust*, haha
[15:29:47] j`ey: yeah probably :D
[15:30:00] j`ey: it's "0xN"
[15:30:36] havenwood: j`ey: you can do: s.hex
[15:30:52] havenwood: &>> '0xa'.hex
[15:31:00] rubydoc: # => 10 (https://carc.in/#/r/6xlx)
[15:32:12] sauvin: has joined #ruby
[15:33:40] havenwood: &>> '%02x' % '0xa'.hex
[15:33:41] rubydoc: # => "0a" (https://carc.in/#/r/6xly)
[15:33:52] havenwood: &>> format '%02x', '0xa'.hex
[15:33:52] eddof13: has joined #ruby
[15:33:52] rubydoc: # => "0a" (https://carc.in/#/r/6xlz)
[15:34:27] j`ey: havenwood: ah hnice, thanks
[15:36:17] Caerus: boi I went through a nasty rabbit hole. forgot I had installed the ubuntu rvm package and did rvm --implode
[15:37:03] Caerus: luckily stackoverflow came to the rescue again. In case anyone runs into it -> https://stackoverflow.com/questions/48431372/removing-broken-packages-in-ubuntu
[15:42:52] dsmythe: has joined #ruby
[15:44:15] hays: has joined #ruby
[15:44:32] ricekrispie2: has joined #ruby
[15:44:35] bamdads: has joined #ruby
[15:45:09] weteamsteve: has joined #ruby
[15:45:45] esp32_prog: has joined #ruby
[15:49:52] bdonnahue1: has joined #ruby
[15:53:43] sauvin: has joined #ruby
[15:54:16] tdy: has joined #ruby
[15:54:32] doodlebug: has joined #ruby
[16:02:23] orbyt_: has joined #ruby
[16:05:41] laaron: has joined #ruby
[16:09:08] reber: has joined #ruby
[16:19:31] bamdads: has joined #ruby
[16:22:32] hays: has joined #ruby
[16:26:32] Nicmavr: has joined #ruby
[16:26:55] DTZUZO: has joined #ruby
[16:27:02] esp32_prog: has joined #ruby
[16:28:53] haxx0r53: i have problems writing configuration object for my gem
[16:28:58] haxx0r53: Uploaded file: https://uploads.kiwiirc.com/files/0fd05cc8310c198c7c379cd36f6cf9e5/pasted.txt
[16:29:23] haxx0r53: Uploaded file: https://uploads.kiwiirc.com/files/8b61d579099157a45068915ce4e77593/pasted.txt
[16:29:27] haxx0r53: XmrTo.configure do |config|
[16:29:45] haxx0r53: i'm not sure why this isn't working as expected. (i stole the code from thoughtbots blog post)
[16:32:36] bougyman: https://github.com/imanel/websocket-rack that's super old.
[16:32:51] bougyman: It's a dep in an app I'm taking over. Any "standard" replacement for it?
[16:36:01] orbyt_: has joined #ruby
[16:37:19] bamdads: has joined #ruby
[16:38:50] duderonomy: has joined #ruby
[16:47:45] esp32_prog: has joined #ruby
[16:49:32] Iarfen: has joined #ruby
[16:55:05] zacts: has joined #ruby
[16:57:38] orbyt_: has joined #ruby
[16:59:57] fphilipe: has joined #ruby
[17:00:52] esp32_prog: has joined #ruby
[17:06:35] doodlebug: has joined #ruby
[17:07:31] ravenousmoose: has joined #ruby
[17:09:12] Renich: has joined #ruby
[17:11:57] SebastianThorn2: has joined #ruby
[17:13:36] SebastianThorn2: has joined #ruby
[17:13:45] Nebros: i'm really new on ruby and to be honestly, i need it now only for opal. i have installed ruby for windows, but how to install opal? i really can't find the way.
[17:14:33] dviola: has joined #ruby
[17:14:55] ravenousmoose: has joined #ruby
[17:16:00] SebastianThorn2: has joined #ruby
[17:18:19] SebastianThorn: has joined #ruby
[17:19:42] j`ey: has left #ruby: ()
[17:20:18] sameerynho: has joined #ruby
[17:24:00] hays: has joined #ruby
[17:26:18] havenwood: Nebros: Opal is a gem. Once you've installed Ruby, you can: gem install opal
[17:27:01] havenwood: Nebros: On Windows, you can install Ruby with the RubyInstaller for Windows, with the Chocolatey package manager or with the Windows Subsystem for Linux (WSL).
[17:28:00] havenwood: Nebros: Opal does work from Windows.
[17:28:46] xco: i’m trying to find the number of ‘sets’ any element of an array is in. i have examples here that’d best explain what i need help with. https://gist.github.com/xcobar/fcdbcd49a26adcf574c2cf7a2a076852
[17:29:00] xco: i started implementing it. but sort of stuck at the moment
[17:36:05] englishm: has joined #ruby
[17:36:17] esp32_prog: has joined #ruby
[17:36:36] doodleb56: has joined #ruby
[17:41:32] Nicmavr: has joined #ruby
[17:43:28] Fusl: has joined #ruby
[17:49:04] Renich_: has joined #ruby
[17:51:23] fredolinhares: has joined #ruby
[17:52:18] havenwood: xco: I think you meant to invert one of the `array & set1`s!
[17:52:19] havenwood: They're the same order on both sides of the ||
[17:53:12] havenwood: xco: I think `any?` would be nice here in place of `size.positive?`, which is pretty nice too
[17:53:40] xco: havenwood: yeah i thought of any? not quite sure how it’ll play in here
[17:53:44] xco: let me check the documenation
[17:53:50] havenwood: I commented on your Gist with another approach.
[17:54:01] havenwood: I also renamed everything! :P
[17:55:46] bamdads: has joined #ruby
[17:56:38] Kestrel-029: has joined #ruby
[18:00:30] xco: hahaha i’ll look in a while. trying to force myself to use any?
[18:00:35] salerace: has joined #ruby
[18:01:32] havenwood: xco: I left another comment with a #sum alternative to #reduce
[18:01:57] xco: am i wasting my time trying to figure out how to do it with any? :D
[18:02:18] havenwood: xco: #any? / #include? is a common pattern
[18:02:27] xco: aaaa i’m on track
[18:02:27] Nebros: havenwood: thank u so much. i look now for the next step how to use, i prefer to read now first the manual before i ask how to. :)
[18:02:34] salerace: has joined #ruby
[18:03:05] xco: havenwood: i wrote this without thininking https://gyazo.com/e779c9af45e5411b0f20949ee42f6b06
[18:03:12] xco: now i’ll do some thinking
[18:04:06] xco: that’s bad actually
[18:05:29] xco: havenwood: oh i see you also used any an include, but properly
[18:05:47] xco: havenwood: thanks
[18:08:23] ramfjord: has joined #ruby
[18:10:43] doodlebug: has joined #ruby
[18:11:07] xco: havenwood: i have a few questions though
[18:11:30] xco: i’m using your first method
[18:11:40] xco: this is what you did
[18:11:47] xco: CATAGORIES = [ANIMALS, FRUIT]
[18:11:52] xco: that’ll make it array of arrays
[18:11:57] havenwood: yup, exactly
[18:12:17] xco: which means #include? can work even on nested arrays and find elements right?
[18:12:19] havenwood: and the reason to extract it to a constant is to only create that array of arrays one time, when the class is initially defined
[18:12:44] havenwood: xco: #include? doesn't dig recursively, it only checks the top level
[18:12:59] havenwood: &>> [[42]].include? 42
[18:13:00] rubydoc: # => false (https://carc.in/#/r/6xms)
[18:13:08] xco: so then i’m confused
[18:13:14] xco: then you method shouldn’t work but it does
[18:13:23] xco: because the categories array looks like this
[18:13:28] xco: [["cat", "dog"], ["apple", "orange"]]
[18:13:48] xco: and you’re doing items.any? on the block
[18:14:31] havenwood: xco: But at that point it's `category` not `categories`.
[18:14:55] havenwood: &>> [[42]].first.include? 42
[18:14:56] rubydoc: # => true (https://carc.in/#/r/6xmt)
[18:15:11] xco: the above makes sense
[18:15:22] havenwood: &>> [[42]].any? { |n| n.include? 42 }
[18:15:23] rubydoc: # => true (https://carc.in/#/r/6xmu)
[18:15:37] xco: this is what’s tripping me :P
[18:15:44] havenwood: bad variable naming there ^, I meant `a` not `n`.
[18:15:52] xco: got it!
[18:16:14] xco: ok got it
[18:16:39] havenwood: xco: The idea behind it being a list of lists is that you can add a new category to categories and it'll *just work* without changing any logic
[18:17:28] xco: the next question is about next :P
[18:17:56] havenwood: xco: you could alternatively write that: next(count + 1)
[18:17:56] xco: the next there is like “skip if the following condition is not true?”?
[18:18:17] xco: no no no
[18:18:18] havenwood: xco: yes, onto the next iteration
[18:18:26] xco: i’m talking about the keyword “next”
[18:18:33] xco: i know about Integer#next
[18:19:09] havenwood: ah, you can pass the keyword the return value for the current iteration, and it'll go right onto the next
[18:26:13] salerace_: has joined #ruby
[18:32:21] xco: havenwood: i discovered something intereting
[18:32:23] xco: https://gyazo.com/31f20ebd25ec898c547b37b1a2ff4367
[18:32:37] xco: “next” is being called on “dog”
[18:34:44] jenrzzz: has joined #ruby
[18:38:13] deepredsky: has joined #ruby
[18:40:20] Hanmac: has joined #ruby
[18:42:35] orbyt_: has joined #ruby
[18:51:38] salerace: has joined #ruby
[19:01:56] havenwood: xco: "doh" not "dog" :P
[19:04:25] nowhere_man: has joined #ruby
[19:05:44] buzzy: has joined #ruby
[19:09:44] buzzzzzzy: has joined #ruby
[19:15:43] buzzy: has joined #ruby
[19:20:43] lalit: has joined #ruby
[19:22:30] gix: has joined #ruby
[19:26:32] Nicmavr: has joined #ruby
[19:47:41] nowhereman: has joined #ruby
[19:49:40] arup_r: has joined #ruby
[19:56:37] Nicmavr: has joined #ruby
[19:56:50] eddof13: has joined #ruby
[19:59:43] Inline: has joined #ruby
[20:00:53] al2o3-cr: has joined #ruby
[20:04:21] jenrzzz: has joined #ruby
[20:04:32] PettanShoutaKun: has joined #ruby
[20:05:25] PettanShoutaKun: I open a connection with the RestClient::get() method and stuff.... but I noticed it like... doesn't close? Do I manually have to close it? Can I? I just want to make sure this connection doesn't stay open.
[20:05:41] PettanShoutaKun: I feel like maybe I'm being super dumb or confused about what the RestClient actually is/does
[20:09:31] zacts: has joined #ruby
[20:11:37] laaron: has joined #ruby
[20:12:12] standardname: has joined #ruby
[20:12:24] standardname: Hey... I'm inheriting a large project that was written in Ruby
[20:12:28] standardname: I've never used Ruby
[20:12:34] standardname: What resources do you all recommend to get up to speed
[20:13:04] kyrylo: has joined #ruby
[20:19:39] jenrzzz: has joined #ruby
[20:21:28] tjj: has joined #ruby
[20:25:13] jrafanie: has joined #ruby
[20:30:27] salerace: has joined #ruby
[20:33:17] salerace: has joined #ruby
[20:34:01] laaron-: has joined #ruby
[20:36:39] salerace: has joined #ruby
[20:39:19] ur5us: has joined #ruby
[20:42:48] cow[moo]: has joined #ruby
[21:00:29] SuperLag: has joined #ruby
[21:01:47] sina: has joined #ruby
[21:03:58] laaron: has joined #ruby
[21:04:26] Iambchop: standardname: there's a list of books linked from the channel topic: https://goo.gl/wpGhoQ
[21:06:52] zacts: has joined #ruby
[21:07:18] cow[moo]: has joined #ruby
[21:09:55] Renich: has joined #ruby
[21:22:41] tjj: has joined #ruby
[21:25:14] doodlebug: has joined #ruby
[21:30:15] rsmith31415: has joined #ruby
[21:31:11] rsmith31415: has left #ruby: ()
[21:32:16] rsmith31415: has joined #ruby
[21:34:10] Renich: has joined #ruby
[21:37:19] doodleb66: has joined #ruby
[21:44:48] ur5us: has joined #ruby
[21:49:04] orbyt_: has joined #ruby
[21:50:47] jenrzzz: has joined #ruby
[21:56:00] rsmith31415: has left #ruby: ("WeeChat 1.4")
[21:56:18] tf2ftw: has joined #ruby
[21:57:08] tf2ftw: has joined #ruby
[21:57:54] tf2ftw: has joined #ruby
[21:58:41] tf2ftw: has joined #ruby
[21:59:26] tf2ftw: has joined #ruby
[22:03:25] dsmythe: has joined #ruby
[22:06:04] dar123: has joined #ruby
[22:10:38] rsmith31415: has joined #ruby
[22:16:53] zacts: has joined #ruby
[22:21:07] altious: has joined #ruby
[22:25:04] dar123: has joined #ruby
[22:30:53] Iambchop: PettanShoutaKun: under the hood rest-client get uses the block form of net-http start: https://github.com/rest-client/rest-client/blob/f450a0f086f1cd1049abbef2a2c66166a1a9ba71/lib/restclient/request.rb#L722
[22:35:42] ur5us: has joined #ruby
[22:38:23] ur5us: has joined #ruby
[22:54:58] ur5us: has joined #ruby
[23:00:06] zacts: has joined #ruby
[23:00:15] Exuma: has joined #ruby
[23:12:15] fphilipe: has joined #ruby
[23:18:14] doodlebug: has joined #ruby
[23:23:52] miskatonic: has joined #ruby
[23:31:21] salerace: has joined #ruby
[23:32:52] Exuma: has joined #ruby
[23:34:27] tjj: has joined #ruby
[23:36:38] ellcs: has joined #ruby
[23:49:28] standardname: has joined #ruby
[23:51:08] jenrzzz: has joined #ruby
[23:51:08] standardnamee: has joined #ruby
[23:54:46] ramfjord: has joined #ruby
[23:55:34] banisterfiend: has joined #ruby
[23:56:33] tjj: has joined #ruby
[23:58:36] Renich: has joined #ruby