« Back to channel list

#ruby - 13 April 2017

« Back 1 day Forward 1 day »
[00:01:36] outreachdan: has joined #ruby
[00:04:56] outreachdan: has joined #ruby
[00:07:37] war_pigs: has joined #ruby
[00:08:32] dasher00: has joined #ruby
[00:10:21] binaryplease: has joined #ruby
[00:10:47] justizin: i'm trying to write some code that forcibly disconnects my kafka client, for the purpose of verifying some retry logic works. looks like it is running Socket.close(), but the sockets still show up in netstat / lsof as ESTABLISHED.
[00:11:23] justizin: doing my best to grok the actual implementation, but i can't find where close() is defined ... i know that when i forced a disconnect using gdb, i had to run 'shutdown' instead of 'close' on the fd.
[00:12:12] justizin: ruby socket doesn't seem to have the differentiation, i want to assume it does the Right Thing(tm), but struggling to see that.
[00:12:22] justizin: anyone know anything about this sorta problem? :)
[00:19:23] jenrzzz: has joined #ruby
[00:20:22] charliesome: has joined #ruby
[00:21:15] cagomez: has joined #ruby
[00:21:52] darix: justizin: tcpkill
[00:22:16] bdonnahue: hey guys. im trying to use rvm to install the bundler gem... i tried "rvm gem install bundler" but see the error: Please note that `rvm gem ...` was removed, try `gem install bundler` or `rvm all do gem install bundler` instead. ( see: 'rvm usage' )
[00:22:31] bdonnahue: i then tried "gem install bundler" and i get a 127 command not fonud
[00:22:49] darix: justizin: or try https://blog.habets.se/2017/03/Killing-idle-TCP.html
[00:23:19] war_pigs: has joined #ruby
[00:23:22] bdonnahue: not sure what i am doing wrong
[00:24:56] war_pigs: has joined #ruby
[00:25:17] bkxd: has joined #ruby
[00:26:10] Radar: bdonnahue: I would recommend against using rvm because it's bloated. What OS are you on?
[00:27:23] bronson: has joined #ruby
[00:28:24] bdonnahue: Radar i thought rvm was the best way to get ruby installed etc?
[00:28:34] bdonnahue: whats the better way?
[00:28:47] millerti: has joined #ruby
[00:29:17] justizin: darix: yah i found that, i just wanted to do this programmatically from within ruby.
[00:29:38] justizin: trying to write a self-contained program that reproduces a certain problem, then fixes it.
[00:31:52] DWSR: has joined #ruby
[00:35:09] webopsx: has joined #ruby
[00:35:48] war_pigs: has joined #ruby
[00:36:23] Radar: bdonnahue: chruby + ruby-install is a better system. Much more lighter weight.
[00:36:44] Radar: bdonnahue: https://github.com/postmodern/ruby-install and https://github.com/postmodern/chruby
[00:37:01] Radar: bdonnahue: Follow the READMEs and set those up. You'll be better for it :) Remember to "rvm implode --force" first to delete RVM.
[00:39:05] mooser: has joined #ruby
[00:40:24] FoX_77: has joined #ruby
[00:40:57] cerulean: has joined #ruby
[00:41:02] cerulean: does anyone use the tweet stream gem?
[00:41:05] cerulean: its totally broke for me
[00:41:18] Radar: ?didntwork
[00:41:18] ruby[bot]: What "didn't work"? Did your server not start? Did your computer explode? Did your webpage turn bright pink? Did your client not pay your bill on time? You may have to be more specific. A Gist (http://gist.github.com) of the code that doesn't work (and the error you are getting) will be helpful.
[00:41:44] FoX_77: def hi_everyone ; puts "all good?" ; end
[00:41:46] outreachdan: has joined #ruby
[00:42:07] Radar: FoX_77: did you say something?
[00:43:03] hndk: has joined #ruby
[00:43:41] FoX_77: radar.split("") yes y e s
[00:43:51] jenrzzz: has joined #ruby
[00:43:51] jenrzzz: has joined #ruby
[00:44:03] brent__: has joined #ruby
[00:44:05] Radar: undefined local variable or method radar
[00:44:28] cerulean: undefined method `configure' for TweetStream:Module
[00:44:30] cerulean: is the error i get
[00:44:46] cerulean: the gem does require, and the module itself is a constant, but nothing inside is accessible
[00:44:47] bdonnahue: <Radar> getting them installed thanks
[00:44:55] jgt4: has joined #ruby
[00:45:21] Radar: cerulean: Which version of the gem are you using?
[00:45:33] Radar: https://github.com/tweetstream/tweetstream/blob/master/lib/tweetstream.rb
[00:45:39] Radar: There is no .configure method here.
[00:45:54] Radar: Oh, might come from Configuration
[00:46:02] cerulean: check configuration.rb
[00:46:05] cerulean: which the module does Extend
[00:46:06] Radar: https://github.com/tweetstream/tweetstream/blob/master/lib/tweetstream/configuration.rb#L64-L66
[00:47:08] skweek: has joined #ruby
[00:47:15] Puffball: has joined #ruby
[00:47:31] cerulean: maybe this works? https://github.com/voloko/twitter-stream
[00:48:59] webopsx: has joined #ruby
[00:49:20] cerulean: or maybe https://github.com/tweetstream/em-twitter
[00:50:01] bdonnahue: im following the instructions for ruby-install but i am getting this error "make: *** No rule to make target `install'. Stop."
[00:50:10] bdonnahue: not sure what that means
[00:50:10] cagomez: has joined #ruby
[00:51:12] nankyokusei: has joined #ruby
[00:52:20] cerulean: i think you need to "make" first
[00:54:29] electrostat: has joined #ruby
[00:55:53] esObe: has joined #ruby
[00:58:02] brendan-: has joined #ruby
[01:00:19] war_pigs: has joined #ruby
[01:01:07] charliesome: has joined #ruby
[01:01:59] bdonnahue: <cerulean> i get that error if I run make as well
[01:04:11] skweek: has joined #ruby
[01:06:03] Silthias: has joined #ruby
[01:07:53] cerulean: em-twitter doesn't work either Radar
[01:08:02] cerulean: bdonnahue: ./configure
[01:08:12] cerulean: then make install
[01:14:08] JoshS: has joined #ruby
[01:16:25] Lord_of_Life: has joined #ruby
[01:19:01] jrafanie: has joined #ruby
[01:21:01] mim1k: has joined #ruby
[01:23:39] duderono_: has joined #ruby
[01:25:32] johnzorn: has joined #ruby
[01:25:49] Jameser: has joined #ruby
[01:26:12] bkxd: has joined #ruby
[01:26:24] johnzorn: has joined #ruby
[01:27:31] badeball: has joined #ruby
[01:27:56] Karunamon: has joined #ruby
[01:27:59] ElderFain: has joined #ruby
[01:28:21] johnzorn: has joined #ruby
[01:28:21] sonne: has joined #ruby
[01:28:23] sysanthrope: has joined #ruby
[01:29:33] zeroDivisible: has joined #ruby
[01:30:01] dagelf: has joined #ruby
[01:31:43] apeiros: has joined #ruby
[01:32:42] bdonnahue: <cerulean> got the make working. On a separate docker container i am instlaling ruby with rvm. the rvm complains that things like awk, head, tail, sort are not installed
[01:32:46] bdonnahue: no idea why
[01:33:01] bdonnahue: which awk shows its in /usr/bin
[01:33:05] bdonnahue: anyone got an idea?
[01:34:21] ztkz: has joined #ruby
[01:34:21] ztkz: has joined #ruby
[01:36:54] claudevandort: has joined #ruby
[01:37:21] johnzorn: has joined #ruby
[01:42:31] Silthias: has joined #ruby
[01:43:37] spicerack: has joined #ruby
[01:44:28] enterprisey_: has joined #ruby
[01:47:49] Coldblackice: has joined #ruby
[01:51:52] safetypin: has joined #ruby
[01:54:22] s2013: has joined #ruby
[01:54:25] ozcanesen: has joined #ruby
[01:59:40] chouhoul_: has joined #ruby
[02:00:57] Channel6: has joined #ruby
[02:02:56] Silthias: has joined #ruby
[02:03:54] sumobob: has joined #ruby
[02:05:01] libastral: has joined #ruby
[02:08:42] workmad3: has joined #ruby
[02:09:54] ericmathison: has joined #ruby
[02:13:06] Miron: has joined #ruby
[02:13:56] elifoster: has joined #ruby
[02:14:51] JeanCarloMachado: has joined #ruby
[02:15:32] apeiros: has joined #ruby
[02:19:15] Silthias: has joined #ruby
[02:24:08] mooser: has joined #ruby
[02:31:04] bonhoeffer: has joined #ruby
[02:35:21] rakm: has joined #ruby
[02:38:44] cagomez: has joined #ruby
[02:41:29] brent__: has joined #ruby
[02:42:23] Silthias: has joined #ruby
[02:44:19] Rodya_: has joined #ruby
[02:45:38] sumobob: has joined #ruby
[02:45:43] cagomez: has joined #ruby
[02:45:57] duderonomy: has joined #ruby
[02:50:32] ericmathison: has joined #ruby
[02:52:10] nankyokusei: has joined #ruby
[02:52:14] johnzorn: has joined #ruby
[02:54:16] cerulean: i got em-twitter to work
[02:54:22] Radar: hi again*
[02:54:50] Silthias: has joined #ruby
[02:54:53] cerulean: i figured most of the undocumented stream crap out myself and then found another bot called cogbot that solved my problems with EM and cinch
[02:55:05] cfec0b8d: has joined #ruby
[02:55:27] cerulean: i definitely do not recommend tweetstream but em-twitter can be made to work
[02:56:35] sleetdrop: has joined #ruby
[02:57:18] esObe: has joined #ruby
[02:57:59] Bock: has joined #ruby
[02:58:14] StoneCypher: has joined #ruby
[02:58:35] BTRE: has joined #ruby
[03:03:41] bdonnahue: Using /usr/local/rvm/gems/ruby-2.3.1
[03:03:58] bdonnahue: "/usr/local/rvm/scripts/functions/support: line 517: cat: command not found"
[03:04:10] bdonnahue: i get that error when trying to set the default ruby with rvm
[03:04:40] Radar: very odd.
[03:04:41] adam12: What platform are you on?
[03:04:46] Cohedrin: has joined #ruby
[03:05:06] __Yiota: has joined #ruby
[03:05:16] bdonnahue: im in a dockerfile though
[03:05:22] adam12: Maybe you have no PATH?
[03:05:44] bdonnahue: if i echo path i get "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
[03:05:53] adam12: what about `which cat`
[03:05:58] adam12: (inside docker instance)
[03:06:11] harfangk: has joined #ruby
[03:06:29] bdonnahue: "/usr/bin/cat"
[03:07:03] adam12: Maybe there is some sort of PATH unsetting in rvm
[03:07:57] bdonnahue: no idea how or why... not sure what to do now
[03:08:43] Bock: has joined #ruby
[03:08:55] shakes: has joined #ruby
[03:09:22] Silthias: has joined #ruby
[03:12:22] cerulean: add cat to the path again
[03:14:27] StoneCypher: has joined #ruby
[03:14:30] jenrzzz: has joined #ruby
[03:17:03] BSAlb: has joined #ruby
[03:21:31] mim1k: has joined #ruby
[03:25:41] bdonnahue: what do you mean add it to the path again
[03:26:51] bkxd: has joined #ruby
[03:29:17] minimalism: has joined #ruby
[03:29:54] bdonnahue: <cerulean>?
[03:30:19] yokel: has joined #ruby
[03:30:50] Silthias: has joined #ruby
[03:31:31] __Yiota: has joined #ruby
[03:32:38] pwnd_nsfw`: has joined #ruby
[03:34:59] sneakerhax: has joined #ruby
[03:43:38] cerulean: bdonnahue: the $PATH variable
[03:43:49] cerulean: and add the directory back
[03:43:56] cerulean: with export PATH=$PATH:/path
[03:46:34] nchambers: what do you guys normally use for command line parsing?
[03:47:02] dmarr: has joined #ruby
[03:47:45] BSaboia: has joined #ruby
[03:48:02] cerulean: nchambers: idk have you checked out commander
[03:48:10] cerulean: !gh commander
[03:48:16] Silthias: has joined #ruby
[03:48:21] cerulean: https://github.com/commander-rb/commander
[03:49:51] astrobunny: has joined #ruby
[03:51:43] johnzorn: has joined #ruby
[03:56:56] nchambers: cerulean: how do you do positional parameters?
[03:58:05] ozcanesen: has joined #ruby
[03:59:02] esObe: has joined #ruby
[03:59:18] Nilium: ACTION just has his own CLI parser because he's pretty sure loops aren't that hard to write
[03:59:19] claw: has joined #ruby
[03:59:46] shakes: has joined #ruby
[04:00:10] cerulean: i dunno what positional parameters are
[04:00:29] kt2: has joined #ruby
[04:00:43] Nilium: Without knowing, I'd guess like arguments to find
[04:00:56] nchambers: foobar --woo=bar baz.conf
[04:01:04] nchambers: baz.conf is the positional parameter
[04:01:53] Nilium: "Growl notification support for MacOS" why?
[04:03:09] cerulean: lol idk maybe its nice in a command library
[04:03:23] Nilium: ACTION shrugs
[04:03:40] Nilium: Someone probably wanted it at some point
[04:03:55] nchambers: oh well I guess I'll just roll my own shitty parser
[04:06:14] gix: has joined #ruby
[04:07:04] Nilium: blah.each do |q| case q when /^--foooooooobar/ etc. etc.
[04:07:36] Nilium: Rolling your own makes the code surprisingly predictable and easy to work with compared to figuring out what horrors lie in someone else's library
[04:08:17] baweaver: optparser just slurps from ARGV
[04:08:22] baweaver: the rest are left on ARGV
[04:08:37] Nilium: That seems reasonable
[04:08:54] baweaver: y'know, there's a dirty secret about those libraries
[04:08:55] Silthias: has joined #ruby
[04:09:05] baweaver: they rely on people being annoyed to submit patches to fix things
[04:09:22] baweaver: instead of rewriting everything again and seeing how close they can get to the LISP curse
[04:10:04] hndk: has joined #ruby
[04:11:33] baweaver: TL;DR LISP curse: everyone makes their own version which only ever solves their own problems, no complete solutions or even well tested ones exist because of it.
[04:11:57] baweaver: Javascript is one of the closest popular modern language to hitting that.
[04:12:09] baweaver: Clojure hit it hard, but has Java to fall back on for libs.
[04:12:44] rakm: has joined #ruby
[04:13:30] Cohedrin: has joined #ruby
[04:14:33] mazeinmaze_: has joined #ruby
[04:15:29] enterprisey: has joined #ruby
[04:15:36] Nilium: Maybe what we need is some more standards
[04:16:07] Nilium: Also free burritos
[04:16:17] Nilium: Brought that up in a standards meeting at work and nobody took it seriously
[04:16:57] nchambers: can someone help me with this? http://sprunge.us/aOeD
[04:17:57] FastJack: has joined #ruby
[04:20:15] nofxxx: has joined #ruby
[04:20:36] mim1k: has joined #ruby
[04:22:21] Silthias: has joined #ruby
[04:25:18] Yzguy: has joined #ruby
[04:27:16] ericmathison: nchambers: Did you define Clihub::VERSION twice? I assume you are referring to already initialized constant warning?
[04:27:43] nchambers: ericmathison: right. and I don't think so. it didn't start showing up until now
[04:27:55] nchambers: I just did the standard bundle gem <prog>
[04:29:13] ericmathison: nchambers: is the code available to look at?
[04:29:31] nchambers: yeah one second
[04:29:34] anisha: has joined #ruby
[04:29:41] jdm: has joined #ruby
[04:29:55] sumobob: has joined #ruby
[04:30:09] mooser: has joined #ruby
[04:30:22] nchambers: ericmathison: https://github.com/ntchambers/clihub
[04:34:52] renchan: has joined #ruby
[04:34:56] s2013: has joined #ruby
[04:38:33] Guest96: has joined #ruby
[04:42:47] bkxd: has joined #ruby
[04:44:43] Silthias: has joined #ruby
[04:46:16] Rodya_: has joined #ruby
[04:50:26] mooser: has joined #ruby
[04:52:28] Pumukel: has joined #ruby
[04:53:03] nankyokusei: has joined #ruby
[04:59:05] mooser: has joined #ruby
[04:59:20] Silthias: has joined #ruby
[05:10:17] jgt4: has joined #ruby
[05:11:48] jeyraof^mbpr: has joined #ruby
[05:14:32] Silthias: has joined #ruby
[05:14:47] StoneCypher: has joined #ruby
[05:16:35] sumobob: has joined #ruby
[05:20:13] muelleme_: has joined #ruby
[05:21:53] spyder55: has joined #ruby
[05:22:29] juggler: has joined #ruby
[05:24:46] knight33: has joined #ruby
[05:29:08] Silthias: has joined #ruby
[05:31:04] ericmathison: nchambers: this suggests that your warning might be related to using RVM: https://github.com/flori/json/issues/177
[05:31:47] ericmathison: for what it's worth, i'm on chruby and didn't get any warning when I ran clihub
[05:31:56] nchambers: ericmathison: maybe. it just went away for some reason :/
[05:33:49] kent\n: has joined #ruby
[05:35:29] cerulean: woohoo i'm so happy, i was able to hook em-twitter to cinch with eventmachine and now we have lived updates of twitter from our bot
[05:35:35] cerulean: i like eventmachine
[05:35:46] cerulean: why did people say it was a complicated library?
[05:35:53] cerulean: it makes event loop stuff so easy
[05:36:09] cerulean: #defer for the win
[05:39:40] cfec0b8d: has joined #ruby
[05:42:12] Silthias: has joined #ruby
[05:44:54] brent__: has joined #ruby
[05:45:54] CloCkWeRX: has joined #ruby
[05:48:53] Silthias: has joined #ruby
[05:51:42] Guest96: has joined #ruby
[05:59:21] Guest96: has joined #ruby
[06:00:31] esObe: has joined #ruby
[06:03:50] Silthias: has joined #ruby
[06:05:51] anisha: has joined #ruby
[06:13:27] bkxd: has joined #ruby
[06:17:11] Silthias: has joined #ruby
[06:19:30] timvisher: has joined #ruby
[06:22:14] astrobunny: has joined #ruby
[06:24:10] kristofferR: has joined #ruby
[06:24:57] astrobunny: has joined #ruby
[06:27:51] Sweetlie: has joined #ruby
[06:31:03] Silthias: has joined #ruby
[06:31:20] maattdd: has joined #ruby
[06:31:52] manjaro-kde5: has joined #ruby
[06:33:38] muelleme_: has joined #ruby
[06:33:39] anisha: has joined #ruby
[06:33:40] Qchmqs: has joined #ruby
[06:35:17] yeticry: has joined #ruby
[06:36:14] Arpanet69: has joined #ruby
[06:36:49] DARPA: has joined #ruby
[06:37:58] impermanence: has joined #ruby
[06:38:47] Antiarc: has joined #ruby
[06:41:05] Arpanet69: has joined #ruby
[06:41:55] jgt: has joined #ruby
[06:42:13] anisha: has joined #ruby
[06:43:21] romankonz: has joined #ruby
[06:43:30] Silthias: has joined #ruby
[06:45:24] Jayson_Virissimo: has joined #ruby
[06:46:30] mooser: has joined #ruby
[06:47:02] romankonz: has joined #ruby
[06:47:13] sagax: has joined #ruby
[06:48:00] romankonz: has joined #ruby
[06:48:22] wsewolod: has left #ruby: ("Leaving")
[06:49:12] romankonz: has joined #ruby
[06:49:30] Rodya_: has joined #ruby
[06:49:52] romankonz: has joined #ruby
[06:51:49] fusta: has joined #ruby
[06:52:38] anisha: has joined #ruby
[06:53:52] nankyokusei: has joined #ruby
[06:55:03] romankonz: has joined #ruby
[06:55:09] aupadhye: has joined #ruby
[06:57:11] Silthias: has joined #ruby
[07:10:34] jgnagy: has joined #ruby
[07:11:09] Silthias: has joined #ruby
[07:15:50] StoneCypher: has joined #ruby
[07:17:01] griff: has joined #ruby
[07:19:39] manjaro-kde5: has joined #ruby
[07:22:19] burgestrand: has joined #ruby
[07:23:04] esObe: has joined #ruby
[07:23:42] snickers: has joined #ruby
[07:24:31] _whitelogger: has joined #ruby
[07:24:48] Silthias: has joined #ruby
[07:24:51] aufi: has joined #ruby
[07:28:24] mark_66: has joined #ruby
[07:29:10] esObe: has joined #ruby
[07:29:27] antgel: has joined #ruby
[07:31:33] kratec: has joined #ruby
[07:31:45] patarr: has joined #ruby
[07:33:50] surrounder: has joined #ruby
[07:36:49] tvw: has joined #ruby
[07:38:23] Silthias: has joined #ruby
[07:40:31] govg: has joined #ruby
[07:43:55] sebd: has joined #ruby
[07:50:13] Rodya_: has joined #ruby
[07:51:14] DARPA: has joined #ruby
[07:54:56] Silthias: has joined #ruby
[07:57:56] rgtk: has joined #ruby
[08:00:06] Arpanet69: has joined #ruby
[08:00:47] brent__: has joined #ruby
[08:02:27] sepp2k: has joined #ruby
[08:02:42] jamesaxl: has joined #ruby
[08:04:33] DARPA: has joined #ruby
[08:05:00] jaruga: has joined #ruby
[08:08:52] Arpanet69: has joined #ruby
[08:12:10] DARPA: has joined #ruby
[08:12:45] vali: has joined #ruby
[08:14:14] bkxd: has joined #ruby
[08:14:59] Silthias: has joined #ruby
[08:16:34] charliesome: has joined #ruby
[08:16:36] mim1k: has joined #ruby
[08:16:57] Arpanet69: has joined #ruby
[08:26:24] vali: has joined #ruby
[08:28:42] jdm: has joined #ruby
[08:29:26] domgetter: has joined #ruby
[08:29:37] dionysus69: has joined #ruby
[08:30:56] mikecmpbll: has joined #ruby
[08:33:24] mim1k: has joined #ruby
[08:37:24] Beams: has joined #ruby
[08:41:08] jdm: has joined #ruby
[08:41:51] Ziarkaen: has joined #ruby
[08:46:34] hutch34_: has joined #ruby
[08:48:03] mooser: has joined #ruby
[08:51:05] Rodya_: has joined #ruby
[08:51:08] astrobunny: has joined #ruby
[08:51:13] marr: has joined #ruby
[08:52:33] cagomez: has joined #ruby
[08:53:02] coffeejunk: has joined #ruby
[08:54:49] nankyokusei: has joined #ruby
[08:56:21] mim1k: has joined #ruby
[08:56:23] griff: has joined #ruby
[09:00:46] ketan: has joined #ruby
[09:01:25] lxsameer: has joined #ruby
[09:01:31] dhollin3: has joined #ruby
[09:04:13] Guest96: has joined #ruby
[09:07:04] centrx: has joined #ruby
[09:11:26] DARPA: has joined #ruby
[09:14:16] Guest96: has joined #ruby
[09:14:52] blackwind_123: has joined #ruby
[09:16:16] StoneCypher: has joined #ruby
[09:19:43] balo: has joined #ruby
[09:32:18] yurikoles: has joined #ruby
[09:32:37] patarr: has joined #ruby
[09:39:37] ketan_: has joined #ruby
[09:41:00] StoneCypher: has joined #ruby
[09:41:18] ljarvis: eventmachine is hell
[09:43:29] ferr1: has joined #ruby
[09:44:23] vali: has joined #ruby
[09:46:31] bkxd: has joined #ruby
[09:49:25] ruby[bot]: -b *!*@gateway/tor-sasl/jennyrgb$#ruby-banned
[09:51:25] sebd: has joined #ruby
[09:51:48] Rodya_: has joined #ruby
[09:59:31] StoneCypher: has joined #ruby
[10:02:21] mnaqii: has joined #ruby
[10:04:03] jsrn_: has joined #ruby
[10:16:17] binaryplease: has joined #ruby
[10:26:49] centrx: ljarvis: the bell tolls for thee
[10:27:26] rgr_: has joined #ruby
[10:31:56] bob_n00b: has joined #ruby
[10:36:36] figuresofstick: has joined #ruby
[10:40:56] Guest96: has joined #ruby
[10:41:16] yurikoles: has joined #ruby
[10:45:49] manjaro-kde5-: has joined #ruby
[10:46:50] GodFather: has joined #ruby
[10:46:59] manjaro-kde5-: has joined #ruby
[10:47:10] bkxd: has joined #ruby
[10:48:22] manjaro-kde5-: has joined #ruby
[10:49:35] mooser: has joined #ruby
[10:50:29] bob_n00b: Trying to understand attr_accessor: https://gist.github.com/anonymous/baf735d34e415800cfd79ba0e7d7e369
[10:53:51] canton7: bob_n00b, 'attr_accessor: task'
[10:53:58] canton7: uh, 'attr_accessor :task'
[10:55:24] ytti: for exact implemntation, just 'reader', because he has not implemented #task=
[10:55:37] nankyokusei: has joined #ruby
[10:57:31] canton7: oops, I did mean to write that... my bad
[11:00:32] bob_n00b: So, no :done ?
[11:02:05] cfec0b8d: has joined #ruby
[11:04:08] biberu: has joined #ruby
[11:05:26] bob_n00b: Something like this, then? https://gist.github.com/anonymous/6038d9050174e51529c9ef8045d9a4cc
[11:06:24] charliesome: has joined #ruby
[11:06:35] callumj: has joined #ruby
[11:07:27] elomatreb: bob_n00b: You give attr_* the name of the instance variable you want it to create methods for. It has no method of knowing that it's a boolean value or that you want a predicate method
[11:08:24] cagomez: has joined #ruby
[11:08:26] ski7777: has joined #ruby
[11:10:06] bob_n00b: elomatreb: So apart from my comments, the code there makes sense/doesn't duplicate unnescessary or follow bad habits? :)
[11:11:23] patarr: has joined #ruby
[11:12:07] elomatreb: You could use alias_method if you really wanted, but I don't think explicitely defining the method is frowned upon (https://eval.in/775738)
[11:12:10] elomatreb: bob_n00b: ^
[11:20:12] griff: has joined #ruby
[11:22:12] bob_n00b: Ooh, eval.in was nice :) So, this should make sense, then: https://eval.in/775744
[11:22:52] bob_n00b: eh, minus the extra fluff ;)
[11:23:27] elomatreb: Well, now you're overwriting the method defined by method_alias with your own
[11:23:51] bob_n00b: https://eval.in/775745
[11:24:11] bob_n00b: (pasted wrong buffer) ;)
[11:24:38] elomatreb: Yep, keep in mind though that you now have both YourClass#done and YourClass#done?
[11:24:42] jgt: has joined #ruby
[11:25:59] bob_n00b: elomatreb: yes, I understand that, but what's worst? :) Maybe explicitly defining just done? is better ... (I'm just trying to learn ... Ruby is fascinating)
[11:27:09] elomatreb: Matter of preference, I'd say. I'm pretty sure ActiveSupport (the utility library of Rails) defines something like attr_* for predicate methods, and explicitely defining completely trivial methods may be something people dislike too
[11:30:02] bob_n00b: Rails seems to do quite a lot of stuff ... :) Was thinking I should get some more basic Ruby understanding before looking too much into frameworks
[11:30:41] __Yiota: has joined #ruby
[11:34:11] User458764: has joined #ruby
[11:38:19] impermanence: has joined #ruby
[11:39:03] vali: has joined #ruby
[11:39:38] balo: has joined #ruby
[11:40:55] ldnunes: has joined #ruby
[11:41:51] bkxd: has joined #ruby
[11:44:44] psychicist__: has joined #ruby
[11:49:25] jamesaxl: has joined #ruby
[11:51:01] Verity: bob_n00b, yes, thats very important (imo)
[11:51:09] mooser: has joined #ruby
[11:52:17] shinnya: has joined #ruby
[11:52:31] aknagi: has joined #ruby
[11:54:09] xenops: has joined #ruby
[11:55:10] houhoulis: has joined #ruby
[11:55:14] cagomez: has joined #ruby
[11:55:50] jgt: has joined #ruby
[11:57:06] pickle_: has joined #ruby
[11:59:35] synthroid: has joined #ruby
[11:59:50] StoneCypher: has joined #ruby
[11:59:53] nadir: has joined #ruby
[12:02:03] jamesaxl: has joined #ruby
[12:02:49] jamesaxl: has joined #ruby
[12:04:05] Suslov: has joined #ruby
[12:05:05] claudevandort: has joined #ruby
[12:07:25] jamesaxl: has joined #ruby
[12:15:11] StoneCypher: has joined #ruby
[12:18:41] mim1k: has joined #ruby
[12:21:46] aryaching: has joined #ruby
[12:22:28] pupsicle: has joined #ruby
[12:26:01] cagomez: has joined #ruby
[12:26:52] minimalism: has joined #ruby
[12:31:23] jamesaxl: has joined #ruby
[12:34:09] jtperreault: has joined #ruby
[12:40:04] pickle_: has joined #ruby
[12:42:25] ruby[bot]: -b *!*@gateway/web/freenode/ip.69.14.118.203$#ruby-banned
[12:43:15] enterprisey: has joined #ruby
[12:47:04] hutch34_: has joined #ruby
[12:50:32] jrafanie: has joined #ruby
[12:50:48] t-recx: has joined #ruby
[12:53:57] Rodya_: has joined #ruby
[12:56:32] nankyokusei: has joined #ruby
[12:56:35] jamesaxl: has joined #ruby
[12:57:06] cagomez: has joined #ruby
[12:58:10] mooser: has joined #ruby
[12:59:07] MrBusiness: has joined #ruby
[13:00:07] Guest96: has joined #ruby
[13:01:02] jamesaxl: has joined #ruby
[13:01:52] ramortegui: has joined #ruby
[13:03:28] grh: has joined #ruby
[13:03:47] agit0: has joined #ruby
[13:06:33] millerti: has joined #ruby
[13:09:08] jamesaxl: has joined #ruby
[13:10:16] hutch34_: has joined #ruby
[13:11:05] Pumukel: has joined #ruby
[13:11:35] Pumukel: has joined #ruby
[13:18:29] impermanence: has joined #ruby
[13:20:19] rgiscard: has joined #ruby
[13:22:55] User458764: has joined #ruby
[13:24:23] Pumukel: has joined #ruby
[13:26:50] Jameser: has joined #ruby
[13:27:49] rgiscard: has joined #ruby
[13:27:56] GodFather: has joined #ruby
[13:28:10] cagomez: has joined #ruby
[13:31:20] synthroid: has joined #ruby
[13:32:44] synthroid: has joined #ruby
[13:33:29] DLSteve: has joined #ruby
[13:33:49] al2o3-cr: has joined #ruby
[13:37:36] workmad3: has joined #ruby
[13:38:39] ken: has joined #ruby
[13:41:07] Jameser: has joined #ruby
[13:44:05] cagomez: has joined #ruby
[13:44:14] yeticry_: has joined #ruby
[13:50:12] __Yiota: has joined #ruby
[13:50:47] AgentVenom: has joined #ruby
[13:52:40] jamesaxl: has joined #ruby
[13:52:53] minimalism: has joined #ruby
[13:54:42] Rodya_: has joined #ruby
[14:00:19] claudevandort: has joined #ruby
[14:00:30] burgestrand: has joined #ruby
[14:00:57] rotty_: has joined #ruby
[14:03:40] Nicmavr: has joined #ruby
[14:06:31] mooser: has joined #ruby
[14:07:50] TomyWork: has joined #ruby
[14:08:36] Hates_: has left #ruby: ()
[14:09:30] mooser_: has joined #ruby
[14:09:48] herzog_ernst: has joined #ruby
[14:12:11] chouhoulis: has joined #ruby
[14:12:24] war_pigs: has joined #ruby
[14:12:31] mooser: has joined #ruby
[14:13:24] ozcanesen: has joined #ruby
[14:13:28] harfangk: has joined #ruby
[14:19:35] jonjitsu: has joined #ruby
[14:29:23] mim1k: has joined #ruby
[14:32:43] millerti: has joined #ruby
[14:36:10] workmad3: has joined #ruby
[14:37:01] jonjits[m]: has joined #ruby
[14:39:17] beawesomeinstead: has joined #ruby
[14:40:05] millerti: has joined #ruby
[14:41:48] jamesaxl: has joined #ruby
[14:42:13] sleetdrop: has joined #ruby
[14:42:42] iMadper: has joined #ruby
[14:42:42] iMadper: has joined #ruby
[14:42:51] rakm: has joined #ruby
[14:46:56] cdg: has joined #ruby
[14:46:58] jamesaxl: has joined #ruby
[14:47:32] herzog_ernst: has joined #ruby
[14:49:25] gnufied: has joined #ruby
[14:49:51] zapata: has joined #ruby
[14:52:05] podman: has joined #ruby
[14:52:39] jamesaxl: has joined #ruby
[14:54:24] govg: has joined #ruby
[14:54:44] blackwind_123: has joined #ruby
[14:55:39] Rodya_: has joined #ruby
[14:56:23] cam27: has joined #ruby
[14:57:21] nankyokusei: has joined #ruby
[15:02:51] hays_: has joined #ruby
[15:02:51] hays_: has joined #ruby
[15:03:28] hutch34_: has joined #ruby
[15:03:33] bestie_: has joined #ruby
[15:03:34] jmhmccr_: has joined #ruby
[15:03:55] Eleeleth_: has joined #ruby
[15:03:57] halcyonicstorm1: has joined #ruby
[15:03:57] andersh_: has joined #ruby
[15:04:01] HashNuke_: has joined #ruby
[15:04:01] lancetw_: has joined #ruby
[15:04:04] darthvorik__: has joined #ruby
[15:04:05] Heero__: has joined #ruby
[15:04:06] snickers: has joined #ruby
[15:04:30] peteretep_: has joined #ruby
[15:04:46] rann_: has joined #ruby
[15:05:01] tw1sted_: has joined #ruby
[15:05:14] knowtheory_: has joined #ruby
[15:05:15] mrbobbytables_: has joined #ruby
[15:05:43] aarongodin_: has joined #ruby
[15:05:46] darix-: has joined #ruby
[15:05:49] ec\: has joined #ruby
[15:06:01] Prira_: has joined #ruby
[15:06:02] MarcWebe1: has joined #ruby
[15:06:03] daed_: has joined #ruby
[15:06:04] ccooke_: has joined #ruby
[15:06:11] kke_: has joined #ruby
[15:06:15] bw\_: has joined #ruby
[15:06:16] rizonz_: has joined #ruby
[15:06:21] ejnahc_: has joined #ruby
[15:06:23] PaulePan1er: has joined #ruby
[15:06:32] irick_: has joined #ruby
[15:06:37] potatoe`: has joined #ruby
[15:06:37] potatoe`: has joined #ruby
[15:06:48] devyn_: has joined #ruby
[15:07:51] lupine_: has joined #ruby
[15:07:52] mistym-: has joined #ruby
[15:08:47] Diabolik_: has joined #ruby
[15:08:51] xall: has joined #ruby
[15:08:54] dukedave_: has joined #ruby
[15:09:25] flips_: has joined #ruby
[15:09:29] z3uS|: has joined #ruby
[15:09:30] scootaloo: has joined #ruby
[15:09:33] oz`: has joined #ruby
[15:09:39] maxmanders_: has joined #ruby
[15:09:41] _Tristan-Speccy_: has joined #ruby
[15:09:42] Lartza_: has joined #ruby
[15:09:51] segy_: has joined #ruby
[15:09:56] Jello_Raptor_: has joined #ruby
[15:10:09] ]reed[: has joined #ruby
[15:10:09] ]reed[: has joined #ruby
[15:10:14] fedruantine_: has joined #ruby
[15:10:28] Apocalyp-: has joined #ruby
[15:10:33] Fire-Dragon-DoL-: has joined #ruby
[15:10:35] jasondotstar_: has joined #ruby
[15:10:35] synthroid: has joined #ruby
[15:10:39] jokke1: has joined #ruby
[15:10:44] aurelien`: has joined #ruby
[15:10:46] rippa: has joined #ruby
[15:11:00] bjmllr: has joined #ruby
[15:11:02] flips: has joined #ruby
[15:11:08] kies: has joined #ruby
[15:11:13] xtsee: has joined #ruby
[15:11:15] ckrailo: has joined #ruby
[15:11:16] plantigrade: has joined #ruby
[15:11:24] ReinH_: has joined #ruby
[15:11:28] ckrailo: has joined #ruby
[15:11:47] teotwaki: has joined #ruby
[15:11:51] mjuhl: has joined #ruby
[15:11:52] aurelien: has joined #ruby
[15:12:21] skweek: has joined #ruby
[15:12:33] SteenJobs_: has joined #ruby
[15:12:34] boxrick1: has joined #ruby
[15:12:48] sparr: has joined #ruby
[15:13:19] G: has joined #ruby
[15:14:25] incomprehensibly: has joined #ruby
[15:15:43] mzo: has joined #ruby
[15:16:33] Win7XP: has joined #ruby
[15:16:34] chouhoulis: has joined #ruby
[15:17:12] Win7XP: Hi Folks, Im looking for a script that looks inside a folder on windows and execute all the .exe within that folder.
[15:17:29] Win7XP: folder has around 7000 files
[15:18:17] snockerton: has joined #ruby
[15:18:58] chouhoulis: has joined #ruby
[15:18:59] herwin: I guess powershell would be a more logical tool here than ruby
[15:19:22] Yonk__: has joined #ruby
[15:19:24] ec\: has joined #ruby
[15:19:41] maattdd: has joined #ruby
[15:20:55] grh: has joined #ruby
[15:21:16] Win7XP: ok thanks
[15:22:00] snockerton: i have a top-level method (log()) defined that uses a top-level instance variable, but when i call log() from within a class block, the instance variable is undefined - how can i get around this since attr_reader doesn't work at the top-level object?
[15:22:04] davidmichaelkarr: has joined #ruby
[15:22:44] Jayson_Virissimo: has joined #ruby
[15:22:51] jgnagy: has joined #ruby
[15:22:54] ltem: has joined #ruby
[15:26:47] ec\: has joined #ruby
[15:27:03] jamesaxl: has joined #ruby
[15:28:07] toretore: ?code snockerton
[15:28:07] ruby[bot]: snockerton: We can't help you without your code, please post it to https://gist.github.com
[15:28:14] Win7XP: has left #ruby: ()
[15:30:36] rizonz: has joined #ruby
[15:30:43] VladGh: has joined #ruby
[15:32:41] hays: has joined #ruby
[15:33:14] aglorei: has joined #ruby
[15:33:21] maattdd: has joined #ruby
[15:33:54] hays: has joined #ruby
[15:34:33] hays: I am constantly finding myself in situations where I want to derive from a standard Ruby class like "Hash"
[15:34:37] djbkd: has joined #ruby
[15:34:49] cam27: has joined #ruby
[15:34:59] _aeris_: has joined #ruby
[15:35:08] hays: Is there an alternative that's not kind of a pain in the rear? I find that composition for example is a bit of a pain, because you would have to define a bunch of pass thru functions
[15:35:11] patarr: has joined #ruby
[15:35:32] hutch34_: has joined #ruby
[15:35:46] elomatreb: Have you looked at refinements?
[15:35:54] matthewd: hays: It rather depends what you want your new class to do
[15:35:54] hays: It seems like inheritance is a good way to essentially 'wrap' a Hash
[15:36:18] hays: elomatreb: I have not
[15:36:23] StoneCypher: has joined #ruby
[15:36:25] ruby[bot]: -b Nvm!*@*$#ruby-banned
[15:36:48] elomatreb: Basically scoped monkey patching, may be what you want if you only want to add/change some methods
[15:36:55] cagomez: has joined #ruby
[15:37:01] matthewd: If you want something that's Hash-like but with additional semantics, you may find yourself needing to define all of those pass-through methods anyway, to apply said semantics
[15:37:19] cagomez: has joined #ruby
[15:37:27] matthewd: (e.g. ActiveSupport's HashWithIndifferentAccess, which does inherit Hash)
[15:37:36] hays: elomatreb: hmm. interesting.. not sure that captures the semantics I want
[15:38:15] hays: matthewd: A lot of what I am doing is loading in a JSON file with a specific structure, and I want to add domain-specific operations to that structure, while still being able to access it and use it like a Hash
[15:38:49] cagomez: has joined #ruby
[15:39:02] hays: I could get most of it, probably, by just passing through the [] methods... but to me its pretty safe to just extend the hash
[15:39:57] matthewd: Sounds more like a struct than a hash to me
[15:40:18] Satyajit: has joined #ruby
[15:40:20] hays: well. JSON.parse loads into a hash
[15:40:54] brent__: has joined #ruby
[15:41:02] hays: .. i mean... at least the way this JSON is structured it does
[15:41:15] User458764: has joined #ruby
[15:41:17] enterprisey: has joined #ruby
[15:41:22] hays: { "foo": <stuff>, "bar": <other stuff> .. etc }
[15:41:34] impermanence: has joined #ruby
[15:41:59] hays: I don't have much experience with "include". Is there any difference between deriving and including?
[15:42:31] elomatreb: By "deriving" you mean inheritance?
[15:42:40] hays: hmm.. I guess include has to be a module
[15:42:59] hays: yeah. I think I answered my own question though
[15:43:12] hays: class ConfigHash < Hash
[15:43:14] hays: something like this
[15:43:24] elomatreb: You can include as many modules as you want, whereas you can only inherit from one class for example
[15:43:32] ljarvis: you should wrap Hash instead of inheriting from it, though
[15:44:06] blackwind_123: has joined #ruby
[15:44:16] matthewd: ljarvis: That's where the conversation started
[15:44:27] hays: ljarvis: if I do that, then I end up reimplementing a bunch of methods hash already has, passing them through. it seems messy
[15:46:32] brent__: has joined #ruby
[15:47:33] workmad3: has joined #ruby
[15:48:08] matthewd: While I still think you'd do better with a struct, if you think it's safe to inherit from hash, nothing will stop you
[15:48:26] Rodya_: has joined #ruby
[15:48:56] nowhere_man: has joined #ruby
[15:51:05] sent-hil: has joined #ruby
[15:51:13] synthroid: has joined #ruby
[15:51:23] gizmore: has joined #ruby
[15:52:03] z4phod: has joined #ruby
[15:53:05] z4phod: @current_page.get_button(button).when_visible().click and @current_page.get_button(button).when_visible do |b| ; b.click ; end is same ?
[15:53:22] z4phod: (second not works, i dont understand :/)
[15:55:47] nowhere_man: has joined #ruby
[15:55:48] maattdd: has joined #ruby
[15:55:58] ziarkaen_: has joined #ruby
[15:56:15] antoniobeyah: has joined #ruby
[15:56:36] amclain: has joined #ruby
[15:57:31] mooser: has joined #ruby
[15:57:52] [Butch]: has joined #ruby
[15:58:44] esObe: has joined #ruby
[16:00:36] haylon: has joined #ruby
[16:00:42] dhollinger: has joined #ruby
[16:05:49] nettoweb: has joined #ruby
[16:07:44] dionysus69: has joined #ruby
[16:09:31] herwin: z4phod: they are two different thing, though the implementation of the method you're calling *might* do the same
[16:09:33] rakm: has joined #ruby
[16:11:04] outreachdan: has joined #ruby
[16:11:04] TomyLobo: has joined #ruby
[16:11:34] LyndsySimon: I wrote a quick module to more easily define class instance variables. Should I bother releasing this? https://gist.github.com/lyndsysimon/efeadf4186aaa180a18bf9a7e135bc68
[16:12:05] cerulean: z4phod: in the first one you pass nothing to when_visible (no object), in the second you pass a block starting with do and ending with end.
[16:12:44] LyndsySimon: I'd also be interested in any suggestions for improvement.
[16:13:09] ljarvis: LyndsySimon: why define the class variables in addition to class instance methods?
[16:13:26] z4phod: cerulean, same if i do ...when_visible() do |b| ?
[16:13:28] millerti: has joined #ruby
[16:13:41] cerulean: z4phod: just because you put () doesnt meant it doesnt pass the block. it does.
[16:13:47] LyndsySimon: ljarvis: Heh - I'm going back over my notes on how class instance variables work right now. I think that's an oversight, and they should be instance variables on the class.
[16:14:04] cerulean: @instance_variable - for when you want a variable inside an object instance
[16:14:16] cerulean: @@class_variable - when you want a variable thats global to the class definitoon
[16:14:22] z4phod: ty very much cerulean
[16:14:25] ljarvis: LyndsySimon: ah ok, yeah I would avoid class_variable_set and avoid @@
[16:14:25] cerulean: local_variable - local and dies with scope like any other variable
[16:14:44] cerulean: $global_variable - never goes out of scope or dies until you set it to nil
[16:15:03] LyndsySimon: ljarvis: Yep, they should be instance variables of the class. I was focusing on the structure of the module instead of what I was trying to accomplish :P
[16:15:34] User458764: has joined #ruby
[16:15:38] z4phod: (i throught that function() and function() do ... end was same), so i can only use do with 'good' function like each ?)
[16:15:42] cerulean: class_variable isnt used much in most ruby but it can be used and i have used it before
[16:16:16] elomatreb: It behaves a little unintuitive wrt inheritance
[16:16:22] cerulean: z4phod: just go with what works
[16:16:37] cerulean: function() != function(block)
[16:16:44] LyndsySimon: ljarvis: Updated.
[16:17:16] Rodya_: has joined #ruby
[16:17:20] cerulean: LyndsySimon: i think you're doing it wrong. there's no reason not to use class variables
[16:17:37] LyndsySimon: cerulean: Sure there is - class variables are not inherited.
[16:17:44] cerulean: i dont get why what you're trying to do can't be solved by standard ruby methods
[16:17:46] LyndsySimon: http://thoughts.codegram.com/understanding-class-instance-variables-in-ruby/
[16:17:58] cerulean: what are you trying to accomplish?
[16:18:13] cerulean: that code is gonna give a nightmare to whoever discovers it and has to work on it, no offense
[16:18:28] cerulean: i prefer to avoid metaprogramming when possible
[16:19:17] LyndsySimon: Of course. I've found myself having to implement this pattern several times now, and I always screw it up the first couple of times. I'm wrapping it into a module so I can write and test it once, and not have to revisit it in the future.
[16:19:37] username1: has joined #ruby
[16:20:54] cerulean: i don't get what you are using this pattern for? i've been programming ruby for years and never needed stuff like this. what does this save you from?
[16:20:55] herwin: class << self; attr_accessor :foo; end
[16:21:51] cerulean: why do i have to put attr_accessor in :class self? you're setting values on objects BEFORE you create them? i dont get why you would do this
[16:22:24] cerulean: why not just create the object and set them the normal way?
[16:23:48] mooser: has joined #ruby
[16:25:34] dionysus69: has joined #ruby
[16:25:38] ljarvis: LyndsySimon: To truly simplify it, you only need to use attribute methods Ruby already provides: https://gist.github.com/leejarvis/5d8514287ed5e757b967e5bd4917774e -- note that you need to handle default values for the instance method also, which means you need to return that value in the getter
[16:27:01] cerulean: i'd like an explanation immediately of this pattern
[16:27:07] ljarvis: cerulean: calm down
[16:27:30] ljarvis: cerulean: I would also just write it manually, but it's pretty clear LyndsySimon is doing this for learning purposes
[16:27:41] cerulean: i should have thought of that
[16:27:45] ljarvis: so who cares what it's for and if it's an unusual pattern
[16:28:08] LyndsySimon: I provided a link above to one explanation of why it's useful.
[16:28:15] cerulean: nah don't me stop you, it's not that it's bad, i was just curious and bit freaked out by it, and wanted to promote proper ruby usage
[16:28:33] skweek: has joined #ruby
[16:28:41] LyndsySimon: Here's another: http://www.railstips.org/blog/archives/2006/11/18/class-and-instance-variables-in-ruby/
[16:29:13] TomyLobo2: has joined #ruby
[16:29:14] pwnd_nsfw`: has joined #ruby
[16:29:24] tristanp_: has joined #ruby
[16:29:25] ljarvis: LyndsySimon: it's definitely useful, just writing helpers for it often leaves you with more confusing code, because the methods are inherently complex
[16:29:26] LyndsySimon: cerulean: That makes sense :) Ruby variables work fine for 99% of cases. The places where I need this are when I'm implementing something that needs to inherit class-level attributes in a specific way.
[16:29:34] linetrac1: has joined #ruby
[16:29:44] LyndsySimon: ljarvis: I couldn't agree more.
[16:29:57] StoneCyp1er: has joined #ruby
[16:30:03] ljarvis: LyndsySimon: in general, you would just write them out yourself. ActiveSupport does have a similar class_attribute implementation, which is useful, but equally complex
[16:30:18] pskosinski_: has joined #ruby
[16:30:25] BTRE: has joined #ruby
[16:30:39] Silthias1: has joined #ruby
[16:30:47] ljarvis: https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/class/attribute.rb#L71
[16:30:57] LyndsySimon: ljarvis: Yeah, I'm purposefully not using ActiveSupport, because I'd prefer this module be usable outside of Rails.
[16:31:04] ged_: has joined #ruby
[16:31:07] mrbobbytables_: has joined #ruby
[16:31:12] knowtheory_: has joined #ruby
[16:31:15] ljarvis: sure, activesupport is also usable outside of rails though :)
[16:31:28] lancetw_: has joined #ruby
[16:31:36] peteretep_: has joined #ruby
[16:31:36] lele`: has joined #ruby
[16:31:49] pskosinski_: has joined #ruby
[16:31:49] pskosinski_: has joined #ruby
[16:31:50] nadir_: has joined #ruby
[16:31:56] gusrub: has joined #ruby
[16:32:01] armando1: has joined #ruby
[16:32:07] HashNuke_: has joined #ruby
[16:32:10] angseus_: has joined #ruby
[16:32:10] silverdust: has joined #ruby
[16:32:11] hxegon_a1k: has joined #ruby
[16:32:11] jx: has joined #ruby
[16:32:32] contradictioned: has joined #ruby
[16:32:42] nishiki: has joined #ruby
[16:32:46] Nicmavr: has joined #ruby
[16:32:55] Karunamon: has joined #ruby
[16:33:00] alphor: has joined #ruby
[16:33:03] ironcamel: has joined #ruby
[16:33:07] jokester: has joined #ruby
[16:33:16] johnzorn: has joined #ruby
[16:33:18] Alina-malina: has joined #ruby
[16:33:19] Olipro: has joined #ruby
[16:33:20] fusta: has joined #ruby
[16:33:28] darthvorik_: has joined #ruby
[16:33:34] eblip: has joined #ruby
[16:33:40] SteenJobs_: has joined #ruby
[16:33:47] NightMonkey: has joined #ruby
[16:34:12] leah2: has joined #ruby
[16:34:30] ljarvis: in answer to "should i release this?" as a gem? I would say no. The behaviour it adds is likely just going to be added manually to most projects, and anything more is likely to pull in parts of active support. That's just my advice though, if you want to release it then go for it
[16:34:31] Miron: has joined #ruby
[16:34:39] yeticry: has joined #ruby
[16:35:11] C0deMaver1ck: has joined #ruby
[16:35:13] bestie: has joined #ruby
[16:35:16] electrostat: has joined #ruby
[16:35:59] LyndsySimon: True, but I think you know what I meant :P
[16:36:04] Alina-malina: has joined #ruby
[16:36:16] LyndsySimon: cerulean: Here's the cleanest example I can come up with to show what I'm doing: https://gist.github.com/lyndsysimon/1edfa1aea5978b3771b25ffadda6e683
[16:36:24] tvw: has joined #ruby
[16:37:47] spectra: has joined #ruby
[16:38:31] LyndsySimon: AFK a bit, gotta do meatspace things. I'll check back though.
[16:38:55] ljarvis: using class ivars over class vars is a very well known pattern, it's more a question of "why create additional methods for supporting this"
[16:39:00] yurikoles_: has joined #ruby
[16:39:29] arne_: has joined #ruby
[16:43:28] nettoweb: has joined #ruby
[16:45:12] havenwood: LyndsySimon: You can ditch `def self.included(base ...` with `module ClassMethods` and just `extend` your module instead of `include`ing it.
[16:46:02] havenwood: LyndsySimon: It's not a class instance variable (@) that you're defining, it's a class variable (@@).
[16:46:03] havenwood: "instance variable" is short for "class instance variable"
[16:46:20] ljarvis: havenwood: you're way behind :D
[16:46:30] havenwood: ACTION reads scrollback
[16:46:42] brent__: has joined #ruby
[16:47:57] ggherdov: has joined #ruby
[16:48:12] nitric: has joined #ruby
[16:48:33] cagomez: has joined #ruby
[16:49:23] safetypin: has joined #ruby
[16:51:33] impermanence: has joined #ruby
[16:52:21] impermanence: So if I want to create a file I have to use FileUtils? There does not seem to be a touch method in File, Kernel, (Object for that matter) or IO. Am I overthinking this?
[16:52:43] impermanence: And it seems that open will not create a file automatically...
[16:52:47] maattdd: has joined #ruby
[16:52:59] bob_n00b: has joined #ruby
[16:53:42] HashNuke: has joined #ruby
[16:55:14] havenwood: impermanence: There are multiple ways to create a file. See IO#open for one way: http://ruby-doc.org/core/IO.html#method-c-open
[16:55:22] bob_n00b: Any hints/input on how you would populate an array in a setting like this (without reading from external file): https://eval.in/776176 ? (Tried various options, hashes, multiline string etc, all had various issues, well, I had, being n00b) ;)
[16:56:05] impermanence: havenwood: k. I guess I was myopically looking for a method called "touch" since I discovered that a couple of days ago in FileUtils and have been using it since.
[16:56:58] impermanence: havenwood: I don't see IO.open(). I see kernel.open()...
[16:58:01] impermanence: I guess it's not listed in the method list on the left side of the doc because it's a synonym for IO.new()...
[16:58:39] impermanence: although neither is IO.new(). hm.
[16:58:46] matthewd: impermanence: It's there.
[16:58:57] gusrub: has joined #ruby
[16:59:16] arne_: has joined #ruby
[16:59:33] impermanence: matthewd: you're right. so :: means: I'm overridden from some other class (in this case kernel)?
[17:00:12] impermanence: matthewd: regarding the core docs: what is the significance of :: vs # when describing a method?
[17:00:26] matthewd: :: is a class method, # is an instance method
[17:00:43] __Yiota: has joined #ruby
[17:00:50] colstrom: has joined #ruby
[17:00:53] justizin: has joined #ruby
[17:00:55] seanh: has joined #ruby
[17:01:06] Iacobus: has joined #ruby
[17:01:06] matthewd: IO.open; some_io_instance.close
[17:01:12] BSAlb: has joined #ruby
[17:01:36] nettoweb: has joined #ruby
[17:02:21] mim1k: has joined #ruby
[17:03:29] impermanence: matthewd: ahh...basic OOP question here then: when I call IO.open(my_file) it creates an instance of IO? I'm asking because you then wrote "some_io_instance.close"...
[17:03:36] matthewd: bob_n00b: Unclear what you're looking for.. what do you dislike about the current arrangement?
[17:03:53] matthewd: impermanence: Correct
[17:07:52] ozcanesen: has joined #ruby
[17:10:59] bob_n00b: matthewd: In a shell script I would often just include larger block of text (var = <EOT ... EOT), but if I tried that here I ended up with lots of quotes and no real refs to true/false, it seemed. Tried stripping " etc. Repeating a command for every line works for a few lines, but I'm trying to figure out what a rubyist would do :)
[17:11:43] brent__: has joined #ruby
[17:11:51] knight33: has joined #ruby
[17:15:08] matthewd: Seems pretty fine to me as is. It's not the sort of pattern one sees a lot, but I think that's just because it's fairly rare to have a blob of data embedded in your code.
[17:15:10] gusrub: has joined #ruby
[17:15:13] Pumukel: has joined #ruby
[17:18:01] cfec0b8d: has joined #ruby
[17:18:07] bob_n00b: next phase is to read from file, I guess yaml or something would be easy
[17:18:15] jaequery: has joined #ruby
[17:19:23] cbyrda: has joined #ruby
[17:21:35] AndBobsYourUncle: has joined #ruby
[17:22:44] aguynamedben: has joined #ruby
[17:23:12] sepp2k: has joined #ruby
[17:24:30] hays: matthewd: I don't know much about structs.. what do you mean when you say to use a struct
[17:24:36] ldnunes: has joined #ruby
[17:26:00] kitikonti: has joined #ruby
[17:26:48] kies: has joined #ruby
[17:27:27] matthewd: hays: Maybe something like http://stackoverflow.com/a/26131816/476979
[17:29:05] LastWhisper____: has joined #ruby
[17:29:42] Cohedrin: has joined #ruby
[17:31:09] cerulean: Hnununununu
[17:31:14] cerulean: - the official word of ruby
[17:31:28] cerulean: if you say this in an interview, you will get the job because only elite ruby hackers know it
[17:32:26] hays: matthewd: hmm.. yeah I think its not that simple. that is cool though. Structure of the data is that it is a hash of arrays of hashes, and that can be recursive. so you might have a hash of an array with another hash of hashes under that
[17:33:14] ramfjord: has joined #ruby
[17:34:19] millerti: has joined #ruby
[17:36:25] miah_: has joined #ruby
[17:37:00] baweaver: ACTION writes that on his list of disqualifiers
[17:37:36] Nicmavr: has joined #ruby
[17:37:45] duderonomy: has joined #ruby
[17:39:31] snickers: has joined #ruby
[17:39:53] aryaching: has joined #ruby
[17:40:00] safetypin: has joined #ruby
[17:40:25] snickers: has joined #ruby
[17:41:17] snickers: has joined #ruby
[17:42:08] snickers: has joined #ruby
[17:42:55] snickers: has joined #ruby
[17:43:48] snickers: has joined #ruby
[17:43:49] xall: has joined #ruby
[17:43:51] ddffg: has joined #ruby
[17:44:29] snickers: has joined #ruby
[17:44:38] BigShip: has joined #ruby
[17:45:12] snickers: has joined #ruby
[17:45:41] BigShip: I'm having an issue with rbenv. After running 'rbenv install 2.4.1' and setting rbenv local and rbenv global to 2.4.1, I'm still missing 'gem' and 'ruby' commands. Any idea what's wrong?
[17:46:03] snickers: has joined #ruby
[17:46:10] BigShip: Also 'type rbenv' returns 'rbenv is hashed'
[17:46:55] snickers: has joined #ruby
[17:47:09] baweaver: !connection Snickers
[17:47:10] ruby[bot]: +bb Snickers!*@*$#ruby-fix-your-connection *!*@83.145.139.197$#ruby-fix-your-connection
[17:47:53] milardovich: has joined #ruby
[17:49:21] baweaver: BigShip: try `which ruby` and `ruby -v`
[17:49:32] baweaver: see if it's in PATH and if it's setting the right version
[17:49:47] baweaver: could be something borked your PATH
[17:49:55] baweaver: You could also try opening a new shell and seeing it that issue persists
[17:50:15] ldnunes: has joined #ruby
[17:50:22] baweaver: Does this happen with any other versions? You might try installing another one and see if it does the same thing
[17:51:01] BigShip: which ruby comes up blank and ruby -v returns 'ruby: command not found'
[17:51:15] cerulean: have you tried rvm?
[17:51:27] cerulean: i think it works better than rbenv. thats just me
[17:51:29] baweaver: Path issue it is.
[17:51:34] cerulean: on the server i don't use any rbenv or rvm
[17:51:44] cerulean: just bundler + local + system gemsets
[17:51:45] BigShip: I also have 'export PATH="$HOME/.rbenv/bin:$PATH"' in my .bashrc
[17:51:59] baweaver: are you using Bash?
[17:52:05] baweaver: some use ZSH and forget to change that
[17:52:18] baweaver: `echo $PATH`
[17:52:23] matthewd: BigShip: Is this a new setup, or just a new ruby version?
[17:52:26] BigShip: I just installed it, so it's not a new issue
[17:52:32] BigShip: matthewd: new setup
[17:52:39] baweaver: it's possible you blitzed it later in the script
[17:53:44] BigShip: baweaver: /home/user/.rbenv/bin is in my path after 'echo $PATH'
[17:53:59] baweaver: and user is correct?
[17:54:00] BigShip: there's nothing in .rbenv/bin other than rbenv bin though?
[17:54:04] BigShip: yeah, user is correct
[17:54:14] BigShip: *other than rbenv
[17:54:21] LastWhisper____: hey guys what's the general consensus with open source PRs? I opened a PR implementing a new feature with tests, and the sole maintainer pasted my code, changed some variables and refactored then merged it himself... don't people usually ask for changes/open a PR to my branch then merge in ?
[17:54:23] matthewd: Yeah, that's not the path entry you need
[17:54:37] baweaver: https://github.com/rbenv/rbenv#understanding-shims
[17:54:41] maattdd: has joined #ruby
[17:54:43] matthewd: (it needs to be there, but it's not the one used for ruby)
[17:54:59] __Yiota: has joined #ruby
[17:55:03] baweaver: LastWhisper____: depends on the project
[17:55:12] LastWhisper____: the readme says to open PR's with tests :(
[17:55:48] matthewd: LastWhisper____: Up to the individual. Often the maintainer will avoid asking for trivial changes because it seems ungrateful to the person who's already done the real work.
[17:56:02] BigShip: I'm confused then, because the directions say to export .rbenv/bin to path. So, should I actually be exporting .rbenv/shims to path then?
[17:56:16] matthewd: BigShip: You should be using rbenv init
[17:56:31] LastWhisper____: matthewd i guess i was just a bit offended since now my name won't be on the changes, and i did all that work
[17:56:38] baweaver: That's what I got from the README at least. Not sure how rbenv works
[17:56:55] baweaver: LastWhisper____: then you should take that up with the owner
[17:57:07] baweaver: there's not much of anything we can do about it
[17:57:07] BigShip: matthewd: yeah, I have eval "(rbenv init -)" at the end of my .bashrc
[17:57:14] LastWhisper____: yeah i'm not starting to stir up crap I'm just wondering if that was convention
[17:57:26] matthewd: BigShip: Do you just need to open a new shell after installing?
[17:57:57] BigShip: matthewd: I've tried 'source .bashrc' logging out and logging back in, and restarting the machine. No luck on any of those
[17:57:59] baweaver: Typically: New issue describing feature -> Ok, we want -> New PR -> Review -> Changes -> Review -> Merge
[17:58:31] baweaver: of course that trivializes some of it, but that's the general idea
[17:58:37] matthewd: LastWhisper____: You could send them an email asking if they would've preferred you do something differently
[17:58:58] matthewd: BigShip: That should be adding shims to your path :/
[17:59:29] BigShip: wowww I'm and idiot. Also, the directions need to be clearer
[17:59:45] matthewd: You're missing a $
[17:59:54] BigShip: I didn't realize you needed to export the output of rbenv init - to your .bashrc and not the command itself
[18:00:03] LastWhisper____: alright guys thank you for the advice I'll reach out to him privately.
[18:00:20] BigShip: matthewd oh derp
[18:00:47] BigShip: matthewd yeah that worked >_<
[18:00:49] BigShip: thanks!!!!
[18:01:34] matthewd: LastWhisper____: Newer maintainers, especially, may just be inexperienced on tooling, and just trying to make do
[18:03:05] LastWhisper____: that makes sense, our company is very strict on opening PRs and following those guidelines so I might have just prematurely expected that, the guy is in fact a new maintainer for an older gem
[18:05:21] yxhuvud: has joined #ruby
[18:06:12] yeticry: has joined #ruby
[18:07:40] fusta: has joined #ruby
[18:11:57] milardovich: has joined #ruby
[18:17:04] Silthias: has joined #ruby
[18:17:08] rgtk: has joined #ruby
[18:19:30] User458764: has joined #ruby
[18:20:26] milardovich: has joined #ruby
[18:20:48] bob_newb: has joined #ruby
[18:20:59] bob_newb: One of you probably see why .each comes as undefined method here(?): https://eval.in/776192 (output to file went well)
[18:21:33] Cohedrin: has joined #ruby
[18:23:00] bob_newb: oh, since the structure is preserved in the yaml, I can just load it plainly: YAML.load_file(file)
[18:23:02] saulod2: has joined #ruby
[18:23:07] Guest96: has joined #ruby
[18:23:45] ldnunes: has joined #ruby
[18:25:23] saulod2: has joined #ruby
[18:30:16] BigShip: has left #ruby: ()
[18:32:55] Robtop__: has joined #ruby
[18:33:49] bob_newb: no, that doesn't load the values back into my array
[18:34:03] Brak____________: has joined #ruby
[18:37:59] mikecmpbll: has joined #ruby
[18:39:59] Rutix: has joined #ruby
[18:39:59] Rutix: has joined #ruby
[18:42:02] rakm: has joined #ruby
[18:43:45] SteenJobs_: has joined #ruby
[18:50:40] maattdd: has joined #ruby
[18:52:42] pilne: has joined #ruby
[18:59:29] muelleme_: has joined #ruby
[19:01:24] chouhoul_: has joined #ruby
[19:02:34] chouhoul_: has joined #ruby
[19:05:53] snockerton: how come puts inside of a class method doesn't go to stdout when i call it from top-level?
[19:06:05] nofxx: has joined #ruby
[19:07:06] toretore: ?code snockerton
[19:07:07] ruby[bot]: snockerton: We can't help you without your code, please post it to https://gist.github.com
[19:08:25] cerulean: if Taylor Swift was a ruby programmer
[19:08:32] cerulean: what do you think would be her first gem
[19:08:40] jaequery: has joined #ruby
[19:09:29] snockerton: https://gist.github.com/adampats/0e42b14df965598d5adaf76ecd7500cb
[19:10:02] marr: has joined #ruby
[19:10:32] toretore: instance variables don't work the way you think they do
[19:11:39] stomar: has joined #ruby
[19:13:00] snockerton: yea, i know i don't use them correctly - that will be question 2 unless it's related to my problem with the puts not getting to stdout
[19:13:33] matthewd: snockerton: It's very related
[19:14:31] milardovich: has joined #ruby
[19:16:26] lxsameer: has joined #ruby
[19:17:03] Silthias1: has joined #ruby
[19:17:11] toretore: snockerton: your `if @verbose` on line 15 is not evaluating to true, which is why you don't see anything on stdout
[19:17:31] toretore: @verbose on line 5 is a completely different variable
[19:18:05] toretore: @verbose on line 15 has never been set, which means it is nil
[19:18:14] toretore: nil is falsy
[19:18:24] ruby[bot]: toretore: # => false (https://eval.in/776214)
[19:19:03] snockerton: ah yes, it's because i pulled that method into this class trying to fix scoping/inheritance problems in another use-case
[19:19:25] snockerton: so what you recommend for getting a "global" constant value into the class method in this case?
[19:19:56] A124: has joined #ruby
[19:21:27] SeepingN: has joined #ruby
[19:21:33] llua: has joined #ruby
[19:21:34] nofxxx: has joined #ruby
[19:21:34] toretore: it's called an instance variable because it's only available inside an instance; you need to set it from inside an instance method
[19:21:43] skweek: has joined #ruby
[19:22:26] toretore: if you want to initialize it with a value from the outside, pass it to `initialize`
[19:27:44] milardovich: has joined #ruby
[19:28:10] ruby[bot]: -bb Snickers!*@*$#ruby-fix-your-connection *!*@83.145.139.197$#ruby-fix-your-connection
[19:29:08] ElderFain: has joined #ruby
[19:30:21] balazs: has joined #ruby
[19:31:41] pupsicle: has joined #ruby
[19:31:56] StoneCypher: has joined #ruby
[19:33:49] steelbird: has joined #ruby
[19:37:20] muelleme_: has joined #ruby
[19:40:56] ozcanesen: has joined #ruby
[19:42:28] karapetyan: has joined #ruby
[19:46:22] enterprisey: has joined #ruby
[19:48:19] crankharder: has joined #ruby
[19:49:48] mrconfused: has joined #ruby
[19:50:00] milardovich: has joined #ruby
[19:50:13] milardovich: has joined #ruby
[19:52:43] moogumbo: has joined #ruby
[19:53:12] crankharder: trying to migrate my scrypt-based user-auth scheme to google firebase. They need a 'hash-key' in order to import the list of users and hashes... does anyone know what scrypt uses for that?
[19:53:23] gusrub: has joined #ruby
[19:53:47] crankharder: they also seem to require 'rounds' and 'mem-cost' - which aren't immediately obvious either
[19:53:50] crankharder: deets here: https://firebase.google.com/docs/cli/auth#file_format
[19:54:38] milardovich: has joined #ruby
[19:54:43] crankharder: as far as I can tell, when you SCrypt::Password.create('foo') you get back "#{salt}$#{hash}" -- where/what are the other things google needs to decrypt?
[19:57:21] daxroc: has joined #ruby
[19:58:49] maattdd: has joined #ruby
[20:00:20] cagomez: has joined #ruby
[20:01:04] ineb: has joined #ruby
[20:03:15] milardovich: has joined #ruby
[20:06:06] paolog: has joined #ruby
[20:06:16] llua: has joined #ruby
[20:06:39] nemish: has joined #ruby
[20:07:06] nemish: I'm trying to disable a task called from another task in my Rakefile
[20:07:37] nemish: I've tried Rake::Task['release_checks'].enhance do Rake::Task['check:symlinks].delete end
[20:07:40] nemish: but no luck
[20:07:53] nemish: does anyone know how to disable a subtask?
[20:08:39] pwnd_nsfw`: has joined #ruby
[20:08:47] patarr: Does anyone know of a utility I can use to enter a ruby expression, and it will generate parentheses for me to indicate the order of evaluation?
[20:08:48] nemish: these are called in from a rake_tasks as part of another gem
[20:09:03] nemish: so i can't modify the original release_checks task
[20:09:15] nemish: and I'd rather not create a wrapper ;)
[20:09:25] ghornet: has joined #ruby
[20:10:03] paolog: has joined #ruby
[20:13:25] Silthias: has joined #ruby
[20:13:59] pwnd_nsfw: has joined #ruby
[20:15:16] Rodya_: has joined #ruby
[20:15:38] mrconfused: has joined #ruby
[20:19:13] outreachdan: has joined #ruby
[20:20:50] zapata: has joined #ruby
[20:24:07] millerti: has joined #ruby
[20:24:39] cerulean: nemish: fork the gem and modify it and then use your version in your Gemfile
[20:25:28] paolog: has joined #ruby
[20:25:45] chouhoulis: has joined #ruby
[20:29:01] cdg: has joined #ruby
[20:29:29] Bob8989|2: has joined #ruby
[20:29:58] milardovich: has joined #ruby
[20:30:34] Silthias: has joined #ruby
[20:30:54] nemish: cerulean: yeah that won't happen :)
[20:31:19] nemish: I would expect some way to disable the task with some sort of syntax like above
[20:31:31] nemish: i tried .clear instead of delete but still ran
[20:31:35] ec\: has joined #ruby
[20:32:33] milardovich: has joined #ruby
[20:32:45] darthvorik_: has joined #ruby
[20:33:18] matthewd: nemish: clear seems to be what you want. Perhaps it's running before you do the clear?
[20:35:19] tolerablyjake: has joined #ruby
[20:37:20] nemish: well i thought enhance was setting pre-reqs on the release_checks task... so you'd think it would run first
[20:37:55] matthewd: Before release_checks, sure.. but not necessarily before other pre-reqs
[20:40:38] outreach_: has joined #ruby
[20:41:14] Silthias1: has joined #ruby
[20:43:13] ec: has joined #ruby
[20:44:31] karapetyan: has joined #ruby
[20:45:44] muelleme_: has joined #ruby
[20:46:27] millerti: has joined #ruby
[20:47:49] Jackneill: has joined #ruby
[20:49:00] balo: de #ruby #erlang #elixir-lang #jruby
[20:49:15] balo: wrong window sry
[20:51:10] nemish: matthewd: yeah but when i run a bundle exec rake release_checks at the end it still fails on check:symlinks
[20:51:18] nemish: so it's still being run during that task
[20:53:20] pytuger: has joined #ruby
[20:53:28] pytuger: has joined #ruby
[20:53:54] Eleeleth: has joined #ruby
[20:55:59] mooser: has joined #ruby
[20:57:44] maattdd: has joined #ruby
[20:58:38] binaryplease: has joined #ruby
[21:02:14] __Yiota: has joined #ruby
[21:03:54] Nicmavr: has joined #ruby
[21:04:05] muelleme_: has joined #ruby
[21:06:29] vifino: has joined #ruby
[21:06:35] bdonnahue: has joined #ruby
[21:07:24] SeepingN_: has joined #ruby
[21:07:39] GodFather: has joined #ruby
[21:15:25] cdg: has joined #ruby
[21:17:08] Jayson_Virissimo: has joined #ruby
[21:19:51] patarr1: has joined #ruby
[21:22:10] patrick99e99: has joined #ruby
[21:22:14] __Yiota: has joined #ruby
[21:25:10] silverdust: has joined #ruby
[21:25:51] patrick99e99: Hi everyone.. I have a recurring rather annoying problem that I run into every 3-6 months, and it makes me insane every time it happens.. basically, the problem is, I get test failures that say: expected: String:1988-06-18T01:23:45.678+00:00 .. got: String:1988-06-18T08:23:45.678Z ... Where I am comparing two dates that have had .iso8601(3) called on them.
[21:26:04] patrick99e99: I don't understand why sometimes Z is there, and other times +00:00 is there
[21:26:15] patrick99e99: does anyone have any idea about why this happens and how to make it stop forever?
[21:26:46] Rodya_: has joined #ruby
[21:27:40] gizmore: has joined #ruby
[21:27:59] Xiti: has joined #ruby
[21:29:06] patrick99e99: omg............. nevermind so sorry.. I thought the times were the same, but I see the problem!
[21:29:33] flips: For saving small amounts of data in an plaintext based format, just go with yaml? Or consider other options? (xml, json, haml or something?)
[21:30:33] flips: s/ an / a /
[21:31:18] govg: has joined #ruby
[21:31:24] andrewhl: has joined #ruby
[21:31:34] andrewhl: has joined #ruby
[21:32:23] sonOfRa: has joined #ruby
[21:32:48] jdm: has joined #ruby
[21:32:54] JeanCarloMachado: has joined #ruby
[21:33:35] blaisebool: has joined #ruby
[21:33:47] blaisebool: hello, I'm new in ruby, I have this code : OPTIONS_DEFAULT = { flags: [], date: nil } and Rubocop complains "Freeze mutable objects assigned to constants [style/MutableConstan]"
[21:34:45] elomatreb: The problem Rubocop is warning you about is that while it is assigned to a constant, you can always change the data in that Hash
[21:35:08] elomatreb: Calling .freeze on the hash prevents mutations
[21:35:36] milardovich: has joined #ruby
[21:35:55] Jayson_Virissimo: >> OPTIONS_DEFAULT = { flags: [], date: nil }.freeze
[21:35:56] ruby[bot]: Jayson_Virissimo: # => {:flags=>[], :date=>nil} (https://eval.in/776249)
[21:37:00] Jayson_Virissimo: Now, if I tried to OPTIONS_DEFAULT[:flags] << flag, it would throw an error.
[21:37:51] blaisebool: but I need to change value later, I don't want to freeze them
[21:38:14] cagomez: has joined #ruby
[21:38:15] elomatreb: Then you probably shouldn't assign it to a constant (all uppercase variable), since that implies that it won't be changed
[21:39:00] Jayson_Virissimo: You know what they say about Ruby: constants aren't, variables don't.
[21:39:10] binaryplease: has joined #ruby
[21:39:25] blaisebool: Jayson_Virissimo what it means ?
[21:39:40] Jayson_Virissimo: You can change a constant.
[21:39:50] blaisebool: I just put it in lower case
[21:39:53] elomatreb: Constants aren't very strictly enforced, even if you reassign it it only warns you, it doesn't stop you
[21:40:14] blaisebool: yes , I noticed that.
[21:40:40] blaisebool: very weird. In C language constant won't change at all
[21:40:48] blaisebool: now I got it
[21:41:43] blaisebool: A rapid and effective response. I really appreciate it
[21:41:58] govg: has joined #ruby
[21:42:50] bkxd: has joined #ruby
[21:44:08] woodruffw: has joined #ruby
[21:44:09] woodruffw: has joined #ruby
[21:44:47] SeepingN: has joined #ruby
[21:45:26] millerti: has joined #ruby
[21:47:36] chichou: has joined #ruby
[21:47:38] maattdd: has joined #ruby
[21:48:50] jdm: has joined #ruby
[21:49:44] b3l914n_: has joined #ruby
[21:55:27] rvaiya: has joined #ruby
[21:58:20] cagomez: has joined #ruby
[22:01:58] __Yiota: has joined #ruby
[22:02:38] gusrub: has joined #ruby
[22:03:06] grh: has joined #ruby
[22:07:39] woodruffw: has joined #ruby
[22:07:39] woodruffw: has joined #ruby
[22:08:30] slima: has joined #ruby
[22:09:51] slima: Hello, How setup timeout in this gem? https://github.com/abates/ruby_expect/ I do something like: exp = RubyExpect::Expect.spawn("/usr/bin/ssh #{se600login}@#{se600host}", :debug => true, :timeout => 1) but is is doesnt work I think.
[22:09:53] Cohedrin: has joined #ruby
[22:12:48] slima: Ah, I see exp.timeout = 10 == 10 secs timeout
[22:14:10] SeepingN: what, you can't log in within 1 second?
[22:14:33] FoX_77: has joined #ruby
[22:14:53] FoX_77: so i have a answer to a qustion
[22:15:28] SeepingN: oh, so do I! "No"
[22:15:43] FoX_77: rails g controller Pages home about
[22:15:44] Nicmavr: has joined #ruby
[22:15:44] baweaver: ACTION raises eyebrow
[22:15:46] elsevero: has joined #ruby
[22:15:53] FoX_77: this was the error Try: gem pristine bindex --version 0.5.0
[22:15:53] FoX_77: /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/spec_set.rb:87:in `block in materialize': Could not find nokogiri-1.7.1 in any of the sources (Bundler::GemNotFound)
[22:16:28] FoX_77: you have to rbenv rehash
[22:16:37] SeepingN: nokogiri always seems to be a pain. why is it so "special"?
[22:17:12] FoX_77: i guess it thinks you dont have a bundle or it will always say error 2 hours later .... rbenv rehash worked
[22:17:47] pifon: has joined #ruby
[22:19:56] electrostat: has joined #ruby
[22:20:02] impermanence: has joined #ruby
[22:27:31] Rodya_: has joined #ruby
[22:27:35] jhack: has joined #ruby
[22:29:21] Talok: has joined #ruby
[22:29:34] Talok: hi everyone
[22:32:57] Talok: has left #ruby: ()
[22:35:41] outreachdan: has joined #ruby
[22:37:39] mim1k: has joined #ruby
[22:41:40] stupidsenpai: has joined #ruby
[22:46:37] Guest96: has joined #ruby
[22:48:47] enterprisey: has joined #ruby
[22:50:14] mooser: has joined #ruby
[22:51:23] esObe: has joined #ruby
[22:56:37] mazeinmaze_: has joined #ruby
[22:58:38] maattdd: has joined #ruby
[22:59:09] jane_booty_doe: has joined #ruby
[23:00:54] Slinky_Pete: has joined #ruby
[23:01:10] bdonnahue: has joined #ruby
[23:08:22] bronson: has joined #ruby
[23:08:24] patarr: has joined #ruby
[23:10:56] CGibsonmm: I have a question about a feature test. line in question= "expect(page.current_path).to eq(post_path(post))" rspec is returning undefined local variable or method `post' for #<RSpec::ExampleGroups::CanViewIndividulPosts:0x007ffb137468a8
[23:11:29] aglorei: has joined #ruby
[23:12:47] baweaver: well where is post defined?
[23:12:56] baweaver: is there an @post perhaps?
[23:13:43] CGibsonmm: I have it defined in my controller, i am going from index to show page, and both are defined in the controller
[23:14:11] baweaver: I'm going to venture a guess that's not correct - "undefined local variable or method `post'"
[23:14:51] CGibsonmm: When i run the server everything works lol
[23:14:54] milardovich: has joined #ruby
[23:14:55] aglorei: has joined #ruby
[23:15:20] baweaver: what does the error say?
[23:15:59] baweaver: there is no such thing as post defined in the context of your test.
[23:16:03] baweaver: you need to fix that
[23:16:17] baweaver: it does not matter that the server works, it's a different context entirely.
[23:16:56] CGibsonmm: got it thanks you!
[23:18:00] outreach_: has joined #ruby
[23:18:21] hutch34_: has joined #ruby
[23:19:16] CGibsonmm: I see I originally had new_post = create(:post), and was just calling (post) ThX
[23:20:39] CloCkWeRX: has joined #ruby
[23:24:11] Ziarkaen: has joined #ruby
[23:29:37] Rodya_: has joined #ruby
[23:30:35] ghornet: has joined #ruby
[23:36:29] impermanence: has joined #ruby
[23:36:38] agent_white: has joined #ruby
[23:44:24] DLSteve: has joined #ruby
[23:44:58] daed: has joined #ruby
[23:48:25] lel: has joined #ruby
[23:51:34] maattdd: has joined #ruby
[23:55:24] lel: has joined #ruby
[23:56:18] Fridtjof: has joined #ruby
[23:59:34] bkxd: has joined #ruby
[23:59:39] mrconfused: has joined #ruby