#ruby - 07 July 2018
« Back 1 day Forward 1 day »
[15:35:26] Naeblis: Hi. I received a programming assignment with a Ruby-specific test suite, I haven't been able to get the test suite running, as I keep getting what seem to be syntax errors? Details here: https://bpaste.net/show/34408a9f320d
[15:37:24] Naeblis: Perhaps a versioning issue? Since this test was distributed to people, I'll safely assume it was tested at least once. Maybe something specific on my system is causing this to fail?
[15:40:10] havenwood: But if you call them specs, when they ask "do you have specs for this project" you can say, "Yes."
[15:40:41] Naeblis: New error: NameError: undefined local variable or method `stop_all_commands' for RSpec:
[15:41:30] Naeblis: This is a programming assignment for a job interview, so I'm not sure if I should. :)
[15:43:49] havenwood: Naeblis: It looks like you're running the tests correctly. I'm not sure why their tests don't run successfully.
[15:44:41] leitz: Naeblis, thank you for being honest about why you're looking at the code. Some people aren't that honest.
[15:45:04] havenwood: I've done a lot more testing in Minitest than in RSpec. I'm a tourist in RSpec land.
[15:46:45] Naeblis: hmm, I'll share some generic code, omitting the things that relate to the problem itself. That would perhaps make things more clear.
[15:48:53] leitz: I don't consider my code a great source for learning (except by negative example), but until someone else comes along you might want to look at: https://github.com/makhidkarun/rb_tools/blob/master/spec/planet_spec.rb
[16:00:21] leitz: Go is pretty cool but I'm self-taught and not smart enough for it. C is much the same for me.
[16:01:18] leitz: Ruby is the first language that inspires me to want to come home and code more. Other languages don't inspire me the same.
[16:01:45] leitz: My theory is that the more I code the better I get. So I code Ruby to generate more code, and hopefully get better.
[16:04:40] leitz: Well, I work on Linux for a living. Have for a couple decades. Until systemd I didn't really expect to change; I love Linux.
[16:05:20] Zarthus: Using an operating system is different than writing code. One is a tool to achieve your hobby with, the other is a hobby and a profession :P
[16:06:42] leitz: I get to look at the coders and suggest they learn to code; I'd be out of a job. :)
[16:17:52] leitz: Yeah, I caught a lot of gruff from Ruby folks when I asked about 1.8.7. Got tired of it after several months. Ruby and systems don't mix; the community drops support for what pays the bills.
[16:20:36] leitz: Not sure I'm clear on that. Ruby as a community doesn't seem to want to support Ruby on servers, since servers use old versions of Ruby.Work pays the bills.
[16:23:03] leitz: I claim it; there's nothing in Ruby (newest) that warrents the effort to install and update bunches of servers.
[16:23:53] elomatreb: Esp. the very recent versions are very worthwhile for server use because of their performance gains
[16:24:35] leitz: If I use the default OS Ruby then the community harasses me for it. Literally; saying over and over "you should upgrade" and ignoring me saying "I can't".
[16:24:48] apeiros: but yes, if you use EOLd products, you don't get support. that's not unique to the ruby community, though.
[16:25:23] elomatreb: And ruby maintenance is very genereous compared to other projects, e.g. 1.8.7 was supported for like 5 years?
[16:25:49] leitz: True, it's not unique to the Ruby community. Ruby 2.2 is EOL and that's what's on the latest version of Red Hat Enterprise Linux.
[16:26:50] elomatreb: Aren't you paying Redhat for backport support? People here are here on their free time
[16:27:46] apeiros: and if different people tell you the same thing on different occasions, then that's still not harassment.
[16:28:16] apeiros: that's just a community having a similar shared opinion on how to handle that kind of thing.
[16:28:45] leitz: Fault? Not really. It's the community's choice. The issue isn't "bad", but I find it difficult (impossible) to talk a large organization into using Ruby on servers.
[16:29:17] havenwood: Around here it seems the large organizations are all already using Ruby. I guess that varies regionally.
[16:29:57] leitz: apeiros, I'ld have to go look in my logs. It did happen here. Enough to push me away from Ruby for a while.
[16:31:14] leitz: havenwood, I can't disagree with you, but my *guess* is that unless the organization uses a Ruby based application (Rails, Puppet, Chef), they are less inclined to install Ruby on hudreds or thousands of servers.
[16:31:25] apeiros: on top of that, even if they don't include a sane version, toolset is around to easily install one.
[16:32:06] apeiros: whether it's hundreds or thousands doesn't really matter. at that point you either automated, or you failed.
[16:32:57] leitz: apeiros, yes, it can be installed. I have 2.6 on my CentOS 6 box. However, I haven't seen a benefit to the effort at scale.
[16:32:57] elomatreb: Arguably the problem here isn't ruby, but the promises that OSes make about stability that really don't hold true
[16:33:09] apeiros: and from what stuff I've seen on larger server installations, automating ruby install would be one of the less complex issues.
[16:33:17] elomatreb: Because even if you backport ruby fixes, the library you may depend on probably won't receive this treatment
[16:34:10] leitz: elomatreb, agreed. 1.8.7 is the default on RHEL 6. There are several gems as well.
[16:36:00] leitz: For me the biggest issue wasn't the lack of Ruby code fixes but trying to wade through "you should upgrade" and seldom getting answers to Ruby questions.
[16:36:35] leitz: Far as I can tell the Ruby Core folks are working on 3x3 and that seems like a huge challenge.
[16:36:50] apeiros: nobody wants to waste time with potentially solved problems. especially not on their free time.
[16:37:50] leitz: Understood. The questions I had weren't about Ruby code itself but about what I was doing wrong *with* it. If that makes sense.
[16:48:10] leitz: My Ruby skill is still pretty limited, and I was staying with the standard library. I wasn't able to produce enough of a killer app to make it worth the effort to upgrade.
[16:48:52] leitz: Even showing 6 short lines of Ruby code that replaced two 1000+ character regex's wasn't enough.
[23:33:55] TheBrayn: any idea why rubocop does not recognise these config parameters? https://gist.github.com/mmerfort/28d8c12cbde665e86b7d5e511bef435d
[23:38:00] Zarthus: https://raw.githubusercontent.com/Zarthus/lobby-utility-bot/master/conf/rubocop.yaml sample