« Back to channel list

#ruby - 24 September 2015

« Back 1 day Forward 1 day »
[00:00:52] Xiti: has joined #ruby
[00:02:50] EasyCo: beauby: Yah, pretty much what I was thinking. Thanks for validating my thoughts :)
[00:05:29] workmad3: has joined #ruby
[00:06:21] charliesome: has joined #ruby
[00:06:23] bigmac: has joined #ruby
[00:07:40] karapetyan: has joined #ruby
[00:08:54] Liothen: has joined #ruby
[00:08:54] Liothen: has joined #ruby
[00:14:19] scrlearner: has joined #ruby
[00:14:33] broconne: has joined #ruby
[00:15:36] rushed: has joined #ruby
[00:15:37] quazimodo: has joined #ruby
[00:16:41] jenrzzz: has joined #ruby
[00:16:44] freerobby: has joined #ruby
[00:16:45] CanTonic: has joined #ruby
[00:17:49] asxbr: has joined #ruby
[00:21:39] meatherly: has joined #ruby
[00:22:03] pen: has joined #ruby
[00:24:19] benlovell: has joined #ruby
[00:24:46] iamninja: has joined #ruby
[00:27:27] StevenNunez: has joined #ruby
[00:30:43] aaeron: has joined #ruby
[00:30:54] petricore: has joined #ruby
[00:30:57] aaeron: I am trying to use socksproxy with post and multipart.
[00:31:04] aaeron: Not able to find any documentation
[00:31:17] aaeron: Using start functionality
[00:31:54] jdgenes: has joined #ruby
[00:32:07] aaeron: req = Net::HTTP.SOCKSProxy(@proxy_host,@proxy_port).start(uri.host, uri.port).post(uri.path)
[00:32:07] aaeron: req.set_form_data(data) unless data.empty?
[00:32:12] aaeron: Does that seem to be correct?
[00:32:56] willharrison: has joined #ruby
[00:34:15] doublemalt_: has joined #ruby
[00:34:19] jokke1: has joined #ruby
[00:34:21] rapha: has joined #ruby
[00:34:21] heinrich5991: has joined #ruby
[00:34:22] ledestin: has joined #ruby
[00:34:30] allcentury: has joined #ruby
[00:34:40] PaulePanter: has joined #ruby
[00:35:10] jaredrhine: has joined #ruby
[00:36:41] bronson: has joined #ruby
[00:37:33] Coraline: has joined #ruby
[00:37:36] stryek: has joined #ruby
[00:38:34] quazimodo: has joined #ruby
[00:38:41] Ropeney: has joined #ruby
[00:38:58] aaeron: Socksproxy anyone?
[00:41:54] swgillespie: has joined #ruby
[00:43:55] casadei: has joined #ruby
[00:44:51] drbrain: I don't know about SOCKSProxy, but if you're setting the form data on a Post request object, use .start(???).request(your_post_object)
[00:45:31] aaeron: Is there an example u would be able to give?
[00:47:40] UtkarshRay: has joined #ruby
[00:48:53] jordanm: I am getting an error "https://github.com/mitchellh/vagrant-spec.git (at master) is not yet checked out. Run `bundle install` first." with a rakefile that includes "require 'bundler/setup'", but I have ran bundle install successfully
[00:49:25] jordanm: I am using a locally configured path for bundler. Does anyone know what I am getting this error? https://gist.github.com/jmetzmeier/d6c2680701afa1d17853
[00:49:40] microdex: has joined #ruby
[00:50:11] drbrain: aaeron: the POST example following: http://docs.ruby-lang.org/en/2.2.0/Net/HTTP.html#class-Net::HTTP-label-Following+Redirection
[00:50:27] hal_9000: has joined #ruby
[00:51:24] tmtwd: has joined #ruby
[00:51:26] rezzack: has joined #ruby
[00:51:35] jordanm: whoops, I just needed to use "bundle exec rake"
[00:51:44] Igorshp: has joined #ruby
[00:51:50] aaeron: Looking for socks proxy
[00:52:41] EmeraldExplorer: has joined #ruby
[00:52:50] izzol: has joined #ruby
[00:53:34] bestbrents_: has joined #ruby
[00:53:51] drbrain: aaeron: I don't think the SOCKSProxy is documented
[00:53:58] mhenrixon: has joined #ruby
[00:54:12] Gustavo: has joined #ruby
[00:54:50] aaeron: Yeah. I found nothing for that
[00:55:04] drbrain: hrm, ruby doesn't have Net::HTTP::SOCKSProxy, is there a gem you installed?
[00:55:12] Gustavo: has joined #ruby
[00:55:17] freerobby: has joined #ruby
[00:55:19] microdex: is there an easy way to sort a dictionary ?
[00:55:28] hydrozen: has joined #ruby
[00:55:41] drewvanstone: has joined #ruby
[00:55:41] drbrain: microdex: like my_hash.sort ?
[00:56:03] microdex: sorry I thought I was in the python room
[00:56:11] Joufflu: has joined #ruby
[00:56:23] freerobby: has joined #ruby
[00:57:03] drbrain: aaeron: try this: http://stackoverflow.com/questions/13353544/ruby-tor-and-nethttpproxy
[00:57:22] hal_9000_: has joined #ruby
[00:57:52] mary5030: has joined #ruby
[00:58:43] havenwood: has joined #ruby
[00:59:18] siaW: has left #ruby: ()
[00:59:51] michaeldeol: has joined #ruby
[01:01:06] aaeron: Have a gem
[01:01:17] aaeron: The problem is I want to use multipart with socks proxy
[01:01:46] aaeron: drbrain I tried start method.
[01:01:54] aaeron: But does not seem to work with multipart
[01:02:32] meatherly: has joined #ruby
[01:03:47] drbrain: ruboto: ?gist
[01:03:52] xxneolithicxx: has joined #ruby
[01:04:02] havenwood: ?gist aaeron
[01:04:02] ruboto: aaeron, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[01:04:24] drbrain: aaeron: show your code ???
[01:07:26] xxneolithicxx: has joined #ruby
[01:08:26] aaeron: req = Net::HTTP.SOCKSProxy(@proxy_host,@proxy_port).start(uri.host, uri.port).post(uri.path)
[01:08:27] aaeron: req.set_form_data(data) unless data.empty?
[01:08:38] aaeron: havenwood
[01:08:40] ruboto: I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
[01:08:56] Pupeno: has joined #ruby
[01:09:46] drbrain: aaeron: we can't work with that fragment, please paste a minimal reproduction of your problem into gis
[01:10:16] rickmasta: has joined #ruby
[01:12:52] hagabaka: has joined #ruby
[01:12:52] dopamean_: has joined #ruby
[01:13:00] benlieb: has joined #ruby
[01:13:15] aaeron: drbrain this is my code:
[01:13:21] aaeron: def http_post_with_proxy(uri, data)
[01:13:21] aaeron: req = Net::HTTP.SOCKSProxy(@proxy_host,@proxy_port).start(uri.host, uri.port).post(uri.path)
[01:13:21] aaeron: req.set_form_data(data) unless data.empty?
[01:13:21] aaeron: @connection.request(req)
[01:13:28] havenwood: ?flood aaeron
[01:13:29] ruboto: aaeron, Please use https://gist.github.com for more than three lines of text!
[01:13:51] devoldmx: has joined #ruby
[01:13:56] havenwood: ?gist_usage aaeron
[01:13:57] ruboto: aaeron, To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting a new one.
[01:14:18] drbrain: aaeron: have you tried to incorporate http://stackoverflow.com/questions/13353544/ruby-tor-and-nethttpproxy or the POST example following http://docs.ruby-lang.org/en/2.2.0/Net/HTTP.html#class-Net::HTTP-label-Following+Redirection ?
[01:16:43] aaeron: https://gist.github.com/anonymous/35c843c94c0c577f37ef
[01:16:57] aaeron: I tried to do what that post explains
[01:18:52] drbrain: I don't see where you create a separate POST object, then try to send it, as in the example: https://gist.github.com/drbrain/76c9833c7f88f623a70f
[01:19:41] drbrain: in your example, line 2 returns a response object, but you have `req =`
[01:19:48] drbrain: you need to create the request first
[01:20:26] drbrain: an line lines 1-3 of the POST example
[01:20:33] drbrain: an -> as in
[01:21:44] swgillespie: has joined #ruby
[01:25:02] astrobunny: has joined #ruby
[01:25:37] arescorpio: has joined #ruby
[01:27:38] jenrzzz: has joined #ruby
[01:29:42] aaeron: https://gist.github.com/anonymous/892a53cd52a16d54370d
[01:29:47] Travis-42: has joined #ruby
[01:32:27] axl_: has joined #ruby
[01:33:01] xcesariox: has joined #ruby
[01:34:31] Musashi007: has joined #ruby
[01:35:29] tkuchiki: has joined #ruby
[01:36:22] evanjs_: has joined #ruby
[01:37:14] drbrain: aaeron: better, but you still can't set_form_data (line 6) after you've sent the request (line 5)
[01:37:28] bronson: has joined #ruby
[01:38:03] workmad3: has joined #ruby
[01:38:16] mwlang: has joined #ruby
[01:38:19] giuseppesolinas: has joined #ruby
[01:39:41] casadei: has joined #ruby
[01:40:27] aaeron: Let me try that.
[01:40:32] aaeron: I dint use the http object
[01:40:54] reppard: has joined #ruby
[01:41:31] Marsupermammal: has joined #ruby
[01:41:49] cmisenas: has joined #ruby
[01:41:55] Travis-42: would there be any reasonable way to have a method from a parent class, take on the scope of the classes that inherit it? as an example, https://gist.github.com/anonymous/020dc114301d9dcb4f53 ? Or am I likely thinking about this completely incorrectly?
[01:43:03] nettoweb: has joined #ruby
[01:43:04] craysiii: has joined #ruby
[01:43:30] moss: has joined #ruby
[01:43:45] bronson: has joined #ruby
[01:45:46] j4cknewt: has joined #ruby
[01:47:17] willywos: has joined #ruby
[01:48:24] houhoulis: has joined #ruby
[01:48:27] mwlang: Travis-42: I commented on your gist with a solution: https://gist.github.com/anonymous/020dc114301d9dcb4f53
[01:48:34] bluntman: has joined #ruby
[01:50:04] mwlang: Travis-42: known as Ruby mixins: http://ruby-doc.com/docs/ProgrammingRuby/html/tut_modules.html
[01:50:44] Travis-42: ah mwlang, that makes sense. I see how the scope gets applied there, thank you
[01:51:33] j4cknewt: has joined #ruby
[01:51:57] opensource_ninja: has joined #ruby
[01:53:14] solocshaw1: has joined #ruby
[01:53:29] [k-: has joined #ruby
[01:54:14] jesterfraud: has joined #ruby
[01:54:42] mdih: has joined #ruby
[01:55:32] Technodrome: has joined #ruby
[01:55:34] Gustavo: has joined #ruby
[01:56:31] stardiviner: has joined #ruby
[01:57:22] ekain: has joined #ruby
[01:57:36] Yzguy: has joined #ruby
[01:59:18] evanjs: has joined #ruby
[02:00:25] Motoservo: has joined #ruby
[02:02:10] freerobby: has joined #ruby
[02:03:16] drewvanstone: has joined #ruby
[02:03:40] CloCkWeRX: has joined #ruby
[02:04:08] weemsledeux: has joined #ruby
[02:04:18] tejasmanohar_: has joined #ruby
[02:06:26] bruno-: has joined #ruby
[02:07:53] paradisaeidae: has joined #ruby
[02:10:15] twistedpixels: has joined #ruby
[02:12:40] benlovell: has joined #ruby
[02:13:42] freerobby: has joined #ruby
[02:14:20] drewvanstone: has joined #ruby
[02:14:53] AccordLTN: has joined #ruby
[02:16:51] xxneolithicxx: has joined #ruby
[02:19:20] qpls: has joined #ruby
[02:23:01] Yzguy: has joined #ruby
[02:24:04] crdpink: has joined #ruby
[02:24:25] pwnd_nsfw: has joined #ruby
[02:26:43] Kallis: has joined #ruby
[02:26:45] evanjs_: has joined #ruby
[02:26:50] hahuang61: has joined #ruby
[02:29:05] iateadonut: has joined #ruby
[02:29:14] ebragaparah: has joined #ruby
[02:31:11] dopie: has joined #ruby
[02:33:22] benlieb: has joined #ruby
[02:34:24] wookiehangover: has joined #ruby
[02:34:56] Kallis: has joined #ruby
[02:39:21] astrobunny: has joined #ruby
[02:39:46] reppard: has left #ruby: ()
[02:40:46] pen: has joined #ruby
[02:41:57] drewvanstone: has joined #ruby
[02:43:13] saddad: has joined #ruby
[02:44:32] bronson: has joined #ruby
[02:49:47] rushed: has joined #ruby
[02:51:15] havenwood: has joined #ruby
[02:54:30] Yzguy: has joined #ruby
[02:55:33] darkf: has joined #ruby
[02:57:40] bigmac: has joined #ruby
[02:58:02] dongerlord: has joined #ruby
[02:59:19] dongerlord: Ruby is shit I like COBOL much more
[03:00:58] dongerlord: has left #ruby: ()
[03:02:53] stardiviner: has joined #ruby
[03:04:34] jimster: has joined #ruby
[03:05:20] rbennacer: has joined #ruby
[03:05:36] xcesariox: has joined #ruby
[03:05:40] astrobunny: has joined #ruby
[03:05:51] gener1c: has joined #ruby
[03:07:53] drewvanstone: has joined #ruby
[03:08:53] Pupeno: has joined #ruby
[03:09:59] iamninja: has joined #ruby
[03:10:10] willywos: has joined #ruby
[03:10:18] hahuang61: has joined #ruby
[03:11:07] KnownSyntax_: has joined #ruby
[03:11:10] braincrash: has joined #ruby
[03:11:37] KnownSyntax: has joined #ruby
[03:11:55] favadi: has joined #ruby
[03:12:08] banjara: has joined #ruby
[03:12:09] baweaver: !mute dongerlord
[03:12:09] ruboto: +q dongerlord!*@*
[03:12:09] ruboto: -o ruboto
[03:12:23] Feyn: has joined #ruby
[03:12:30] karapetyan: has joined #ruby
[03:12:59] bluOxigen: has joined #ruby
[03:14:37] devoldmx: has joined #ruby
[03:17:32] hal_9000__: has joined #ruby
[03:17:53] scoot: has joined #ruby
[03:19:14] [k-: huehuehue dongerlord
[03:19:18] diego1: has joined #ruby
[03:19:26] diego1: has joined #ruby
[03:23:05] jesterfraud: has joined #ruby
[03:23:53] Blankenship: has joined #ruby
[03:25:03] devoldmx: has joined #ruby
[03:26:09] workmad3: has joined #ruby
[03:28:29] chipotle: has joined #ruby
[03:32:41] armyriad2: has joined #ruby
[03:33:47] gix: has joined #ruby
[03:34:41] krz: has joined #ruby
[03:40:00] Scripore: has joined #ruby
[03:40:26] yfeldblum: has joined #ruby
[03:41:04] phantummm: has joined #ruby
[03:41:46] codecop: has joined #ruby
[03:42:35] robbyoconnor: has joined #ruby
[03:44:35] Gustavo: has joined #ruby
[03:45:28] bronson: has joined #ruby
[03:47:11] hahuang65: has joined #ruby
[03:50:57] Sou|cutter: how does rom-rb devtools work?
[03:51:26] Sou|cutter: looking at a project that uses it, there's a somewhat extensive but out-of-date Gemfile.devtools
[03:51:38] Sou|cutter: I'm wondering if that's a generated file, or what
[03:53:24] Igorshp: has joined #ruby
[03:54:32] Sou|cutter: ehh nevermind, I'm thinking not
[03:57:52] aaeron: has joined #ruby
[03:58:08] RegulationD: has joined #ruby
[03:58:50] mary5030: has joined #ruby
[03:59:40] aaeron1: has joined #ruby
[04:00:02] benlovell: has joined #ruby
[04:03:09] [k-: has joined #ruby
[04:10:18] ndrei: has joined #ruby
[04:11:07] swgillespie: has joined #ruby
[04:13:28] swgillespie: has joined #ruby
[04:14:11] drewvanstone: has joined #ruby
[04:15:21] scoot: has joined #ruby
[04:19:39] agent_white: has joined #ruby
[04:21:43] ruboto: it's morning, see http://www.total-knowledge.com/~ilya/mips/ugt.html
[04:23:25] Luming: has joined #ruby
[04:23:38] Macaveli: has joined #ruby
[04:26:20] Guest65: has joined #ruby
[04:27:16] devoldmx: has joined #ruby
[04:27:39] BTRE: has joined #ruby
[04:27:52] GeissT: has joined #ruby
[04:29:21] jtoy: has joined #ruby
[04:30:23] tmtwd: has joined #ruby
[04:32:24] hahuang61: has joined #ruby
[04:33:52] ankov: has joined #ruby
[04:34:06] Cork: has joined #ruby
[04:35:58] ddrmanxbxfr: has joined #ruby
[04:37:12] sdothum: has joined #ruby
[04:39:07] ankov: has joined #ruby
[04:39:25] krz: has joined #ruby
[04:40:45] sanjayu: has joined #ruby
[04:41:18] solocshaw1: has joined #ruby
[04:41:20] paradisaeidae: has joined #ruby
[04:42:31] ankov: has joined #ruby
[04:43:29] ankov: has joined #ruby
[04:44:12] bb010g: has joined #ruby
[04:45:20] Maletor: has joined #ruby
[04:45:23] agent_white: I know I know. :P
[04:46:20] bronson: has joined #ruby
[04:50:33] j4cknewt: has joined #ruby
[04:54:26] Igorshp: has joined #ruby
[04:54:35] rezzack: has joined #ruby
[04:54:51] psye: has joined #ruby
[04:58:25] baweaver: !mute flavouredfags
[04:58:26] ruboto: +q flavouredfags!*@*
[04:58:26] ruboto: -o ruboto
[04:58:44] nahtnam: has joined #ruby
[05:02:00] davedev24: has joined #ruby
[05:03:23] rickmasta: has joined #ruby
[05:04:16] ndrei: has joined #ruby
[05:04:34] Asher: has joined #ruby
[05:04:49] howdoi: has joined #ruby
[05:06:14] mwlang: has joined #ruby
[05:09:38] bluntman: has joined #ruby
[05:10:21] jenrzzz: has joined #ruby
[05:11:02] gurix: has joined #ruby
[05:12:33] jesterfraud: has joined #ruby
[05:14:12] iamninja: has joined #ruby
[05:14:16] workmad3: has joined #ruby
[05:15:42] dhjondoh: has joined #ruby
[05:16:06] The_Phoenix: has joined #ruby
[05:17:36] Gustavo: has joined #ruby
[05:18:45] allomov: has joined #ruby
[05:19:52] devbug: has joined #ruby
[05:21:55] djbkd: has joined #ruby
[05:24:16] karapetyan: has joined #ruby
[05:24:55] jesterfraud: has joined #ruby
[05:24:59] amystephen: has joined #ruby
[05:25:31] ReK2: has joined #ruby
[05:25:32] ReK2: has joined #ruby
[05:25:35] sivoais: has joined #ruby
[05:26:46] waxjar: has joined #ruby
[05:26:50] bf4: has joined #ruby
[05:27:01] scoot: has joined #ruby
[05:29:47] rezzack: has joined #ruby
[05:30:07] tagrudev: has joined #ruby
[05:30:11] yfeldblum: has joined #ruby
[05:32:42] yfeldblum: has joined #ruby
[05:32:47] astrobunny: has joined #ruby
[05:35:27] nolic: has joined #ruby
[05:35:34] tejasmanohar_: has joined #ruby
[05:35:37] sivoais: has joined #ruby
[05:35:50] scoot: has joined #ruby
[05:36:09] jenrzzz: has joined #ruby
[05:36:19] michaeldeol: has joined #ruby
[05:36:27] r0x0rZ: has joined #ruby
[05:38:54] Scripore: has joined #ruby
[05:45:37] sivoais: has joined #ruby
[05:46:48] TomyLobo: has joined #ruby
[05:47:31] allomov: has joined #ruby
[05:51:25] SOLDIERz: has joined #ruby
[05:51:30] baweaver: Fun problem: https://gist.github.com/baweaver/c9f3f7191a514b14a645
[05:51:43] nofxx: has joined #ruby
[05:51:43] nofxx: has joined #ruby
[05:52:05] j4cknewt_: has joined #ruby
[05:53:52] apeiros: baweaver: aren't A, B C on 1 and other letters on the 0?
[05:54:16] baweaver: miiiight have stole this one from Tesla
[05:54:32] apeiros: hm, actually it seems that ABC is on 2
[05:54:35] baweaver: verbatim, I tend to hunt about Glassdoor for interesting problems
[05:54:47] baweaver: I don't have an old enough phone to know anymore
[05:56:30] [k-: %w[ABC DEF GHI JKL MNO PQRS TUV WXYZ].map(&:chars)
[05:57:02] [k-: let's golf this one
[05:57:23] apeiros: baweaver: I searched google images :)
[05:57:43] rushed: has joined #ruby
[05:59:11] RegulationD: has joined #ruby
[06:01:03] baweaver: ACTION looks for signs of Ox0dea
[06:01:15] baweaver: >>l=%w[ABC DEF GHI JKL MNO PQRS TUV WXYZ].map(&:chars);->*ns{h,*t=ns.map{|n|l[n-2]};h.product(*t).map{|v|v*''}}[2,3]
[06:01:16] ruboto: baweaver # => ["AD", "AE", "AF", "BD", "BE", "BF", "CD", "CE", "CF"] (https://eval.in/438734)
[06:01:17] araujo: has joined #ruby
[06:02:28] [k-: mind boggling
[06:02:29] rattatmatt: has joined #ruby
[06:02:59] yardenbar: has joined #ruby
[06:03:01] araujo: has joined #ruby
[06:03:37] mondayrain: has joined #ruby
[06:03:40] apeiros: map(&:join) < map{|v|v*''}
[06:03:57] baweaver: 104 if I nix the lambda and frontload the array
[06:04:00] baweaver: yea, just noticed.
[06:04:12] baweaver: >>l=%w[ABC DEF GHI JKL MNO PQRS TUV WXYZ].map(&:chars);h,*t=[2,3].map{|n|l[n-2]};h.product(*t).map(&:join)
[06:04:12] apeiros: 2 chars if you can avoid the ()
[06:04:13] ruboto: baweaver # => ["AD", "AE", "AF", "BD", "BE", "BF", "CD", "CE", "CF"] (https://eval.in/438735)
[06:04:37] aaeron: has joined #ruby
[06:04:42] tejasmanohar: has joined #ruby
[06:05:11] baweaver: >> l=%w[ABC DEF GHI JKL MNO PQRS TUV WXYZ].map &:chars;h,*t=[2,3].map{|n|l[n-2]};h.product(*t).map &:join
[06:05:12] ruboto: baweaver # => ["AD", "AE", "AF", "BD", "BE", "BF", "CD", "CE", "CF"] (https://eval.in/438736)
[06:05:19] baweaver: 102, trying to think of how to go lower.
[06:05:27] zenguy_pc: has joined #ruby
[06:05:31] araujo: has joined #ruby
[06:05:47] apeiros: I think [2,3] is not part of the code, no? that's input
[06:06:21] baweaver: was using a lambda for easier input.
[06:07:05] apeiros: I do that too. like ->(x){???code???}.call "X" # then arrow up & change arg is easy
[06:07:34] baweaver: I think 102 is about as short as I can go
[06:07:53] baweaver: trying to think if theres some shorter regexp black magic
[06:07:57] baweaver: but it'd be too long.
[06:08:23] baweaver: wouldn't work
[06:08:37] araujo: has joined #ruby
[06:09:06] bnagy: why do you splat and unsplat t? Can you drop both those *s?
[06:09:40] baweaver: variable input
[06:10:03] nhhagen: has joined #ruby
[06:10:22] baweaver: >> l=%w[ABC DEF GHI JKL MNO PQRS TUV WXYZ].map &:chars;h,*t=[2,3,2].map{|n|l[n-2]};h.product(*t).map &:join
[06:10:23] ruboto: baweaver # => ["ADA", "ADB", "ADC", "AEA", "AEB", "AEC", "AFA", "AFB", "AFC", "BDA", "BDB", "BDC", "BEA", "BEB", " ...check link for more (https://eval.in/438737)
[06:11:05] Macaveli: has joined #ruby
[06:11:13] baweaver: has to work for whatever length
[06:11:13] [k-: bea! that's the start of beaver!
[06:11:15] araujo: has joined #ruby
[06:11:28] baweaver: where's shevy anyways?
[06:11:34] ruurd: has joined #ruby
[06:11:51] apeiros: now all you need is the reverse operation + a dictionary and then you can see what bad words you can spell from your name :)
[06:12:58] devoldmx_: has joined #ruby
[06:13:08] riotjones: has joined #ruby
[06:14:01] hs366: has joined #ruby
[06:14:02] apeiros: >>l=%w[ABC DEF GHI JKL MNO PQRS TUV WXYZ].flat_map.with_index(2){|s,i|s.chars.map{|c|[c,i]}}.to_h;"BAWEAVER".chars.map{|c|l[c]}
[06:14:03] ruboto: apeiros # => [2, 2, 9, 3, 2, 8, 3, 7] (https://eval.in/438739)
[06:14:24] araujo: has joined #ruby
[06:14:29] baweaver: beat me to it,
[06:15:25] dionysus69: has joined #ruby
[06:18:11] eGGsha: has joined #ruby
[06:18:17] Xeago: has joined #ruby
[06:18:18] wookiehangover: has joined #ruby
[06:19:11] bnagy: >> r=('A'..'Z').to_a;[*[3]*5,4,3,4].map{|e|r.shift e}
[06:19:12] ruboto: bnagy # => [["A", "B", "C"], ["D", "E", "F"], ["G", "H", "I"], ["J", "K", "L"], ["M", "N", "O"], ["P", "Q", "R" ...check link for more (https://eval.in/438742)
[06:19:15] bnagy: not shorter :(
[06:20:19] baweaver: >> r=[*?A..?Z];[*[3]*5,4,3,4].map{|e|r.shift e}
[06:20:20] ruboto: baweaver # => [["A", "B", "C"], ["D", "E", "F"], ["G", "H", "I"], ["J", "K", "L"], ["M", "N", "O"], ["P", "Q", "R" ...check link for more (https://eval.in/438743)
[06:21:51] eam: >> r=*?A..?Z;[*[3]*5,4,3,4].map{|e|r.shift e}
[06:21:52] ruboto: eam # => [["A", "B", "C"], ["D", "E", "F"], ["G", "H", "I"], ["J", "K", "L"], ["M", "N", "O"], ["P", "Q", "R" ...check link for more (https://eval.in/438744)
[06:22:22] baweaver: ah, yeah, not necessary
[06:23:11] aganov: has joined #ruby
[06:23:12] apeiros: no words for apeiros or baweaver in /usr/share/dict/words :(
[06:23:23] yfeldblum: has joined #ruby
[06:24:00] ankr: has joined #ruby
[06:24:15] baweaver: I have a mac, so I do.
[06:24:30] apeiros: I have a mac too, I don't. maybe I made a mistake?
[06:24:48] baweaver: IO.readlines('/usr/share/dict/words')
[06:24:55] baweaver: might be a version thing
[06:24:59] apeiros: I used your code + mine to get a map of all words which could be generated, then Array#&'ed it with File.read("/usr/share/dict/words").upcase.split("\n")
[06:25:03] baweaver: http://baweaver.com/blog/2015/09/07/aggregate-active-record/ - just used it to write that.
[06:26:23] skade: has joined #ruby
[06:27:26] eam: >> r=*?A..?Z;[4,3,4,*[3]*5].map{|e|r.pop e} # and use it inverted
[06:27:27] ruboto: eam # => [["W", "X", "Y", "Z"], ["T", "U", "V"], ["P", "Q", "R", "S"], ["M", "N", "O"], ["J", "K", "L"], ["G" ...check link for more (https://eval.in/438745)
[06:27:33] emilkarl: has joined #ruby
[06:28:17] bnagy: won't that cost >= 2 chars though?
[06:28:17] towski_: has joined #ruby
[06:28:26] baweaver: >> l=%w[ABC DEF GHI JKL MNO PQRS TUV WXYZ].map &:chars;h,*t=[2,3].map{|n|l[n-2]};h.product(*t).map &:join
[06:28:27] ruboto: baweaver # => ["AD", "AE", "AF", "BD", "BE", "BF", "CD", "CE", "CF"] (https://eval.in/438748)
[06:28:33] baweaver: is the current at 102
[06:28:37] bnagy: >> r=*?A..?Z;l=[*[3]*5,4,3,4].map{|e|r.shift e};h,*t=[2,3].map{|n|l[n-2]};h.product(*t).map &:join # 95
[06:28:38] ruboto: bnagy # => ["AD", "AE", "AF", "BD", "BE", "BF", "CD", "CE", "CF"] (https://eval.in/438750)
[06:29:24] karapetyan: has joined #ruby
[06:30:33] weemsledeux: has joined #ruby
[06:31:54] baweaver: >> r=*?A..?Z;l=[4,3,4,*[3]*5].map{|e|r.pop e};h,*t=[2,3].map{|n|l[9-n]};h.product(*t).map &:join # 93
[06:31:55] ruboto: baweaver # => ["AD", "AE", "AF", "BD", "BE", "BF", "CD", "CE", "CF"] (https://eval.in/438753)
[06:32:58] baweaver: I can't think of any other way to hack it down.
[06:33:17] baweaver: curious, would you all think that question is too much for an intervie?
[06:33:37] baweaver: not including code golf.
[06:34:01] bnagy: but the golf is the good bit
[06:34:05] firstdayonthejob: has joined #ruby
[06:34:25] eam: I'm surprised ruby doesn't allow .map&:join
[06:34:29] bnagy: then again I would only ever be interviewing hackers o_0
[06:34:42] apeiros: eam: because of #&
[06:34:44] eam: looks like it gets confused with yeah
[06:34:51] apeiros: with the space it assumes prefix &
[06:35:04] baweaver: Scared the heck out of someone with a simpler one: Given a dictionary of words, find counts by first letter.
[06:35:07] apeiros: the subtle ambiguities :)
[06:35:22] eam: I wouldn't have set the precedence of & that way
[06:35:32] baweaver: >> %(foo bar baz) # and.... GOLF
[06:35:33] ruboto: baweaver # => "foo bar baz" (https://eval.in/438754)
[06:35:37] jenrzzz: has joined #ruby
[06:36:26] baweaver: >> %(foo bar baz).map{|w|w[0]}.group_by(&:itself)
[06:36:27] ruboto: baweaver # => undefined method `map' for "foo bar baz":String (NoMethodError) ...check link for more (https://eval.in/438755)
[06:36:35] baweaver: >> %w(foo bar baz).map{|w|w[0]}.group_by(&:itself)
[06:36:36] ruboto: baweaver # => {"f"=>["f"], "b"=>["b", "b"]} (https://eval.in/438756)
[06:36:46] baweaver: back to repl for a sec.
[06:36:51] Marsupermammal: has joined #ruby
[06:37:41] eam: ok ladies and gentlemen, it's been fun good night
[06:38:56] Scripore: has joined #ruby
[06:39:04] j4cknewt: has joined #ruby
[06:40:10] baweaver: %w(foo bar baz).each_with_object({}){|i,o|(o[i[0]]||=0)+=1} # Why does this syntax error?
[06:41:22] drptbl: has joined #ruby
[06:42:05] dionysus69: has joined #ruby
[06:42:06] baweaver: >> %w(foo bar baz).group_by{|i|i[0]}.map{|k,v|[k,v.size]}.to_h # only one char longer
[06:42:07] ruboto: baweaver # => {"f"=>1, "b"=>2} (https://eval.in/438759)
[06:42:57] vjdhama: has joined #ruby
[06:44:08] devoldmx: has joined #ruby
[06:44:09] michael_mbp: has joined #ruby
[06:45:13] michael_mbp: has joined #ruby
[06:46:31] bf4: has joined #ruby
[06:46:59] waxjar: has joined #ruby
[06:47:17] solars: has joined #ruby
[06:47:19] skullcrasher: has joined #ruby
[06:47:36] n008f4g_: has joined #ruby
[06:48:04] [k-_: has joined #ruby
[06:48:12] bronson: has joined #ruby
[06:50:55] iyan: has joined #ruby
[06:51:01] emilkarl: has joined #ruby
[06:52:15] xkickflip: has joined #ruby
[06:53:58] pusewicz: has joined #ruby
[06:55:34] xgoo: has joined #ruby
[06:56:09] ta: has joined #ruby
[06:56:56] greenarrow: has joined #ruby
[06:57:39] ta: has joined #ruby
[07:01:27] rezzack: has joined #ruby
[07:02:21] workmad3: has joined #ruby
[07:03:38] SCHAAP137: has joined #ruby
[07:04:26] scoot: has joined #ruby
[07:08:08] towski_: has joined #ruby
[07:08:17] ruurd: has joined #ruby
[07:09:15] Gnomethrower: has joined #ruby
[07:09:15] Gnomethrower: has joined #ruby
[07:10:26] ndrei: has joined #ruby
[07:12:13] Xeago: has joined #ruby
[07:13:08] workmad3: has joined #ruby
[07:13:33] bayed: has joined #ruby
[07:13:43] towski_: has joined #ruby
[07:15:03] leat: has joined #ruby
[07:17:06] gurix: has joined #ruby
[07:17:26] allomov: has joined #ruby
[07:17:35] Jackneill: has joined #ruby
[07:21:44] youngbaks: has joined #ruby
[07:21:55] j4cknewt_: has joined #ruby
[07:22:14] vjdhama: has joined #ruby
[07:22:53] aswen: has joined #ruby
[07:23:50] certainty: what's the question for that golf?
[07:24:28] pontiki: has joined #ruby
[07:24:42] Pupeno: has joined #ruby
[07:24:46] certainty: >> r=*?A..?Z;l=[4,3,4,*[3]*5].map{|e|r.pop e};h,*t=[2,3].map{|n|l[9-n]};h.product(*t).map &:join # 93
[07:24:48] ruboto: certainty # => ["AD", "AE", "AF", "BD", "BE", "BF", "CD", "CE", "CF"] (https://eval.in/438773)
[07:24:49] certainty: that one i mean
[07:25:08] skade: has joined #ruby
[07:27:14] vjdhama: has joined #ruby
[07:28:54] tesuji: has joined #ruby
[07:29:31] bnagy: certainty: https://gist.github.com/baweaver/c9f3f7191a514b14a645 I think
[07:29:44] certainty: bnagy: thanks
[07:30:04] Spami: has joined #ruby
[07:30:10] bnagy: I was just golfing one section :P
[07:30:26] arup_r: has joined #ruby
[07:32:19] vjdhama: has joined #ruby
[07:32:37] CloCkWeRX: has joined #ruby
[07:37:14] keen______: has joined #ruby
[07:37:18] certainty: >> i=2;j=3;l=*(?A..?Z).each_slice(3);l[i-2].flat_map{|e|([e]*3).zip(l[j-2])}.map &:join
[07:37:20] ruboto: certainty # => ["AD", "AE", "AF", "BD", "BE", "BF", "CD", "CE", "CF"] (https://eval.in/438774)
[07:37:37] certainty: dunno if it's correct
[07:37:58] certainty: without the params it's 76
[07:38:05] ruurd: has joined #ruby
[07:38:32] certainty: anyway gotta work
[07:38:47] last_staff: has joined #ruby
[07:39:04] Igorshp: has joined #ruby
[07:40:29] benlovell: has joined #ruby
[07:44:40] vjdhama: has joined #ruby
[07:44:53] devoldmx: has joined #ruby
[07:44:59] vjdhama: has joined #ruby
[07:45:58] timonv: has joined #ruby
[07:46:54] skullcrasher: has joined #ruby
[07:47:41] skullcrasher: has joined #ruby
[07:48:04] tomphp: has joined #ruby
[07:48:53] Xeago: has joined #ruby
[07:49:08] bronson: has joined #ruby
[07:49:24] Macaveli_: has joined #ruby
[07:49:25] bnagy: you can't use each_slice(3) for sure
[07:50:43] tomphp: has joined #ruby
[07:50:54] drptbl: has joined #ruby
[07:55:50] Shoutsid: has joined #ruby
[07:56:15] stardiviner: has joined #ruby
[07:56:15] skullcrasher: has joined #ruby
[07:57:07] Macaveli: has joined #ruby
[07:57:19] diegoviola: has joined #ruby
[07:58:10] tomphp: has joined #ruby
[07:58:15] chipotle: has joined #ruby
[08:00:39] codenapp_: has joined #ruby
[08:01:02] r0x0rZ: so guys stylistically in the community - is it always better to omit parentheses `()` for functions/methods when there are no arguments?
[08:01:23] Xeago: has joined #ruby
[08:01:34] [k-: definitely yes!
[08:01:55] r0x0rZ: [k-: and the same goes for defining and calling, right?
[08:02:20] scoot: has joined #ruby
[08:02:25] charliesome: has joined #ruby
[08:03:53] jokke-: has joined #ruby
[08:04:08] rdark: has joined #ruby
[08:04:24] burgestrand: has joined #ruby
[08:07:54] tomphp: has joined #ruby
[08:11:09] platzhirsch: has joined #ruby
[08:11:13] bnagy: r0x0rZ: there's a fairly significant movement that prefers no parens at all except when required by the interpreter
[08:11:40] bnagy: ie def blah a, b, c and d = blah 1, 2, 3
[08:11:50] bnagy: hatred of blah() is more or less universal though
[08:13:18] voker57: has joined #ruby
[08:13:58] agent_white: I like ruby and my parens. There's like little pillows for code.
[08:14:08] agent_white: s/They're/There's/
[08:15:26] karapetyan: i have a little mess with modules
[08:15:29] Junaos: has joined #ruby
[08:15:30] agent_white: reverse that... I need sleep.
[08:16:59] SegFaultAX: has joined #ruby
[08:17:00] chthon: has joined #ruby
[08:17:31] ruurd: has joined #ruby
[08:17:43] tomphp: has joined #ruby
[08:18:55] marr: has joined #ruby
[08:19:26] r0x0rZ: bnagy: just coming from Python and JS. I kinda like having parentheses bc you can immediately tell it's a function call. It's just easier for me to read that's all but I will respect how to do it the ruby way and try to learn it properly.
[08:20:00] doublemalt_: has joined #ruby
[08:20:07] blaxter: has joined #ruby
[08:20:08] adaedra: I don't like removing parenthesis on def at all
[08:20:54] djbkd: has joined #ruby
[08:21:03] r0x0rZ: another newbie question regarding gem `test-unit` . When I try to read documentation `ri Test::Unit::TestCase` I don't find anything explaining assertions. Yet my program can use `assert_equal` method.
[08:21:36] vjdhama: has joined #ruby
[08:21:38] r0x0rZ: is `assert_equal` method even part of `test-unit`. what am I doing wrong? I just find ruby documentation a bit diff to read
[08:22:37] scoot: has joined #ruby
[08:22:44] zenguy_pc: has joined #ruby
[08:22:45] dmolina: has joined #ruby
[08:23:00] karapetyan: here is example from book: https://gist.github.com/karapetyan/b9f91f8e58f46fe11959
[08:23:54] gs: has joined #ruby
[08:25:07] karapetyan: why it works? :) seems @customers should be a class variable not instance. Because in this exmaple used extend and that means all method in module will be class methods. And if it class method it's don't works with certain instances of the class?
[08:26:33] r0x0rZ: aah. found my answer. it's in another class `Assertions` so I have to `ri Test::Unit::Assertions` :)
[08:26:44] tobiasvl: karapetyan: why do you think @customers should be a class variable and not an instance variable?
[08:27:18] r0x0rZ: karapetyan: aren't class variables declared with @@ ?
[08:28:26] r0x0rZ: karapetyan: maybe have a look at this. it's my personal note, not perfect because i'm still newbie but you can see the difference -> http://peg.gd/6p9
[08:28:39] karapetyan: tobiasvl: cause @customers contain information about all instances of that class
[08:28:44] amystephen: has joined #ruby
[08:28:56] tobiasvl: r0x0rZ: @@variables are indeed class variables, but you shouldn't use them :) instead, class INSTANCE variables should be used
[08:29:06] charliesome: has joined #ruby
[08:29:10] tobiasvl: karapetyan: ok??? but intent doesn't make functionality :) it's an instance variable
[08:29:27] karapetyan: tobiasvl: don't understand :)
[08:29:30] r0x0rZ: tobiasvl: yes I was just trying to tell him/her in case
[08:29:42] tobiasvl: karapetyan: what don't you understand?
[08:30:01] sandelius: has joined #ruby
[08:30:04] r0x0rZ: karapetyan: take a look at that link.. you might understand it then... or just google ruby instance variables and class variables
[08:30:05] karapetyan: whtbut intent doesn't make functionality << this)
[08:30:52] r0x0rZ: karapetyan: it's like instance methods and class methods (you use def self.mymethod for class methods for example). one has to know what instance and class methods are and why one should use them.
[08:31:44] karapetyan: code from example works fine
[08:32:05] karapetyan: i understand how works instance variables. And understand how works class variables (i think so)
[08:32:13] certainty: ACTION likes parenthesis
[08:32:14] karapetyan: and i just want to ask
[08:32:30] tobiasvl: karapetyan: oh, maybe I misunderstood you then
[08:33:35] j4cknewt: has joined #ruby
[08:33:47] karapetyan: in example above seems better to use class variable instead instance varible. Cause @customers variables in example above don't store any tied to instance information
[08:34:20] giuseppesolinas: has joined #ruby
[08:34:20] tobiasvl: karapetyan: never use class variables
[08:34:25] Xeago: has joined #ruby
[08:34:31] karapetyan: tobiasvl: aaa ? :)
[08:34:37] tobiasvl: if you want to share information between objects in a class, use class instance variables
[08:34:50] tobiasvl: because class variables are very confusing and counter-intuitive
[08:35:07] karapetyan: class - instance varibales ?
[08:35:10] tobiasvl: http://thoughts.codegram.com/understanding-class-instance-variables-in-ruby/
[08:35:29] karapetyan: tobiasvl: thank you!
[08:35:45] r0x0rZ: karapetyan: class instance variable == class variable (in this context)
[08:36:04] tobiasvl: r0x0rZ: that's a lenient context :P
[08:36:16] r0x0rZ: karapetyan: it's good to use when you want to store identical information amongst your object
[08:36:36] r0x0rZ: tobiasvl: ok maybe that was not good example :)
[08:36:54] r0x0rZ: karapetyan: but that link tobiasvl sent you is a good one
[08:37:06] yfeldblum: has joined #ruby
[08:37:26] Hounddog: has joined #ruby
[08:37:27] tobiasvl: class instance variables are instance variables on the class
[08:37:32] tobiasvl: since classes are instances too :)
[08:39:14] karapetyan: nah that to difficult for me yet
[08:39:15] zapata: has joined #ruby
[08:39:17] karapetyan: some kind of magic
[08:39:20] r0x0rZ: tobiasvl: very good explanation
[08:39:48] shevy: karapetyan whenever you see @foo it is an instance variable
[08:40:00] ruurd: has joined #ruby
[08:40:09] karapetyan: shevy: i understand
[08:40:27] karapetyan: but what does mean class - instance - variable? it class + instance ?
[08:40:39] tobiasvl: yes, because as I said, classes are instances (of the class Class)
[08:40:40] burgestrand: When you think instance, you must think instance of *what*.
[08:40:45] jgt2: has joined #ruby
[08:40:51] einarj: has joined #ruby
[08:41:05] tobiasvl: instance variables belong to self. in a class, self is the class. in a regular (instance) method inside the class, self is the instance. so it all depends where you instantiate the @var
[08:41:57] tobiasvl: it is a bit hard to grasp at first, but it makes sense
[08:42:16] quiez: has joined #ruby
[08:42:29] shevy: karapetyan these are instance variables that reside on the class level; class Foo; @bar = 'hi'; end
[08:42:47] shevy: Foo.instance_variables # or something like that
[08:43:46] certainty: >> class Foo; end; Foo.instance_of(Class)
[08:43:47] ruboto: certainty # => undefined method `instance_of' for Foo:Class (NoMethodError) ...check link for more (https://eval.in/438796)
[08:43:52] certainty: >> class Foo; end; Foo.instance_of?(Class)
[08:43:53] ruboto: certainty # => true (https://eval.in/438797)
[08:44:16] r0x0rZ: karapetyan: you can sort of access class instance variable in an instance using `self.class.foo` where foo is @@foo in base class
[08:44:47] karapetyan: ok! thank you so much :) i need to think and read about it now)
[08:44:59] karapetyan: acutally i should do it before ask))
[08:45:00] r0x0rZ: karapetyan: definitely. took me a while to grasp this too.
[08:46:18] c0m0: has joined #ruby
[08:47:40] shay-: has joined #ruby
[08:48:26] gigetoo: has joined #ruby
[08:48:34] r0x0rZ: another newbie question... what is (is there any) relationship between ri documentation and rdocs?
[08:48:41] timonv: has joined #ruby
[08:48:59] yfeldblum: has joined #ruby
[08:49:43] r0x0rZ: basically i don't know what rdoc is
[08:49:53] r0x0rZ: and it's often mentioned alongside various gems
[08:50:01] bronson: has joined #ruby
[08:50:39] vjdhama: has joined #ruby
[08:50:57] karapetyan: tobiasvl: thank you for so detailed explanation :) instance variables belongs to self. Seems it's easy to understand
[08:51:19] karapetyan: tobiasvl: here is how i understand it :) https://gist.github.com/karapetyan/b9006684a11bbfb5bc17
[08:51:59] nfk|laptop: has joined #ruby
[08:52:36] lxsameer: has joined #ruby
[08:53:01] r0x0rZ: karapetyan: i don't think you need that method `show` plus that method is actually a class method, not instance method. you can omit `self.show` method and just call peter.name directly because you have already specified accessor method using `attr_reader`
[08:54:11] workmad3: has joined #ruby
[08:54:54] adaedra: r0x0rZ: rdoc is the core component in ruby managing the documentation. ri is the command that displays this documentation.
[08:55:12] vjdhama: has joined #ruby
[08:56:00] karapetyan: r0x0rZ: i was need to get access to class variable without creating an object (instance that class)
[08:56:30] r0x0rZ: karapetyan: i forked the gist you can have a look
[08:56:54] drewvanstone: has joined #ruby
[08:56:56] r0x0rZ: karapetyan: aah I see
[08:57:03] r0x0rZ: let me do another fix
[08:57:06] DoubleMalt: has joined #ruby
[08:57:40] karapetyan: r0x0rZ: it works now i just show to be sure that i understand correctly :)
[08:58:18] r0x0rZ: karapetyan: yes your original example was right
[08:58:26] karapetyan: thank you folks! seems i understand little bit more now.
[08:58:27] tvw: has joined #ruby
[08:58:33] r0x0rZ: karapetyan: I'm sorry I completely missed that class_variable ... but it's still not perfect
[08:59:14] karapetyan: acutally i got one more question :)
[08:59:42] r0x0rZ: karapetyan: check this -> https://gist.github.com/comatory/1ec93c5791052e3ea5e7
[08:59:43] leafybasil: has joined #ruby
[09:00:14] r0x0rZ: karapetyan: don't mind the indentation
[09:00:16] krisquigley: has joined #ruby
[09:00:21] karapetyan: r0x0rZ: but tobiasvl said that i never should use class vairables like @@
[09:00:22] ishahnaz: has joined #ruby
[09:00:44] r0x0rZ: @@ = class instance variable, @ = instance variable
[09:00:48] leafybas_: has joined #ruby
[09:00:54] adaedra: @@ = class variable
[09:00:56] Stan: has joined #ruby
[09:00:58] mattprelude: has joined #ruby
[09:00:59] shevy: karapetyan yeah why would you want it
[09:01:04] r0x0rZ: karapetyan: i think what he meant was not to use class instance variable and use instance variable instead
[09:01:28] shevy: as tobiasvl explained above, you can use @ for both behaviours; the only thing you don't have compared to a @@ is that these be shared along the children
[09:01:46] r0x0rZ: karapetyan: if you were to add another line to that code `puts peter.class_variable` it will not work... because you can do that only on the class
[09:02:02] karapetyan: shevy: oookk
[09:02:36] r0x0rZ: karapetyan: basically class instance variables are OK if you are subclassing and you want to share the same information among the children classes
[09:02:48] shevy: they are class variables, not class instance variables ;P
[09:02:55] phutchins: has joined #ruby
[09:02:59] bnagy: and they're never OK
[09:03:28] Kendos-Kenlen: has joined #ruby
[09:03:31] karapetyan: thanks :))) to be sure could you give me a simple task to check understanding instance / class variables )
[09:04:48] ruurd: has joined #ruby
[09:04:50] r0x0rZ: karapetyan: check one more example -> https://gist.github.com/comatory/1ec93c5791052e3ea5e7
[09:04:51] bnagy: @@class_var <- bad do not use @class_ivar and @ivar look the same, only the scope they're created in makes them different
[09:05:08] shevy: karapetyan don't use class variables!!!
[09:05:22] r0x0rZ: karapetyan: yes it's confusing :)
[09:05:40] bnagy: r0x0rZ: even more so when people explain it incorrectly
[09:05:43] certainty: unless you actually want @@class_var of course
[09:06:10] shevy: aha but then we have to ask whether they really wanted them :)
[09:06:32] certainty: just wanted to say that there are reasons
[09:06:47] leafybasil: has joined #ruby
[09:06:51] bnagy: pff, name two
[09:07:06] bnagy: I have never seen a use for classvars that wasn't crap design in the first place
[09:07:10] karapetyan: r0x0rZ: https://gist.github.com/karapetyan/70d82b42906f788ae1fb
[09:07:44] karapetyan: r0x0rZ: is my comments corrert?)
[09:07:53] bnagy: at best you can write code where they are not actively being wrong _right now_ and are merely an accident waiting to happen
[09:08:03] r0x0rZ: karapetyan: yes that was the point. you can see that because the class variable it is the same for both instances.
[09:08:22] r0x0rZ: karapetyan: BUT... you could just use instance variable and achieve the same things
[09:08:27] benlovell: has joined #ruby
[09:08:32] karapetyan: r0x0rZ: and actually no matter @@ or @
[09:08:51] karapetyan: r0x0rZ: context where created variable have matter
[09:09:21] r0x0rZ: karapetyan: basically using @ is better... but try doing this `john.class.class_variable = 'bye'` and you see it won't work
[09:09:21] yfeldblum: has joined #ruby
[09:09:48] r0x0rZ: karapetyan: this way you restrict the instances to change some information that needs to be same amongst instances
[09:11:00] karapetyan: thanks! wow thank you!
[09:11:15] r0x0rZ: you can see for yourself -> https://gist.github.com/comatory/1ec93c5791052e3ea5e7
[09:12:04] vjdhama: has joined #ruby
[09:12:06] r0x0rZ: karapetyan: basically when you use `.class` on `john` instance you are calling `self.class_variable` method on the class `Customer`
[09:12:38] r0x0rZ: so `john.class.class_variable` = `Customer.class_variable`
[09:12:47] karapetyan: r0x0rZ: understnad
[09:12:58] r0x0rZ: karapetyan: but it is just getter method.
[09:13:06] bnagy: that link is so wrong on so many levels
[09:13:20] quazimodo: has joined #ruby
[09:13:23] bnagy: r0x0rZ: you shouldn't be trying to teach people, sorry :(
[09:13:36] r0x0rZ: bnagy: I know it's probably simplified
[09:13:56] r0x0rZ: bnagy: I'm not experienced that much but I was just explaining the way I understood it for my purposes
[09:14:03] karapetyan: bnagy: you know that's example from book
[09:14:05] bnagy: @ivars have nothing to do with initialisation, for a start
[09:14:25] karapetyan: and i copy-paste it here cause have some misunderstanding
[09:14:27] bnagy: and calling methods class_variable is just asking for trouble
[09:14:32] skade: has joined #ruby
[09:14:54] ljarvis: ACTION spots a wild @@
[09:14:56] karapetyan: and this is just code that shows how it works nothing more )
[09:15:07] apt-get: has joined #ruby
[09:15:08] karapetyan: r0x0rZ: thank you!
[09:15:24] bnagy: @@ is mfw I see that in people's code
[09:15:43] ruurd: has joined #ruby
[09:15:53] bnagy: anyway, need to cook dinner.
[09:16:03] r0x0rZ: karapetyan: you're welcome but you should read up more on this. I'm probably not doing the best code practices and maybe bnagy is right. Just make sure to read up more on this later.
[09:16:57] karapetyan: r0x0rZ: yes, sure thanks. Now i understand where is instance and where is class variable and that i was need. Thanks
[09:17:03] platzhirsch: has left #ruby: ()
[09:17:23] karapetyan: bnagy: @@ mfw ?
[09:17:38] GreyHands: has joined #ruby
[09:17:56] ljarvis: "my face when" i.e angry
[09:18:14] ljarvis: generally class variables (@@) are frowned upon, and class instances variables are often a better fit
[09:18:57] r0x0rZ: ljarvis: oh boy I hope I don't have dictionary mixed up :) so class vars = @@, class instance vars = @ ?
[09:19:06] ljarvis: they have their place, but they're often misused and way too many beginner tutorials offer them up early on without explaining the caveats
[09:19:34] ljarvis: r0x0rZ: yeah, class instance variable are just instance variables that belong to the class level. Since remember, your class is an instance of the Class class (heh)
[09:20:06] r0x0rZ: ljarvis: ok
[09:20:18] ljarvis: so Customer is actually an instance of Class
[09:20:51] r0x0rZ: ljarvis: yes I understand. it's bit similar in Python where every class is class of Object (or at least it used to be I think)
[09:22:14] ljarvis: https://eval.in/438837 -- not necessarily the best way to do this, it's not thread safe etc etc, but gives you an idea
[09:22:40] ljarvis: generally, 90% of tutorials would use a @@total instead. This is definitely a shit example because that would actually be ok here
[09:23:32] ljarvis: line 2 opens the singleton class for Customer so it can set the accessor on the instance of Class (Customer)
[09:23:51] ljarvis: singleton/meta/eigen/whatever we're calling it today
[09:25:20] devoldmx: has joined #ruby
[09:25:42] r0x0rZ: ljarvis: so line number 3 defines getter and setter methods for the class variable total, right?
[09:25:53] r0x0rZ: ljarvis: i mean lines 2-3
[09:25:57] r0x0rZ: ljarvis: 2-4 dammit
[09:27:24] zeroDivisible: has joined #ruby
[09:27:58] ljarvis: r0x0rZ: for the instance variable
[09:28:07] ljarvis: it's not a class variable, remember
[09:28:15] sp3: ljarvis, hi injekt.
[09:28:23] ljarvis: sp_: hello :)
[09:28:37] benlovell: has joined #ruby
[09:32:47] [k-: has joined #ruby
[09:33:09] wookiehangover: has joined #ruby
[09:33:22] Igorshp: has joined #ruby
[09:34:06] emilkarl: has joined #ruby
[09:35:28] bigkevmcd: has joined #ruby
[09:36:52] face: has joined #ruby
[09:37:13] burgestrand: has joined #ruby
[09:38:37] suchness: has joined #ruby
[09:39:20] Ropeney: has joined #ruby
[09:40:05] suchness: I have a class that listens to a specific change on a number of object, it then runs through a few strategies to define 'restrictions' that is then places on other object based on the state of the object it had listened to. I am struggling with a good name. Initially I was thinking RestrictionGoverner, but I don't like that much. Anyone have any ideas?
[09:40:37] apeiros: Policinator!
[09:40:50] apeiros: ACTION doesn't have a clue and goes for lunch, have fun :)
[09:41:08] Technodrome: has joined #ruby
[09:41:39] ljarvis: RestrictionEnforcementListeningFactoryBean
[09:41:49] vjdhama_: has joined #ruby
[09:44:17] ljarvis: I also don't have any ideas in case that wasnt obvious
[09:44:29] nolic: has joined #ruby
[09:45:09] gregf_: has joined #ruby
[09:46:02] suchness: ljarvis: It's fine. I think this might be evidence my class is doing too much, I will break it down and name the pieces.
[09:48:51] lolmaus: has joined #ruby
[09:50:01] amystephen: has joined #ruby
[09:50:57] bronson: has joined #ruby
[09:52:15] Beoran: has joined #ruby
[09:53:45] skade: has joined #ruby
[09:54:18] gregf_: has joined #ruby
[09:56:06] apt-get: has joined #ruby
[09:56:57] bigmac: has joined #ruby
[09:57:50] jgt2: has joined #ruby
[10:03:10] vjdhama: has joined #ruby
[10:03:18] giuseppesolinas: has joined #ruby
[10:05:28] benlovell: has joined #ruby
[10:06:46] Pupeno: has joined #ruby
[10:08:21] solocshaw: has joined #ruby
[10:08:49] Igorshp: has joined #ruby
[10:09:19] stamina: has joined #ruby
[10:10:01] Timba-as: has joined #ruby
[10:10:38] arup_r: has joined #ruby
[10:19:20] ndrei: has joined #ruby
[10:21:27] ghr: has joined #ruby
[10:22:01] bigmac__: has joined #ruby
[10:22:06] apt-get_: has joined #ruby
[10:23:03] zenguy_pc: has joined #ruby
[10:26:03] rodfersou: has joined #ruby
[10:29:02] vjdhama: has joined #ruby
[10:29:18] startupality: has joined #ruby
[10:29:18] vjdhama: has joined #ruby
[10:29:23] allcentury: has joined #ruby
[10:33:24] emilkarl: has joined #ruby
[10:34:18] workmad3: has joined #ruby
[10:34:40] yottanami: has joined #ruby
[10:35:46] yottanami: I am trying to send a soap wsdl request using Net::HTTP but I got error 500, I can send the XML using SoupUI and it works
[10:36:20] benlovell: has joined #ruby
[10:36:24] platzhirsch: has joined #ruby
[10:36:34] yottanami: I think it can be because of using wrong method how can I find out an API supports Get or Post?
[10:38:36] jackjackdripper: has joined #ruby
[10:40:41] dionysus69: has joined #ruby
[10:40:51] quazimodo: has joined #ruby
[10:40:52] davedev24: has joined #ruby
[10:41:38] absklb: has joined #ruby
[10:41:41] jamesaxl: has joined #ruby
[10:41:49] absklb: i am getting error Don't know how to build task 'assets:clean' while doing that in my Canvas app
[10:41:52] absklb: help please
[10:42:06] absklb: i made changes to one of the view and restarted apache. they are not appearing .
[10:42:09] Sheperson: has joined #ruby
[10:42:21] workmad3_: has joined #ruby
[10:46:34] phutchins: has joined #ruby
[10:48:54] banister: has joined #ruby
[10:50:22] priklyp34r: has joined #ruby
[10:50:24] nux443: has joined #ruby
[10:51:48] bronson: has joined #ruby
[10:52:04] beast: has joined #ruby
[10:53:08] workmad3_: has joined #ruby
[10:53:46] absklb: has left #ruby: ("WeeChat 1.1.1")
[10:54:31] ruurd: has joined #ruby
[10:55:38] yashinbasement: has joined #ruby
[10:56:36] emilkarl: has joined #ruby
[10:56:46] nfk|laptop: has joined #ruby
[10:59:53] giuseppesolinas: has joined #ruby
[11:01:17] iyan: has joined #ruby
[11:02:32] gurix: has joined #ruby
[11:03:05] davedev24: has joined #ruby
[11:03:53] sdothum: has joined #ruby
[11:06:07] Siyfion: has joined #ruby
[11:06:36] emilkarl: has joined #ruby
[11:06:44] jackjackdripper: has joined #ruby
[11:07:12] jackjackdripper: has joined #ruby
[11:07:36] Xeago: has joined #ruby
[11:07:50] jackjackdripper: has joined #ruby
[11:08:32] jackjackdripper: has left #ruby: ()
[11:10:36] mjuszczak: has joined #ruby
[11:11:46] anisha: has joined #ruby
[11:12:37] mjuszczak: has joined #ruby
[11:12:44] diego2: has joined #ruby
[11:13:04] diego2: has joined #ruby
[11:14:33] symbol: has joined #ruby
[11:16:28] xgoo: has joined #ruby
[11:16:32] vondruch: has joined #ruby
[11:16:45] einarj: has joined #ruby
[11:17:24] djbkd: has joined #ruby
[11:18:51] ndrei: has joined #ruby
[11:20:10] ishahnaz: has joined #ruby
[11:22:47] burgestrand: has joined #ruby
[11:23:38] ericjphillips: has joined #ruby
[11:23:43] drewvanstone: has joined #ruby
[11:25:34] pontiki: has joined #ruby
[11:26:04] devoldmx: has joined #ruby
[11:26:36] apt-get: has joined #ruby
[11:30:38] Travis-42: has joined #ruby
[11:31:15] karapetyan: has joined #ruby
[11:31:16] jgt2: has joined #ruby
[11:31:58] unop: has joined #ruby
[11:35:05] atomical: has joined #ruby
[11:37:59] lxsameer: has joined #ruby
[11:39:09] nsuke: has joined #ruby
[11:39:10] Travis-42: has joined #ruby
[11:39:13] youngbaks: has joined #ruby
[11:40:03] slackbotgz: has joined #ruby
[11:40:06] FernandoBasso: has joined #ruby
[11:42:26] ldnunes: has joined #ruby
[11:42:44] vjdhama: has joined #ruby
[11:45:49] syath: has joined #ruby
[11:45:57] alem0lars: has left #ruby: ("Part.")
[11:46:09] quazimodo: has joined #ruby
[11:47:04] Igorshp: has joined #ruby
[11:47:20] charliesome: has joined #ruby
[11:49:31] sgambino: has joined #ruby
[11:50:00] abuzze: has joined #ruby
[11:50:55] Gustavo: has joined #ruby
[11:51:16] krisquigley: has joined #ruby
[11:51:28] drptbl: has joined #ruby
[11:52:12] aswen: has joined #ruby
[11:52:47] bronson: has joined #ruby
[11:53:38] sdothum: has joined #ruby
[11:53:59] godzillaenlacasa: has joined #ruby
[11:54:17] prestorium: has joined #ruby
[12:00:23] vjdhama: has joined #ruby
[12:00:40] mercerist: has joined #ruby
[12:01:07] vjdhama: has joined #ruby
[12:01:41] iceyec_: has joined #ruby
[12:01:56] lolmaus: has joined #ruby
[12:02:01] frmendes: has joined #ruby
[12:02:11] atomical: has joined #ruby
[12:03:05] workmad3_: has joined #ruby
[12:03:34] Jardayn: has joined #ruby
[12:06:39] [k-_: has joined #ruby
[12:07:11] krisquigley: has joined #ruby
[12:08:08] greenarrow: has joined #ruby
[12:08:39] ericjphillips: has joined #ruby
[12:09:12] NeverDie: has joined #ruby
[12:10:14] evanjs: has joined #ruby
[12:10:50] cornerma1: has joined #ruby
[12:10:53] jgt2: has joined #ruby
[12:12:50] gusTester: has joined #ruby
[12:13:06] vjdhama: has joined #ruby
[12:16:29] Scripore: has joined #ruby
[12:17:11] yottanami: has joined #ruby
[12:18:04] yottanami: I want to send numbers to an api like this <par>002205</par> but Ruby will change the number to 1157
[12:18:10] yottanami: How should I fix it?
[12:18:15] yottanami: I can not pass string there
[12:19:46] sameerynho: has joined #ruby
[12:19:48] sgambino_: has joined #ruby
[12:20:27] sonOfRa: yottanami: numbers with leading zeroes are interpreted as base8. Take the string, remove leading zeroes, then convert to a number.
[12:20:52] Spami: has joined #ruby
[12:20:56] asxbr: has joined #ruby
[12:21:48] asxbr: has joined #ruby
[12:22:08] _el_fer_: has joined #ruby
[12:22:29] yottanami: sonOfRa, remove leading zeroes? but in 0033 the 00 are important for me in API
[12:23:08] zenguy_pc: has joined #ruby
[12:23:50] sonOfRa: Err, then just pass a string? I don't see why you can't do that? What exactly are you trying to achieve here?
[12:25:13] yottanami: sonOfRa, I just want to send 002205 to an API using xml Builder gem, as a number not string
[12:25:51] moeabdol: has joined #ruby
[12:26:03] sonOfRa: I don't get why the leading zeroes are important if you're sending a number
[12:26:11] sonOfRa: That doesn't make sense. 002205 is the same number as 2205
[12:26:38] yottanami: sonne, It should be 6 digits
[12:27:03] sonOfRa: That sounds like you're using a really really broken API
[12:27:06] apeiros: yottanami: leading zeros are not a property of a number
[12:27:16] apeiros: yottanami: those are representation. and representation is string.
[12:27:36] kreantos: has joined #ruby
[12:27:40] apeiros: "ten" is also the same number as 10. but you can't write "ten" in ruby to get 10.
[12:27:49] apeiros: representation vs. value.
[12:27:50] yottanami: sonOfRa, Painfull API
[12:28:04] _el_fer_: Hi guys, a newcomer here, hope there's room for one more
[12:28:09] mdih: has joined #ruby
[12:28:20] Guest97149: has joined #ruby
[12:28:24] apeiros: _el_fer_: sure. hi there.
[12:28:33] sonOfRa: yottanami: I'd go tell the vendor to fix their bad API. This is horrible,
[12:29:11] apeiros: yottanami: your XML builder almost certainly accepts a string there.
[12:29:17] apeiros: and that's what you should pass there.
[12:29:47] yottanami: apeiros, Yes Builder accept string but API reject string and I got <faultstring>Charset is not supported.</faultstring>
[12:30:11] apeiros: yottanami: and what lets you conclude the this error is related to how you built that number?
[12:30:14] kreantos: hello, I've got an AES key as a byte array from a partner (same with iv) and now i need to encrypt it. but i don't know in which format i need to bring the key and iv.
[12:30:18] apeiros: sounds like a pretty unrelated error to me
[12:31:04] centrx: has joined #ruby
[12:31:28] burgestrand: _el_fer_: Always!
[12:31:40] yottanami: apeiros, I got this error when send the item like this builder.v2(:serviceId, '002205')
[12:32:12] burgestrand: yottanami: what is builder?
[12:32:18] yottanami: but when I write builder.v2(:serviceId, 002205) I got error because thereis not 2205 and thereis 002205
[12:32:28] Xeago: has joined #ruby
[12:32:32] Kendos-Kenlen: has joined #ruby
[12:32:43] yottanami: Burgestrand, https://github.com/jimweirich/builder
[12:33:10] sonOfRa: yottanami: do you have XML with a schema, or is this just random elements?
[12:33:33] workmad3_: has joined #ruby
[12:33:54] Yzguy: has joined #ruby
[12:34:05] sonOfRa: That charset error sounds like you didn't define an XML charset, and it's not UTF-8 by default, but ruby is.
[12:34:15] _el_fer: thanks apeiros Burgestrand
[12:34:28] yottanami: sonOfRa, It is with schema
[12:35:02] sonOfRa: And what is the type for that numeric attribute?
[12:35:40] yottanami: sonOfRa, I defined by this: builder.instruct!(:xml, :encoding => "UTF-8")
[12:37:48] yottanami: sonOfRa, Type that I am sending or type in API reference
[12:38:53] benlovell: has joined #ruby
[12:39:07] yottanami: sonOfRa, full error is here http://dpaste.com/1VP0E59
[12:39:24] casadei: has joined #ruby
[12:39:46] sonOfRa: Oh I see. The soap API you're talking to doesn't support UTF-8
[12:40:03] karapetyan: has joined #ruby
[12:41:03] sanguisdex: has joined #ruby
[12:41:21] sepp2k: has joined #ruby
[12:42:13] NeverDie: has joined #ruby
[12:43:35] aaeron: has joined #ruby
[12:44:22] vjdhama: has joined #ruby
[12:44:31] p0wn3d__: has joined #ruby
[12:44:53] yottanami: sonOfRa, What is the unknow character in the error: Charset is... (after Charser. it look like space but it is not space)
[12:45:20] aaeron1: has joined #ruby
[12:45:23] dhjondoh: has joined #ruby
[12:45:57] yottanami: maybe it is space!
[12:46:32] yottanami: Are you sure it does not suport utf? because the result is have encoding=\"utf-8\"
[12:46:51] sonOfRa: yottanami: <?xml version=\"1.0\" encoding=\"utf-8\" ?> those escapes don't look right
[12:47:04] Sheperson: has joined #ruby
[12:47:19] frmendes: has joined #ruby
[12:48:35] yottanami: sonOfRa, escapes dont look righ? why?
[12:48:54] pheuko: has joined #ruby
[12:49:00] sonOfRa: because it should be <?xml version="1.0" encoding="utf-8" ?>
[12:49:10] evanjs: has joined #ruby
[12:49:18] sonOfRa: also, UTF-8, not utf-8. Though I'm not sure if that's important
[12:49:25] dhjondoh: has joined #ruby
[12:49:26] ldnunes: has joined #ruby
[12:49:41] aaeron: has joined #ruby
[12:50:04] burgestrand: The escapes look weird because it's an inspected string.
[12:50:34] yottanami: sonOfRa, Yes it is inspected and is the result of Net::HTTP
[12:51:18] sonOfRa: Then check if the SOAP API supports UTF-8
[12:51:26] sonOfRa: It's SOAP. SOAP is old. It might not.
[12:51:51] apeiros: sonOfRa: SOAP is XML. XML originated with utf-8. non-utf-8 afaik came after.
[12:52:02] apeiros: and IMO it's still horrible to have non-utf xml
[12:53:05] sonOfRa: Well, yottanami is sending UTF-8, and the API is responding that the charset isn't supported.
[12:53:09] broconne: has joined #ruby
[12:53:39] bronson: has joined #ruby
[12:53:44] apeiros: I didn't say that was impossible. just that the age of SOAP is not the reason ;-)
[12:53:57] yottanami: sonOfRa, it is responding the charset SPACE isn't supported
[12:54:00] apeiros: I (sadly) have to use some SOAP APIs which use iso-8859-1 as charset.
[12:55:16] Igorshp: has joined #ruby
[12:55:47] yottanami: I change it to builder.instruct!(:xml, :encoding => "iso-8859-1") but I got error yet
[12:56:41] chouhoulis: has joined #ruby
[12:57:47] skade: has joined #ruby
[13:00:51] tkuchiki: has joined #ruby
[13:01:05] bmurt: has joined #ruby
[13:01:37] burgestrand: has joined #ruby
[13:02:27] UtkarshRay: has joined #ruby
[13:02:51] victortyau: has joined #ruby
[13:03:01] ndrei: has joined #ruby
[13:03:17] diegoviola: has joined #ruby
[13:03:44] darix: UTF-8 everywhere
[13:03:53] darix: unless you want to make yourself suffer in the long run
[13:04:06] Hacker-Pro: has joined #ruby
[13:04:09] Hacker-Pro: Who is here a good Programmer c++ ?
[13:04:40] arup_r: many.. why Hacker-Pro ?/
[13:05:20] Hacker-Pro: arup_r you knwo how to use unity 3d ?
[13:06:03] arup_r: No Man!. :(
[13:06:31] Scripore: has joined #ruby
[13:06:48] ItSANgo: has joined #ruby
[13:08:22] whippythellama: has joined #ruby
[13:09:09] bkulbida: has joined #ruby
[13:09:38] benlovell: has joined #ruby
[13:09:51] JDiPierro: has joined #ruby
[13:09:58] _el_fer_: guys, I amm working on a rails3.2 app. I need to perform a multipart upload to s3, and for that I am trying this gem github.com/maxgillett/s3_multipart . I have followed all the needed steps described in the readme, anyway the Upload button is not even trying to hit the bucket.
[13:10:08] terlar: has joined #ruby
[13:10:23] _el_fer_: have you ever performed similar task? do you recommend any other tool for me?
[13:14:30] apeiros: ?rails _el_fer_
[13:14:30] ruboto: _el_fer_, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[13:14:42] terlar: has joined #ruby
[13:15:02] Xeago: has joined #ruby
[13:15:05] _el_fer_: Thank you apeiros and sorry!
[13:15:38] sami: has joined #ruby
[13:16:21] sami: has joined #ruby
[13:16:24] apeiros: np, just telling you where to better get help
[13:16:28] allcentury: has joined #ruby
[13:16:40] favadi: has joined #ruby
[13:16:43] _el_fer_: I know, I appreciate it
[13:19:32] tkuchiki: has joined #ruby
[13:20:57] jstacks: has joined #ruby
[13:22:09] andikr: has joined #ruby
[13:23:33] amar: has joined #ruby
[13:23:57] amar: has left #ruby: ("Leaving")
[13:24:34] malconis: has joined #ruby
[13:24:34] _mak: has joined #ruby
[13:25:11] emilkarl: has joined #ruby
[13:25:37] bigbadbear: has joined #ruby
[13:25:53] vjdhama: has joined #ruby
[13:26:50] devoldmx: has joined #ruby
[13:27:16] malconis: has joined #ruby
[13:27:49] benlieb: has joined #ruby
[13:28:38] hinbody: has joined #ruby
[13:30:48] big|bad|wolf: has joined #ruby
[13:32:16] drewvanstone: has joined #ruby
[13:33:44] workmad3_: has joined #ruby
[13:34:21] [k-: has joined #ruby
[13:34:40] big|bad|wolf: has joined #ruby
[13:34:54] beauby: has joined #ruby
[13:35:33] ragingcake: has joined #ruby
[13:36:34] tacit7: has joined #ruby
[13:38:05] kobain: has joined #ruby
[13:38:38] otacon-: has joined #ruby
[13:39:22] ngscheur1: has joined #ruby
[13:39:48] IceyEC: has joined #ruby
[13:40:18] herbst: has joined #ruby
[13:40:21] benlovell: has joined #ruby
[13:40:28] herbst: how is there a ruby icon in the corner of my irc client?
[13:40:56] herbst: its my client and not a awesome irc feature i missed far or?
[13:41:37] ebragaparah: has joined #ruby
[13:42:02] decoponio: has joined #ruby
[13:42:29] broconne: has left #ruby: ()
[13:43:26] el_fer_: has joined #ruby
[13:44:20] jhass: yep, your client
[13:45:15] chouhoulis: has joined #ruby
[13:45:22] weemsledeux: has joined #ruby
[13:47:13] nettoweb: has joined #ruby
[13:48:20] supergeek: has joined #ruby
[13:48:36] JDiPierro: has joined #ruby
[13:49:31] vjdhama: has joined #ruby
[13:49:32] keen_______: has joined #ruby
[13:49:41] Worf: has joined #ruby
[13:50:49] roxtrongo: has joined #ruby
[13:52:19] youngbaks: has joined #ruby
[13:53:04] wookiehangover: has joined #ruby
[13:53:25] Worf: has left #ruby: ("Konversation terminated!")
[13:53:36] redondo: has joined #ruby
[13:53:44] lolmaus: has joined #ruby
[13:54:33] bronson: has joined #ruby
[13:56:01] s00pcan: has joined #ruby
[13:57:00] IceyEC: has joined #ruby
[13:57:14] quazimodo: has joined #ruby
[13:57:21] voltalio: has joined #ruby
[13:59:31] ruby-lang293: has joined #ruby
[14:00:01] benlovell: has joined #ruby
[14:00:15] jottr: has joined #ruby
[14:01:33] ebragapa_: has joined #ruby
[14:02:26] voltalio: has joined #ruby
[14:03:47] tcopeland: has joined #ruby
[14:03:56] workmad3_: has joined #ruby
[14:06:04] yottanami: How should return Time.now in this format? 20150921064245
[14:06:35] redondo: has joined #ruby
[14:07:00] adaedra: &ri Time#strftime @yottanami
[14:07:00] `derpy: yottanami: http://www.rubydoc.info/stdlib/core/Time#strftime-instance_method
[14:08:12] dstarh: has joined #ruby
[14:09:45] Xeago: has joined #ruby
[14:10:43] ebragaparah: has joined #ruby
[14:12:33] suchness: Has anyone here used state_machine to define an after_transition event that occurs for more than one state machine? For instance, if I define two state machines on a model, is anyone aware of a way to create an after any transition for both of them at once?
[14:12:50] freerobby: has joined #ruby
[14:13:01] apeiros: suchness: you're talking about AASM, yes?
[14:13:24] suchness: apeiros: I am not sure I am familiar with that acronym.
[14:13:41] apeiros: then I guess you're not using that gem :)
[14:13:43] suchness: apeiros: This is what I am referring to: https://github.com/pluginaweek/state_machine
[14:13:52] j4cknewt: has joined #ruby
[14:14:06] apeiros: ah, the gem's name is indeed state_machine. ok.
[14:14:07] suchness: apeiros: Actuallyl, this one: https://github.com/state-machines/state_machines-activerecord
[14:14:22] suchness: But for my purposes they are pretty much the same
[14:14:36] evanjs: has joined #ruby
[14:14:40] casadei: has joined #ruby
[14:16:25] suchness: apeiros: http://pastie.org/private/yhzovbbkfbfrvvdjos84kq
[14:17:06] suchness: The end goal is to notify an external observer that the state changed, which then informs some listeners.
[14:17:33] suchness: Right now I just have this in each state machine: after_transition any => any, :do => lambda { |*args| Observer.notify(*args) }
[14:17:48] suchness: Which is fine, but a bit redundant.
[14:18:05] ndrei: has joined #ruby
[14:18:19] lolmaus_: has joined #ruby
[14:18:22] DuckZ: has joined #ruby
[14:18:55] millerti: has joined #ruby
[14:18:56] arup_r: has joined #ruby
[14:19:09] havenwood: has joined #ruby
[14:19:22] DuckZ: hello, is there a one-liner to print an error message and exit(1) unless status_ok ? is it good to do it like $stderr.puts "zomg err" || exit(1) unless status_ok ?
[14:19:26] apt-get: has joined #ruby
[14:19:42] havenwood: DuckZ: abort 'eek'
[14:19:56] DuckZ: havenwood: ah thanks :)
[14:20:14] skade: has joined #ruby
[14:20:45] aswen: has joined #ruby
[14:21:11] pontiki: has joined #ruby
[14:21:25] DuckZ: so, I'm inside a Dir.chdir(some_path) { } block as hinted here http://stackoverflow.com/questions/10147913/ruby-run-shell-command-in-a-specific-directory
[14:21:29] dopamean_: has joined #ruby
[14:21:41] DuckZ: inside the block I have run_cmake_ok = system("cmake", "-DCMAKE_INSTALL_PREFIX=#{install_prefix}", cmake_path)
[14:21:59] jgt2: has joined #ruby
[14:22:00] DuckZ: but it looks to me it's still running cmake from the outer working dir
[14:22:22] jshow: has joined #ruby
[14:22:30] kies^: has joined #ruby
[14:22:41] DuckZ: but puts Dir.pwd inside the block shows the correct path, so is system not picking up the correct path or what?
[14:22:42] chouhoulis: has joined #ruby
[14:23:10] [k-: (dont do this in a library)
[14:23:18] greenarrow: has joined #ruby
[14:23:29] zenguy_pc: has joined #ruby
[14:24:01] [k-: puts `pwd`?
[14:24:14] [k-: yes, don't abort in a library!
[14:24:35] DuckZ: [k-: that also looks correct
[14:24:50] burgestrand: >> Dir.chdir("/usr") { system("pwd") }
[14:24:51] ruboto: Burgestrand # => (https://eval.in/438992)
[14:24:58] DuckZ: ok, it's not a library, but I can change the code if you have a better way
[14:25:00] burgestrand: Was worth a try. :)
[14:25:24] ruurd: has joined #ruby
[14:25:32] havenwood: [k-: What do you mean about not aborting in a library?
[14:25:46] burgestrand: Either way, to me the chdir will affect the following system call. Dir.chdir("/Users/dev") { system("pwd") } # => /Users/dev
[14:26:03] DuckZ: [k-: ah abort, I thought you said chdir { block }
[14:26:47] DuckZ: Burgestrand: that's also correct... so uhm :/
[14:27:12] praveen_p: has joined #ruby
[14:28:10] praveen_p: has left #ruby: ()
[14:28:34] [k-: has joined #ruby
[14:28:49] apeiros: Dir.chdir considered evil :(
[14:29:02] apeiros: (in threaded envs, that is)
[14:29:11] bigbadbear: has joined #ruby
[14:29:11] [k-: you know, when you write a json parser and you see not-json
[14:29:24] [k-: don't use abort! you will kill the entire program!
[14:29:28] apeiros: [k-: then you raise?
[14:29:48] apeiros: ah, haha, yeah, why raise if you can abort. nice.
[14:29:50] tenderlove: has joined #ruby
[14:30:34] [k-: i'll abort your face!
[14:30:48] DuckZ: in my case it's just a sequence of commands
[14:30:58] DuckZ: small script to automate a task, no lib no fancy stuff
[14:31:02] drewvanstone: has joined #ruby
[14:31:03] kobain: has joined #ruby
[14:31:42] [k-: it was just a heads up
[14:31:57] [k-: in case you write a library in the future (or now)
[14:32:07] dionysus69: has joined #ruby
[14:32:11] DuckZ: yep, good to know :)
[14:32:16] Xeago: has joined #ruby
[14:33:01] i: has joined #ruby
[14:33:22] zenguy_pc: has joined #ruby
[14:33:35] IceyEC: has joined #ruby
[14:33:41] hectortrope: has joined #ruby
[14:33:47] hectortrope: has joined #ruby
[14:34:30] RegulationD: has joined #ruby
[14:35:04] agent_meerkat: has joined #ruby
[14:36:14] skweek: has joined #ruby
[14:36:44] mary5030: has joined #ruby
[14:37:28] mary5030: has joined #ruby
[14:39:30] ebragaparah: has joined #ruby
[14:39:35] tkuchiki_: has joined #ruby
[14:40:19] Xeago: has joined #ruby
[14:41:03] ruurd: has joined #ruby
[14:41:08] n008f4g_: has joined #ruby
[14:42:08] lolmaus_: has joined #ruby
[14:42:28] tkuchiki_: has joined #ruby
[14:42:39] hydrozen: has joined #ruby
[14:44:08] p0wn3d__: has joined #ruby
[14:44:33] danny__: has joined #ruby
[14:45:06] ragingcake: has joined #ruby
[14:47:45] Xeago: has joined #ruby
[14:49:33] apt-get: has joined #ruby
[14:50:04] karapetyan: https://gist.github.com/karapetyan/485e102e9173f54544f8
[14:50:33] karapetyan: to be clear in what cases i actually need instance class variables?
[14:50:40] Gustavo: has joined #ruby
[14:50:46] rbennacer: has joined #ruby
[14:51:23] karapetyan: only when i have class methods?0
[14:51:38] Pumukel: has joined #ruby
[14:51:55] [k-: class instance variables*
[14:52:08] [k-: yes, karapetyan
[14:52:30] jhass: karapetyan: whenever you have the urge to use a @@class_var, use a class level instance var
[14:52:40] [k-: there's also just instance variable
[14:52:41] cjbottaro: has joined #ruby
[14:53:07] Kendos-Kenlen: has joined #ruby
[14:53:18] karapetyan: jhass: understand
[14:53:54] jstacks: has joined #ruby
[14:55:29] bronson: has joined #ruby
[14:55:38] polly_wog: has joined #ruby
[14:55:41] danny__: has left #ruby: ()
[14:56:06] [k-: class Foo; def initialize; @ivar = "hello" end; def bar; @ivar end end; Foo.new.bar
[14:56:16] [k-: >> class Foo; def initialize; @ivar = "hello" end; def bar; @ivar end end; Foo.new.bar
[14:56:17] ruboto: [k- # => "hello" (https://eval.in/439033)
[14:56:57] ericjphillips: has joined #ruby
[14:58:01] memnon34: has joined #ruby
[15:00:46] memnon34: has left #ruby: ()
[15:01:01] memnon34: has joined #ruby
[15:01:25] rippa: has joined #ruby
[15:02:09] leafybas_: has joined #ruby
[15:03:11] vjdhama: has joined #ruby
[15:03:54] Xeago: has joined #ruby
[15:04:10] ericjphillips: has joined #ruby
[15:04:13] Guest89899: has joined #ruby
[15:04:43] tsujp: has joined #ruby
[15:05:27] krz: has joined #ruby
[15:05:56] NeverDie: has joined #ruby
[15:06:15] segfalt: has joined #ruby
[15:06:58] skade: has joined #ruby
[15:09:21] Xeago: has joined #ruby
[15:09:58] karapetyan: has joined #ruby
[15:10:03] voltalio: has joined #ruby
[15:11:23] hoov: has joined #ruby
[15:12:25] scoot: has joined #ruby
[15:13:00] blueOxigen: has joined #ruby
[15:13:55] beauby: Is there a construct in ruby for `myArray.iterate_over_each_element_and_return_the_first_for_which_this_block_does_not_fail { |e| e.mightfail }`?
[15:14:10] burgestrand: beauby: fail as in raise an error?
[15:14:26] beauby: Burgestrand: raise an error or nil, I could do both
[15:14:49] burgestrand: beauby: there's Array#find, which returns the first value for which the block returns a truthy value.
[15:15:07] beauby: Burgestrand: mind you, I'm interested in the result of `e.mightfail`, not `e` itself (let's say `.mightfail` is long to compute)
[15:15:16] beauby: Sorry for not specifying that before
[15:15:20] karapetyan: has joined #ruby
[15:15:24] skade: has joined #ruby
[15:15:49] burgestrand: beauby: I see.
[15:16:03] gener1c_: has joined #ruby
[15:16:18] burgestrand: beauby: you could use a lazy enumerator, I believe that would be the cleanest if you're doing it inline somewhere without exploiting an early return.
[15:16:37] burgestrand: beauby: (incoming???)
[15:16:49] beauby: Burgestrand: That sounds like a great idea
[15:17:11] riotjones: has joined #ruby
[15:17:18] shinnya: has joined #ruby
[15:17:51] Siyfion: has joined #ruby
[15:18:25] burgestrand: beauby: https://repl.it/BKct
[15:18:29] freerobby: has joined #ruby
[15:19:05] beauby: Burgestrand: Yeah that's pretty cool, thanks!
[15:19:24] cschneid_: has joined #ruby
[15:20:26] burgestrand: beauby: another alternative is this: https://repl.it/BKct/1
[15:20:53] burgestrand: beauby: it assumes you're inside a method that you can do an early return from, and through that you can avoid processing the following elements.
[15:20:59] memnon34: has joined #ruby
[15:21:51] burgestrand: beauby: frankly, I kind of prefer this other way of doing it since it's easier to understand what is happening. Using a lazy enumerator to avoid needless processing is a bit unconventional. :)
[15:21:57] beauby: Burgestrand: Oh right, that's hacky but clever
[15:22:01] skade: has joined #ruby
[15:22:15] cjbottaro: has joined #ruby
[15:22:35] beauby: I guess it depends, from a functional point of view, the latter seems a bit odd
[15:22:38] nolic: has joined #ruby
[15:23:02] burgestrand: beauby: the first one is probably more familiar to somebody of e.g. a haskell background, but from a ruby point of view (imo) it's a bit weird.
[15:23:13] cball: has joined #ruby
[15:23:15] burgestrand: not necessarily weird, but new, modern, whatever.
[15:23:41] sdfgsdfg: has joined #ruby
[15:24:00] burgestrand: the second solution is "hacky", but it might also be a valid refactoring target anyway, and it's a bit easier on the implicit details part.
[15:24:12] burgestrand: "hacky" as in it requires a method around it to work.
[15:24:18] burgestrand: I don't consider it hacky. :)
[15:24:32] workmad3: has joined #ruby
[15:24:35] leafybasil: has joined #ruby
[15:24:53] workmad3_: has joined #ruby
[15:25:03] devoldmx: has joined #ruby
[15:25:50] jottr: has joined #ruby
[15:26:16] dfockler: has joined #ruby
[15:26:47] cajone: has joined #ruby
[15:26:56] Rodya_: has joined #ruby
[15:29:15] snapcase: has joined #ruby
[15:29:15] Xeago: has joined #ruby
[15:29:29] beauby: Burgestrand: Coming from C, I'm totally fine with #2 :)
[15:29:42] aaeron: has joined #ruby
[15:30:36] Technodrome: has joined #ruby
[15:31:05] bronson: has joined #ruby
[15:36:02] allomov: has joined #ruby
[15:36:09] zdman135: has joined #ruby
[15:36:30] karapetyan: has joined #ruby
[15:36:43] Uranio-238: has joined #ruby
[15:38:14] tcopeland: has joined #ruby
[15:39:29] Chau: has joined #ruby
[15:40:05] bigbadbear: has joined #ruby
[15:40:24] ruurd: has joined #ruby
[15:40:40] newdan: has joined #ruby
[15:41:06] newdan: Are there any shorthands for a.method(:b)?
[15:41:35] burgestrand: has joined #ruby
[15:41:41] Xeago: has joined #ruby
[15:42:20] Uranio-239: has joined #ruby
[15:43:16] speaking1ode: has joined #ruby
[15:43:36] The_Phoenix: has joined #ruby
[15:43:51] Soda: has joined #ruby
[15:44:04] [k-: what do you mean?
[15:44:27] The_Phoenix: has joined #ruby
[15:44:37] Sou|cutter: seems short to me
[15:45:17] The_Phoenix: has joined #ruby
[15:46:32] The_Phoenix: has joined #ruby
[15:47:40] jcromartie: has joined #ruby
[15:47:48] [k-: >> _== ->_,*__,&___{____=__.shift;___=__.pop if (!block_given? and __.last.to_proc rescue false);_.public_send ____, *__, &___};_["Hello", :+, "1"]
[15:47:49] ruboto: [k- # => undefined local variable or method `_' for main:Object (NameError) ...check link for more (https://eval.in/439040)
[15:48:02] [k-: oops, extra equal there
[15:48:18] The_Phoenix: has joined #ruby
[15:48:20] [k-: but it is not shorter by any means
[15:50:37] rcvalle: has joined #ruby
[15:51:01] Uranio-239: testing if I can write to channel
[15:51:26] frmendes: has joined #ruby
[15:52:03] TomyLobo: has joined #ruby
[15:52:05] voltalio: has joined #ruby
[15:52:09] [Butch]: has joined #ruby
[15:52:15] Xeago: has joined #ruby
[15:53:37] speaking1ode: has joined #ruby
[15:54:00] gurix: has joined #ruby
[15:55:02] mondayrain: has joined #ruby
[15:56:06] [k-: depends on what you want to write
[15:56:11] workmad3_: has joined #ruby
[15:57:08] scoot: has joined #ruby
[15:57:52] shevy: [k- what kind of atrocity!
[15:58:09] michaeldeol: has joined #ruby
[16:00:33] towski_: has joined #ruby
[16:00:34] [k-: hm, what a stupid rescue
[16:00:44] [k-: i should have used respond_to? instead
[16:01:17] SCHAAP137: has joined #ruby
[16:01:51] lolmaus_: has joined #ruby
[16:02:18] DenSchub: has joined #ruby
[16:03:15] [k-: https://eval.in/439046
[16:03:24] amclain: has joined #ruby
[16:03:25] agent_meerkat: has joined #ruby
[16:03:47] karapetyan: if i extend module and in that module exist method and in that method defined @variable is it instance variable or class instance variable?
[16:03:59] hobodave: has joined #ruby
[16:04:13] [k-: instance variable
[16:04:27] hydrozen: has joined #ruby
[16:05:13] rushed: has joined #ruby
[16:05:21] voltalio: has joined #ruby
[16:06:15] tejasmanohar: has joined #ruby
[16:06:21] einarj: has joined #ruby
[16:08:05] codecop: has joined #ruby
[16:08:38] terlar: has joined #ruby
[16:09:21] marchi: has joined #ruby
[16:09:44] ptierno: has joined #ruby
[16:11:03] marchi: has joined #ruby
[16:11:33] Pathfinder_: has joined #ruby
[16:12:52] jgt2: has joined #ruby
[16:13:05] karapetyan: [k-: seems not
[16:13:09] last_staff: has joined #ruby
[16:13:25] karapetyan: https://gist.github.com/karapetyan/1138d84e0b546b47a3e9
[16:14:14] IrishGringo: has joined #ruby
[16:14:20] [k-: that *could* mean you weren't descriptive enough
[16:15:37] [k-: ACTION revises extend
[16:15:54] Xeago: has joined #ruby
[16:16:47] shevy: karapetyan it depends on where you defined it
[16:17:10] Musashi007: has joined #ruby
[16:17:12] [k-: extend adds it as class methods, sorry
[16:17:17] [k-: I was confused
[16:17:19] karapetyan: shevy: look at gist above please @instances ||= [] ## in this case its instance CLASS variable !?
[16:17:20] shevy: in your example you did not define a class instance variable
[16:17:25] kidoz: has joined #ruby
[16:17:30] [k-: therefore, it is a class instance variable
[16:17:48] [k-: karapetyan: the correct term is class instance variable
[16:18:19] voltalio: has joined #ruby
[16:18:20] eosinx: has joined #ruby
[16:18:25] karapetyan: so all variables started at @ and defined in modules that will be extended will be a class instance variables?
[16:18:57] jordanm: has joined #ruby
[16:19:30] shevy: it depends on where you have defined these @
[16:20:45] helpa-bot: has joined #ruby
[16:20:49] __butch__: has joined #ruby
[16:21:19] Miron: has joined #ruby
[16:21:29] elton_: has joined #ruby
[16:21:35] karapetyan: shevy: hm i think no difference where exactly i define @ if i define it in module that will be extended that means all methods in this module will be a class methods. Correct? And therefore this @ variables can be a part of class definition code or part of class methods and in a both cases that will be a class instance variable?
[16:21:42] frog0909: has joined #ruby
[16:22:02] Scripore: has joined #ruby
[16:22:12] Spami_: has joined #ruby
[16:22:21] xgoo: has joined #ruby
[16:23:16] chihhsin_: has joined #ruby
[16:23:37] r0bby_: has joined #ruby
[16:23:47] kylefox: has joined #ruby
[16:24:02] ldnunes_: has joined #ruby
[16:24:04] ckinniburgh: has joined #ruby
[16:24:07] stamina1: has joined #ruby
[16:24:15] leslie: has joined #ruby
[16:24:15] leslie: has joined #ruby
[16:24:16] shortdudey123_: has joined #ruby
[16:24:21] dopamean1: has joined #ruby
[16:24:22] jaygen_: has joined #ruby
[16:24:22] RandyT_: has joined #ruby
[16:24:22] mahlon_: has joined #ruby
[16:24:23] evanjs_: has joined #ruby
[16:24:24] hays: has joined #ruby
[16:24:24] LiquidInsect: has joined #ruby
[16:24:24] hays: has joined #ruby
[16:24:24] TakumoKatekari: has joined #ruby
[16:24:24] TakumoKatekari: has joined #ruby
[16:24:31] sethetter: has joined #ruby
[16:24:33] axisys: has joined #ruby
[16:24:36] wlanboy_: has joined #ruby
[16:24:42] camt: has joined #ruby
[16:24:42] oddmunds1: has joined #ruby
[16:24:48] Papierkorb: has joined #ruby
[16:24:49] evanjs_: So I hear that ruby is slowly being replaced with golang
[16:24:49] nomadic_: has joined #ruby
[16:24:52] certainty: has joined #ruby
[16:24:54] sshuff|gone: has joined #ruby
[16:25:02] ptierno: has joined #ruby
[16:25:11] Synthead: has joined #ruby
[16:25:14] unreal: has joined #ruby
[16:25:36] lianj: has joined #ruby
[16:25:37] lianj: has joined #ruby
[16:25:43] bricker: has joined #ruby
[16:25:54] bhorn1|away: has joined #ruby
[16:26:03] bodie_: has joined #ruby
[16:26:11] [k-: no it is not
[16:26:34] ekleog: has joined #ruby
[16:26:38] bazbing80: has joined #ruby
[16:27:26] redlegion: has joined #ruby
[16:27:26] Matadoer: has joined #ruby
[16:27:39] gregf: has joined #ruby
[16:27:55] Xeago: has joined #ruby
[16:28:06] shevy: karapetyan you use extend, so you add all instance components of a module man
[16:28:14] shevy: karapetyan don't use extend if you don't want this functionality!
[16:28:54] hahuang61: has joined #ruby
[16:29:48] jhass: evanjs_: the blogging crowd moves on since it wrote all there's to write about ruby by now. It's kinda a sign that the community matures ;)
[16:30:00] shevy: I think you can achieve the same via .instance_eval or .class_eval too but you probably have to do it for the whole module, so extend is simpler in this case
[16:30:09] slackbotgz: has joined #ruby
[16:30:23] newdan: Oh wrt my wanting a shorthand for a.method(b) I just want a slightly more elegant way of writing some_array.map &SomeClass.method(:some_method)
[16:30:40] newdan: But if a.method(:b) is as good as it gets then that's fine, just curious
[16:30:43] pyoor: has left #ruby: ()
[16:30:45] scoot: has joined #ruby
[16:30:54] nfk: has joined #ruby
[16:30:54] jhass: evanjs_: go and ruby have quite distinct usecases and benefits, one will never replace the other
[16:31:19] p0wn3d__: has joined #ruby
[16:31:31] adaedra: newdan: some_array.map &:some_method
[16:32:03] jhass: newdan: it pretty much is, I mean you can invent all sorts of crazy pseudo syntaxes with aliases, but meh
[16:32:29] treehug88: has joined #ruby
[16:32:34] leslie: has joined #ruby
[16:32:34] leslie: has joined #ruby
[16:32:45] jhass: I prefer to just write it out for those
[16:32:50] krisquigley: has joined #ruby
[16:32:51] last_staff: has joined #ruby
[16:33:37] karapetyan: has joined #ruby
[16:33:42] newdan: jhass: Sounds good :) Still new to Ruby so didn't know if there was something more idiomatic
[16:34:04] jhass: " {|e| (e) }" is just the same amount of characters than "&.method(:)" and much more readable
[16:34:09] skade: has joined #ruby
[16:34:45] newdan: That's why I wanted a shorthand :P
[16:35:13] newdan: But I get what you're saying
[16:35:38] adaedra: Better to write something standard and easy to be understood by everyone :)
[16:36:17] unop: has joined #ruby
[16:36:38] hahuang61: has joined #ruby
[16:37:57] [k-: i propose an extension to the current syntax then. &:method(arg)
[16:37:59] JDiPierro: has joined #ruby
[16:38:21] jgt2: has joined #ruby
[16:38:38] ramfjord: has joined #ruby
[16:39:01] greenbigfrog: has joined #ruby
[16:39:34] greenbigfrog: Hi... I'm trying to do this: uri = URI.parse("https://gist.githubusercontent.com/" + configatron.githubuser + "/" + configatron.gist "/raw/")
[16:39:34] greenbigfrog: I think this is not how I'm supposed to do it with ruby... How do I have to do that?
[16:40:04] adaedra: I don't get what you're trying to do
[16:40:26] greenbigfrog: parse a dynamic url...
[16:40:38] adaedra: You may miss a + before "/raw/"
[16:40:56] j4cknewt: has joined #ruby
[16:41:01] adaedra: Also, prefer string interpolation when assembling a string: "#{a}-#{b}" instad of a + "-" + b
[16:41:10] Miron: has joined #ruby
[16:42:00] greenbigfrog: like this? uri = URI.parse("https://gist.githubusercontent.com/#{configatron.githubuser}/#{configatron.gist}/raw/")
[16:42:19] adaedra: Looks like it. Does it works?
[16:42:40] memnon34: has joined #ruby
[16:42:46] greenbigfrog: has left #ruby: ()
[16:42:47] beauby: has joined #ruby
[16:43:27] Xeago: has joined #ruby
[16:43:31] FernandoBasso: has joined #ruby
[16:43:39] Synthead: has joined #ruby
[16:43:41] bougyman: gregf: why not use join?
[16:43:45] bougyman: oh, he's gone.
[16:44:09] bougyman: I'd use configatron = OpenStruct.new(githubuser: 'bougyman', gist: 'xryd7'); uri = URI.parse(File.join("https://gist.githubusercontent.com", configatron.githubuser, configatron.gist, "/raw/")) => #<URI::HTTPS:0x000000015531a0 URL:https://gist.githubusercontent.com/boug
[16:44:15] bougyman: yman/xryd7/raw/>
[16:44:15] bougyman: and I didn't mean to paste that
[16:44:18] bougyman: [8] pry(main)>
[16:44:25] djbkd: has joined #ruby
[16:44:26] ebragaparah: has joined #ruby
[16:44:47] voltalio: has joined #ruby
[16:44:51] gregf: two gregf's enter only one remains
[16:45:43] snockerton: has joined #ruby
[16:46:43] Hanmac: bougyman: hm also do you need the two / at the raw part?
[16:47:13] bougyman: no, could just be 'raw'
[16:47:17] bougyman: missed that one
[16:47:28] pragmatism: has joined #ruby
[16:47:55] VeryBewitching: has joined #ruby
[16:48:14] michael_mbp: has joined #ruby
[16:48:16] bougyman: we require using File.join on url creation from strings now
[16:48:31] bougyman: too many missing (or extra) / doing it with interpolation/concatenation
[16:48:49] ebragaparah: has joined #ruby
[16:49:33] petricore: has joined #ruby
[16:50:20] yqt: has joined #ruby
[16:50:33] Maletor: has joined #ruby
[16:51:38] mondayrain: has joined #ruby
[16:51:57] nolic: is it safe to use File.join for an url ? I mean the separator for file separator could not be a '/' for some weird os. right ?
[16:52:04] timonv: has joined #ruby
[16:52:46] Igorshp: has joined #ruby
[16:53:35] Respek: has joined #ruby
[16:53:40] [k-: has joined #ruby
[16:54:25] lolmaus_: has joined #ruby
[16:55:44] ghoti: has joined #ruby
[16:55:49] devoldmx: has joined #ruby
[16:56:09] Scripore: has joined #ruby
[16:56:52] djbkd: has joined #ruby
[16:57:00] zdman135: has joined #ruby
[16:57:25] skakri: nolic: I don't think so, I'd use list with .join '/'
[16:57:32] ta: has joined #ruby
[16:58:56] towski_: has joined #ruby
[16:59:33] gusTester1: has joined #ruby
[16:59:35] j4cknewt_: has joined #ruby
[17:01:52] NeverDie: has joined #ruby
[17:02:14] Pathfinder_: has joined #ruby
[17:02:47] firstdayonthejob: has joined #ruby
[17:03:43] j4cknewt: has joined #ruby
[17:04:30] ragingcake: has joined #ruby
[17:04:46] dopie: has joined #ruby
[17:06:35] yeticry: has joined #ruby
[17:08:23] aswen: has joined #ruby
[17:10:25] postmodern: has joined #ruby
[17:10:41] krisquigley: has joined #ruby
[17:10:55] aaeron: has joined #ruby
[17:11:10] banjara: has joined #ruby
[17:11:35] banjara1: has joined #ruby
[17:11:58] FernandoBasso1: has joined #ruby
[17:11:58] rushed: has joined #ruby
[17:12:26] hfp_work: has joined #ruby
[17:12:34] Moblin: Question. If I wanted to take one array, [a,b,c] and I wanted to run it through another array [x, y, z, a, , r, t, c] and return true if any instance of a,b,c in the second only occurred in that order... what method should I use?
[17:13:00] ptierno: has joined #ruby
[17:13:16] bb010g: has joined #ruby
[17:13:21] newdan: has left #ruby: ()
[17:14:04] yeticry: has joined #ruby
[17:14:11] Moblin: I'm thinking I'd have to use the enumerable select to go through the second array looking for matches... and then somehow run a check on those to determine the correct order. But I'm pretty sure I'm missing something basic and vital to make this logic play out correctly.
[17:14:26] SCHAAP137: has joined #ruby
[17:14:38] [k-: a subsequence!
[17:15:00] ragingcake: has joined #ruby
[17:15:10] luckyme: has joined #ruby
[17:15:13] Kendos-Kenlen: has joined #ruby
[17:16:02] Moblin: Looking that up presently
[17:16:05] workmad3_: has joined #ruby
[17:16:07] Macaveli: has joined #ruby
[17:16:38] Macaveli: has joined #ruby
[17:17:47] Macaveli: has joined #ruby
[17:18:26] Macaveli: has joined #ruby
[17:19:00] Macaveli: has joined #ruby
[17:20:35] apt-get: has joined #ruby
[17:20:53] Hanmac: has joined #ruby
[17:21:17] drptbl: has joined #ruby
[17:21:47] [Butch]: has joined #ruby
[17:24:16] apt-get: has joined #ruby
[17:24:38] shadoi: has joined #ruby
[17:26:09] UtkarshRay: has joined #ruby
[17:26:36] chihhsin: has joined #ruby
[17:27:58] voltalio: has joined #ruby
[17:28:01] Pupeno_: has joined #ruby
[17:28:38] platzhirsch: has left #ruby: ()
[17:29:42] scoot: has joined #ruby
[17:29:47] to_json: has joined #ruby
[17:30:13] drbrain: nolic: there's also URI.join if you have a URI instance
[17:30:35] to_json: If I have the name and version of a gem, is there any way to figure out what dependencies it will install *before* installing it?
[17:31:03] to_json: preferably from within ruby, but shell works too in a pinch
[17:31:06] atomical_: has joined #ruby
[17:31:16] drbrain: to_json: gem dep -r name -v version
[17:31:35] gix: has joined #ruby
[17:32:10] yfeldblum: has joined #ruby
[17:32:13] djbkd: has joined #ruby
[17:32:23] to_json: omg thang you
[17:33:09] vF3hNGxc47h8: has joined #ruby
[17:33:38] pipework: ACTION wonders what drbrain's next evolution looks like
[17:33:46] karapetyan: when Extend module does it have same method like included? when mixin module?
[17:34:00] karapetyan: not same... similar
[17:34:02] shadoi: Extend adds class methods
[17:34:52] yfeldblum: has joined #ruby
[17:35:19] JCOE: has joined #ruby
[17:35:21] karapetyan: shadoi: ah :)
[17:35:21] Xeago: has joined #ruby
[17:35:24] sagittarian: has joined #ruby
[17:36:59] hfp_work: has joined #ruby
[17:37:13] craysiii: has joined #ruby
[17:37:23] hahuang65: has joined #ruby
[17:38:06] tkuchiki: has joined #ruby
[17:38:58] Moblin: I dont know how to use the subsequence, but I got it working through a select includes / followed by a #each < comparison of the remainder. Thanks
[17:40:08] scoot_: has joined #ruby
[17:40:29] tejasmanohar_: has joined #ruby
[17:40:42] sagittarian: I'm rewriting a bunch of code in Ruby that was originally written in Python, and the code makes extensive use of Python's decorators
[17:40:59] nateberkopec: has joined #ruby
[17:40:59] sagittarian: can anyone point me to features/techniques in Ruby that can be used to a similar effect as decorators in Python?
[17:42:21] ragingcake: has joined #ruby
[17:43:21] bricker: sagittarian: the closest thing I can think of is alias_method_chain from Rails, but there's nothing built-in to Ruby similar to Python's decorators unfortunately
[17:43:30] krisquigley: has joined #ruby
[17:43:35] bricker: even alias_method_chain isn't that close
[17:43:56] sagittarian: rails is fine, this is a plugin for a rails app
[17:44:27] sagittarian: it doesn't have to be the exact same thing, just as long as it allows me to keep approximately the same structure
[17:45:33] sagittarian: if i have some logic that I was to add to various different methods by wrapping them, is there some kind of metaprogramming i could use to keep all that logic in a single place?
[17:47:15] kinduff: has joined #ruby
[17:48:09] dionysus70: has joined #ruby
[17:48:10] NeverDie: has joined #ruby
[17:48:14] kinduff: has joined #ruby
[17:48:19] skweek: has joined #ruby
[17:48:39] yardenbar: has joined #ruby
[17:48:55] FernandoBasso: has joined #ruby
[17:48:56] hydrozen: has joined #ruby
[17:51:44] Coldblackice: has joined #ruby
[17:52:13] wildlander: has joined #ruby
[17:52:19] speaking1ode: has joined #ruby
[17:52:22] kinduff: has joined #ruby
[17:52:37] TheHodge: has joined #ruby
[17:52:57] IrishGringo: has joined #ruby
[17:54:03] tomphp: has joined #ruby
[17:54:08] havenwood: has joined #ruby
[17:55:27] agent_meerkat: has left #ruby: ()
[17:56:20] jamesaxl|2: has joined #ruby
[17:57:09] baweaver: has joined #ruby
[17:59:43] youngbaks: has joined #ruby
[17:59:52] pandaant: has joined #ruby
[18:00:52] frmendes: has joined #ruby
[18:01:04] sagittarian: does anyone understanding this: http://yehudakatz.com/2009/07/11/python-decorators-in-ruby/ (and can give me a pointer regarding how it works)?
[18:01:34] railz990: has joined #ruby
[18:01:42] kinduff: has joined #ruby
[18:01:52] railz990: Hi. What is catch and throw used for in Ruby?
[18:02:22] hal_9000__: railz990: catch and throw are advanced flow control
[18:02:30] hal_9000__: not for exceptions
[18:03:08] railz990: hal_9000__: Yes I know. What is it used for then?
[18:03:17] hal_9000__: sort of like a very limited forward-only goto
[18:03:59] railz990: Is it used often?
[18:04:00] hal_9000__: as a weird example, suppose you have four nested loops and want to jump out of the inner three but not the fourth
[18:04:02] kobain: has joined #ruby
[18:04:07] hal_9000__: not often, i think
[18:04:20] pwnd_nfsw: has joined #ruby
[18:04:42] railz990: hal_9000___: oh so basically it lets you choose where you want to break out to?
[18:05:57] hal_9000__: yes, you have a block associated with the catch, and the throw jumps out of that block, as i recall
[18:07:05] agent_meerkat: has joined #ruby
[18:07:20] cantaberry: has joined #ruby
[18:07:38] Scripore: has joined #ruby
[18:08:06] n008f4g_: has joined #ruby
[18:08:24] deeej: has joined #ruby
[18:08:56] nzst: has joined #ruby
[18:10:11] dfockler: has joined #ruby
[18:12:15] baweaver: has joined #ruby
[18:12:34] EmeraldExplorer: has joined #ruby
[18:13:26] lulzmachine: has joined #ruby
[18:13:52] sharkman: has joined #ruby
[18:14:15] sharkman: im working on a project on bitbucket. should i be adding the schema.db onto bitbucket after i make migrations
[18:14:30] sharkman: or will the other computers generate their own schema.db after running the migrations locally
[18:15:35] dasher00: has joined #ruby
[18:15:50] havenwood: has joined #ruby
[18:16:21] baweaver: params: that'd be rails
[18:16:26] ramfjord: has joined #ruby
[18:16:37] baweaver: dangit scrollback
[18:16:56] dorei: has joined #ruby
[18:17:33] skade: has joined #ruby
[18:18:02] jgpawletko: has joined #ruby
[18:18:38] dfockler: has joined #ruby
[18:18:50] shevy: beaver is back \o/
[18:19:07] hydrozen: has joined #ruby
[18:19:49] baweaver: you do know that highlights for me now, right
[18:19:50] skweek: has joined #ruby
[18:20:51] adaedra: nice way to make people learn to <Tab>.
[18:21:09] dseitz: has joined #ruby
[18:21:24] Gustavo: has joined #ruby
[18:21:42] kadoppe: has joined #ruby
[18:22:06] radgeRayden: has joined #ruby
[18:23:11] solocshaw: has joined #ruby
[18:24:36] NeverDie: has joined #ruby
[18:24:39] nhhagen: has joined #ruby
[18:25:15] jobewan: has joined #ruby
[18:25:56] ruurd: has joined #ruby
[18:26:52] toretore: has joined #ruby
[18:27:09] Scripore: has joined #ruby
[18:27:23] j4cknewt_: has joined #ruby
[18:28:11] leafybasil: has joined #ruby
[18:28:55] workmad3_: has joined #ruby
[18:31:20] ldnunes: has joined #ruby
[18:31:53] aibot: has joined #ruby
[18:33:26] Anti-Pizza: has joined #ruby
[18:34:17] scoot: has joined #ruby
[18:35:20] mosez: has joined #ruby
[18:38:22] bronson: has joined #ruby
[18:38:56] tsujp: has joined #ruby
[18:39:06] krz: has joined #ruby
[18:39:08] jdawgaz: has joined #ruby
[18:39:13] failshell: has joined #ruby
[18:39:54] aaeron: has joined #ruby
[18:41:22] moparisthebest: has joined #ruby
[18:41:50] sagittarian: is there some metaprogrammy way to intercept a method call on a object, even if the relevant method is defined?
[18:41:57] moparisthebest: Any idea how I'd go about fixing or getting around this error which is crashing a program: /usr/local/lib/ruby/2.0.0/set.rb:86: stack level too deep (SystemStackError)
[18:43:01] jhass: moparisthebest: show the part of the stacktrace that goes through your code and the corresponding code
[18:43:03] pipework: sagittarian: What'd you google?
[18:43:17] pipework: There's Kernel#set_trace_func, but it won't be fast.
[18:43:29] vjdhama_: has joined #ruby
[18:43:32] moparisthebest: jhass: that's the entire message
[18:43:44] sagittarian: pipework: nothing, i'm just speculating
[18:43:52] jhass: moparisthebest: really? so how do you produce it?
[18:44:04] sagittarian: i'm thinking maybe i could define something that would work kind of like alias_method or something
[18:44:10] pipework: sagittarian: Yeah, you might want to spend 2s googling about then.
[18:44:18] pipework: Just for the future.
[18:44:20] sagittarian: pipework: about what?
[18:44:24] jenrzzz: has joined #ruby
[18:44:25] sagittarian: i don't know what to google
[18:44:28] moparisthebest: jhass: running this program: https://github.com/discourse/discourse/blob/master/script/import_scripts/smf2.rb
[18:44:37] sagittarian: that's why i'm asking
[18:44:39] pipework: sagittarian: 'ruby method called hook'
[18:44:40] podman: has joined #ruby
[18:44:44] moparisthebest: the output to console is just:
[18:44:45] moparisthebest: \/usr/local/lib/ruby/2.0.0/set.rb:86: stack level too deep (SystemStackError)
[18:44:52] [k-: I'm sure Ox0dea will have something on your
[18:44:55] pipework: Pretty much just break down your words into the most likely short phrases.
[18:45:03] sagittarian: pipework: excellent, thanks
[18:45:04] pipework: Level up your google-fu!
[18:45:09] [k-: s/your/this/
[18:45:10] pipework: It's probably the best skill to have.
[18:45:17] NeverDie: has joined #ruby
[18:45:19] yardenbar: has joined #ruby
[18:45:24] hashrocket: has joined #ruby
[18:45:32] jhass: moparisthebest: best hit up discourse support then
[18:45:57] moparisthebest: I don't really *know* ruby all that well, but I don't see anything to do with recursion at a glance, that'd be a recursion-caused-error right?
[18:46:09] Timba-as: has joined #ruby
[18:46:56] jhass: most likely, yeah
[18:47:37] circ-user-kSAP4: has joined #ruby
[18:49:57] moparisthebest: but strangely the recursion appears to be in set.rb, I also don't see recursion in there...
[18:50:04] rushed: has joined #ruby
[18:50:47] jhass: you should hit up an author of that script really
[18:52:24] drbrain: moparisthebest: getting a SystemStackError in set.rb doesn't mean that set.rb has recursion
[18:52:32] drbrain: it just happens to be the place where the stack got to deep
[18:53:11] chipotle: has joined #ruby
[18:56:00] moparisthebest: drbrain: is there a way to know or print the entire stacktrace so I know where the recursion even is?
[18:56:00] shevy: hmm set_trace_var works with globals, I assume there is no way to have this work for an instance variable of your class?
[18:56:08] moparisthebest: or I guess maybe if I knew ruby I could spot it haha
[18:56:33] devoldmx: has joined #ruby
[18:57:38] yqt: has joined #ruby
[18:58:07] aaeron: has joined #ruby
[18:58:14] apt-get: has joined #ruby
[18:58:22] xet7: has joined #ruby
[18:58:47] ruurd: has joined #ruby
[18:59:08] workmad3_: has joined #ruby
[18:59:48] segfalt: has joined #ruby
[19:00:24] toretore: moparisthebest: how are you running it?
[19:00:38] jhass: normally it would print more trace and I can't spot anything that would hide it offhand, hence my suggestion to get in contact with the maintainers
[19:00:58] treehug88: has joined #ruby
[19:01:09] Anti-Pizza: has joined #ruby
[19:01:28] jhass: trying to sift through to 700loc of ruby without even being able to reproduce the error locally just doesn't work, knowing Ruby or not doesn't matter much ;)
[19:01:38] dionysus69: has joined #ruby
[19:02:44] spider-mario: has joined #ruby
[19:04:58] speaking1ode: has joined #ruby
[19:05:24] but3k4: has joined #ruby
[19:05:48] asxbr: has joined #ruby
[19:06:42] allomov: has joined #ruby
[19:07:13] psye: has joined #ruby
[19:07:19] rbennacer: has joined #ruby
[19:07:59] sdothum: has joined #ruby
[19:08:21] moparisthebest: toretore: 'ruby smf2.rb'
[19:08:47] sepp2k: has joined #ruby
[19:09:06] moparisthebest: jhass: yes I understand that, I am submitting a bug, but is there a way to increase the maximum stack depth some easy way?
[19:09:16] moparisthebest: of course depending how and why it's recursing, it may or may not help
[19:09:43] jdawgaz: has joined #ruby
[19:10:43] NeverDie: has joined #ruby
[19:14:25] asxbr: has joined #ruby
[19:14:49] Soda: has joined #ruby
[19:14:57] baweaver: has joined #ruby
[19:15:24] rushed: has joined #ruby
[19:15:30] shevy: isn't it already infinitely recursing
[19:17:00] pragmatism: has joined #ruby
[19:17:47] nym: has joined #ruby
[19:19:17] prestorium_: has joined #ruby
[19:19:21] moparisthebest: shevy: I doubt it's infinitely recursing because the script works for others with (presumably) smaller forums
[19:19:31] dhollinger: has joined #ruby
[19:19:45] moparisthebest: anyway it wouldn't hurt to up the stack depth and run it again just to see
[19:20:24] ebragaparah: has joined #ruby
[19:20:53] roxtrongo: has joined #ruby
[19:23:22] to_json: has joined #ruby
[19:24:02] scoot: has joined #ruby
[19:25:33] segfalt: has joined #ruby
[19:25:58] voltalio: has joined #ruby
[19:26:42] nami: has joined #ruby
[19:26:49] MeMoc: has joined #ruby
[19:27:11] roxtrongo: has joined #ruby
[19:27:23] frmendes: has joined #ruby
[19:27:41] jottr: has joined #ruby
[19:32:25] apt-get: has joined #ruby
[19:33:17] karapetyan: has joined #ruby
[19:33:41] omerh: has joined #ruby
[19:34:33] djbkd: has joined #ruby
[19:37:45] mhib: has joined #ruby
[19:37:46] skweek: has joined #ruby
[19:38:12] phutchins: has joined #ruby
[19:38:18] Nirgali43: has joined #ruby
[19:38:45] tomphp: has joined #ruby
[19:39:28] Xeago: has joined #ruby
[19:39:47] sp4rrow: has joined #ruby
[19:39:52] prefixed: has joined #ruby
[19:39:53] treehug88: has joined #ruby
[19:39:57] prefixed: what is "respond_to"
[19:40:20] slayerjain: has joined #ruby
[19:40:51] apeiros: &ri Object#respond_to?
[19:40:51] `derpy: http://www.rubydoc.info/stdlib/core/Object#respond_to%3F-instance_method
[19:40:55] apeiros: prefixed: ^
[19:41:17] apeiros: note that the "?" is part of the name. "respond_to" != "respond_to?"
[19:41:29] prefixed: what does "responds" mean
[19:42:16] prefixed: also, why doesn't the api state something similar to: respond_to? is a Ruby method for detecting whether the class has a particular method on it.
[19:42:52] hydrozen: has joined #ruby
[19:42:53] prefixed: i mean, i guess it's more confusing to say "responds." if you want to confuse users, that's probably the correct choice
[19:43:28] gplex: has joined #ruby
[19:43:53] scoot: has joined #ruby
[19:44:08] ebragaparah: has joined #ruby
[19:44:18] nullFxn: has joined #ruby
[19:44:32] gplex: Hi. Can someone please explain what symbols are in the simplest way possible?
[19:44:33] prefixed: although, you could also say "Returns true if obj does some stuff to the given method. That's really confusing and vague to boot!
[19:44:36] krisquigley: has joined #ruby
[19:44:53] voltalio: has joined #ruby
[19:45:01] frmendes: has joined #ruby
[19:45:37] apeiros: prefixed: "the class has a method" is not the same as "an object responds to a method call"
[19:45:38] shevy: prefixed whether your object can respond to a given method or whether it can not. x = 'cat'; x.respond_to? :size
[19:45:45] white_magic: has joined #ruby
[19:45:58] apeiros: and "to respond" means "you can call that method without getting a NoMethod error"
[19:46:21] deg-: has joined #ruby
[19:46:28] shevy: prefixed you won't run out of time ever if you try to find imperfect documentation in ruby ;)
[19:46:41] centrx: has joined #ruby
[19:48:01] failshell: has joined #ruby
[19:48:09] lemur: has joined #ruby
[19:48:18] rezzack: has joined #ruby
[19:50:02] marianogg9: has joined #ruby
[19:50:39] marianogg9: has left #ruby: ()
[19:50:59] jenrzzz: has joined #ruby
[19:51:24] hahuang61: has joined #ruby
[19:52:08] jottr_: has joined #ruby
[19:52:14] baweaver: !mute sharkman
[19:52:14] ruboto: +q sharkman!*@*
[19:52:14] ruboto: -o ruboto
[19:52:44] prefixed: hey. what does it mean if a method's last line is a variable?
[19:53:05] baweaver: it has a variable in the last line
[19:53:15] dfockler: It's implicit return
[19:53:23] prefixed: that's annoying!
[19:53:23] baweaver: >> def foo; a = 1 end; foo
[19:53:25] ruboto: baweaver # => 1 (https://eval.in/439137)
[19:53:46] baweaver: you really are not going to like ruby then.
[19:53:48] prefixed: you know, i think i find ruby to be the second most annoying language out there these days
[19:54:04] baweaver: then why are you on a ruby channel?
[19:54:20] prefixed: because i have no choice but to write ruby
[19:54:27] Sou|cutter: If you write a lot of ruby, it becomes hard to understand why other languages don't have implicit returns
[19:54:42] baweaver: most functional languages don't/
[19:54:56] dstarh: has joined #ruby
[19:55:04] baweaver: ruby just happens to borrow that concept as well.
[19:55:11] ngscheurich: has joined #ruby
[19:55:17] apt-get: has joined #ruby
[19:55:26] grotewold: has joined #ruby
[19:55:47] yardenbar: has joined #ruby
[19:56:10] bruno-: has joined #ruby
[19:56:14] prefixed: also, all of those code isn't commented
[19:56:25] shevy: prefixed some people are lazy
[19:56:28] gplex: Where can I find the simplest explanation of Ruby symbols?
[19:56:49] baweaver: gplex: here
[19:56:50] shevy: a ruby symbol is like an immutable string with the same object_id
[19:56:50] hinbody_: has joined #ruby
[19:56:56] nullFxn: has joined #ruby
[19:57:07] noethics: has joined #ruby
[19:57:12] baweaver: they're just a name tag
[19:57:32] baweaver: combine those two and that's most of what you'll find elsewhere.
[19:57:49] baweaver: prefixed: that's not the fault of the language.
[19:57:54] baweaver: that's the fault of the devs
[19:58:19] dfockler: gplex: they are useful for hash keys or options sent to a method
[19:58:25] dfockler: among other things
[19:59:14] banister: has joined #ruby
[19:59:20] baweaver: ohai banister
[19:59:31] to_json: has joined #ruby
[19:59:37] gplex_: has joined #ruby
[19:59:43] prefixed: what gets assigned to "mynode" in this method? https://gist.github.com/anonymous/57bce254fe36d3729c37
[19:59:55] sp4rrow: has joined #ruby
[19:59:55] banister: baweaver sup
[20:00:11] gplex_: So a ruby symbol is basically just a string but there is only one of each symbol in memory?
[20:00:12] apeiros: prefixed: nothing
[20:00:16] SenpaiSilver: has joined #ruby
[20:00:16] baweaver: they finally opened up the blog for us to start writing on at work
[20:00:19] apeiros: prefixed: only = assigns in ruby.
[20:00:28] prefixed: apeiros so why is it even there then?
[20:00:35] based_pdev_: has joined #ruby
[20:00:41] apeiros: prefixed: probably because it's needed?
[20:00:58] apeiros: prefixed: why do you even ask?
[20:01:05] segfalt: has joined #ruby
[20:01:08] based_pdev_: has joined #ruby
[20:01:10] prefixed: i don't understand what it's there for or where it comes from
[20:01:21] baweaver: reduce and inject both are used for returning a new value
[20:01:26] speaking1ode: has joined #ruby
[20:01:32] apeiros: where it comes from: it's a method.
[20:01:32] baweaver: very rarely for mutating.
[20:01:43] apeiros: what it's there for: well, figure out what the code does.
[20:02:13] fmcgeough: has joined #ruby
[20:02:21] prefixed: it isn't passed into the method
[20:02:24] prefixed: how does it get there?
[20:02:33] apeiros: methods don't need to be passed in
[20:02:34] baweaver: >> a = 1; [(1..3).reduce(a, :+), a]
[20:02:35] apeiros: that's the point of OO
[20:02:36] ruboto: baweaver # => [7, 1] (https://eval.in/439142)
[20:03:00] apeiros: you can access other parts of your object by means of being in the context of that object
[20:03:03] ebragaparah: has joined #ruby
[20:03:06] baweaver: prefixed: what language did you come from?
[20:03:14] NeverDie: has joined #ruby
[20:03:16] prefixed: apeiros oh. right, it is a method. a terribly named method
[20:03:43] baweaver: you really are a pleasant one, aren't you?
[20:03:54] v4n: has joined #ruby
[20:03:55] apeiros: ACTION was just going to say???
[20:04:37] Xeago: has joined #ruby
[20:04:44] apeiros: prefixed: your permanent nagging doesn't really make people want to help you
[20:06:18] segfalt: has joined #ruby
[20:07:17] shevy: this is awful code
[20:08:17] luckyme: has joined #ruby
[20:08:22] but3k4: has joined #ruby
[20:08:43] \j2k: has joined #ruby
[20:10:56] bruno-: has joined #ruby
[20:11:40] hinbody: has joined #ruby
[20:12:18] devoldmx: has joined #ruby
[20:14:26] asxbr: has joined #ruby
[20:15:28] karapetyan: has joined #ruby
[20:15:52] gurix: has joined #ruby
[20:16:18] but3k4: has joined #ruby
[20:18:03] tejasmanohar: has joined #ruby
[20:18:05] frmendes: has joined #ruby
[20:18:26] ruurd: has joined #ruby
[20:19:25] chouhoulis: has joined #ruby
[20:19:30] freerobby: has joined #ruby
[20:19:37] grubernaut: has left #ruby: ()
[20:20:05] workmad3_: has joined #ruby
[20:21:10] k3asd`: has joined #ruby
[20:22:59] paulcsmith: has joined #ruby
[20:23:39] rolfb: has joined #ruby
[20:24:34] danman: has joined #ruby
[20:25:49] baweaver: has joined #ruby
[20:27:09] jamesaxl: has joined #ruby
[20:29:25] jgt2: has joined #ruby
[20:30:54] NeverDie: has joined #ruby
[20:31:35] prefixed: why did the creator of ruby decide to create several different constrol structures? why is unless necessary? why is somevar = something if something.nil? necessary?
[20:32:18] apeiros: prefixed: we can't answer questions which concern opinions of other people. you'll have to ask matz himself.
[20:33:01] prefixed: is he not in here?
[20:33:03] gurix: has joined #ruby
[20:33:24] prefixed: that's annoying. today is a very annoying day
[20:33:58] centrx: prefixed, Different control structures make the language more expressive
[20:34:09] hal_9000__: prefixed: only goto is ???necessary??? - all else is fanciness ;)
[20:34:51] tomphp: has joined #ruby
[20:35:48] hfp_work: has joined #ruby
[20:35:52] Scripore: has joined #ruby
[20:35:58] Alayde: has joined #ruby
[20:36:04] AlexAltea: has joined #ruby
[20:37:49] baweaver: most of it's carry over from Perl.
[20:37:50] xcesariox: has joined #ruby
[20:38:27] prefixed: sure. i guess that makes sense
[20:39:03] prefixed: although, it kinda makes me laugh that matz decided to add easy-mode for people who don't understand negation
[20:39:19] phreakocious: what's easy-mode?
[20:39:46] phreakocious: I think unless reads better in some situations
[20:39:55] phreakocious: especially when used at the end of a statement
[20:40:13] prefixed: it certainly makes life easier so long as you know it exists
[20:41:02] phreakocious: been using ruby for almost 3 years after 10+ of perl has forced me to learn a lot of those rubyisms but the code looks better for it
[20:41:19] jxv: has joined #ruby
[20:41:21] prefixed: yeah., inever used perl
[20:41:33] prefixed: from what i've seen, i'm glad i've never had to
[20:41:58] Oka: has joined #ruby
[20:42:01] phreakocious: heh, it's good for what it was made for, but it got mega bloated and then totally lost its direction
[20:42:10] n_blownapart: has joined #ruby
[20:42:11] rbennacer: has joined #ruby
[20:42:26] apeiros: prefixed: "people who don't understand negation" is not the reason.
[20:42:39] prefixed: apeiros ok. what's the reason
[20:42:41] Scripore: has joined #ruby
[20:42:51] shevy: use what you prefer
[20:42:54] prefixed: to add extra control structures
[20:43:09] apeiros: prefixed: code is for people to read. and as centrx said, those structures make for an expressive and pleasant to read language.
[20:43:11] prefixed: perhaps metz liked the word "unless"
[20:43:37] prefixed: could you link me to some well-written ruby?
[20:43:55] vondruch: has joined #ruby
[20:44:12] shevy: you don't know ruby
[20:44:16] skade: has joined #ruby
[20:44:18] apeiros: I'm a pedant. I don't like any code :)
[20:44:25] prefixed: yeah. you're right. i don't know ruby
[20:44:30] baweaver: apeiros: ah, so I'm not the only one
[20:44:37] eam: prefixed: if you want to be minimal, all you need is a single operator: NAND
[20:44:41] prefixed: the code i'm reading right now doesn't seem to be very well written
[20:44:56] prefixed: lots of methods that call other methods that call other methods, etc, etc
[20:45:04] shevy: yeah that is sad
[20:45:08] eam: You can have a language with a single operator. You won't get readable code though.
[20:45:30] prefixed: what is expressive ruby
[20:46:26] shevy: you let your ideas be the code
[20:46:39] chris6131: has joined #ruby
[20:46:57] scoot: has joined #ruby
[20:47:10] prefixed: what code did you say was horrible
[20:47:13] pipework: prefixed: When intent is both conveyed and perceived easily with code.
[20:47:43] shevy: please don't show more horrible code
[20:47:54] prefixed: oh. you're referring to the last gist?
[20:47:57] pipework: We get enough of that from shevy.
[20:48:04] prefixed: yes. that's what i'm dealing with today
[20:48:24] shevy: pipework my ideas are very clear to me :)
[20:48:26] prefixed: s that expressive ruby?
[20:49:04] dfockler: has joined #ruby
[20:49:07] shevy: old code often tends to be less clear
[20:49:19] prefixed: how about 20 year old code
[20:49:29] craysiii: cinch vs ruby-irc?
[20:49:50] vondruch: has joined #ruby
[20:49:52] dfockler: has joined #ruby
[20:49:58] shevy: you won't find a lot of 20 year old ruby code. you may find 20 years old C code
[20:50:02] jhass: craysiii: soon??? the new butler
[20:50:05] jhass: so cinch :P
[20:50:11] da3mian: has joined #ruby
[20:50:20] craysiii: butler?? lol
[20:50:23] prefixed: shevy lots of 20 year old c code
[20:50:28] voltalio: has joined #ruby
[20:50:29] hahuang61: has joined #ruby
[20:50:34] Vile`: has joined #ruby
[20:50:38] shevy: C is the immortal programming language
[20:51:09] Xeago: has joined #ruby
[20:52:09] prefixed: is there a one-liner to print an entire hash?
[20:52:37] shevy: you mean code in a single line? the line could be very long
[20:52:39] vondruch: has joined #ruby
[20:52:56] baweaver: >> p {a: 1, b: 2} # yes
[20:52:57] ruboto: baweaver # => /tmp/execpad-12ad9726cc37/source-12ad9726cc37:2: syntax error, unexpected ':', expecting '}' ...check link for more (https://eval.in/439166)
[20:53:56] apeiros: parens or no {}
[20:53:57] CloCkWeRX: has left #ruby: ()
[20:54:02] apeiros: otherwise it's treated as a block
[20:56:52] gusTester: has joined #ruby
[20:57:24] jdawgaz: has joined #ruby
[20:58:24] allomov: has joined #ruby
[20:59:55] i_node: has joined #ruby
[21:00:00] i_node: Does anyone here use Nokogiri?
[21:00:10] banjara: has joined #ruby
[21:00:21] \j2k: Nokogiri + Mechanize
[21:00:23] i_node: What is Nokogiri::HTML ?
[21:00:23] ruboto: Just ask your question, if anyone has or can, they will respond.
[21:00:38] jhass: Nokogiri's interface for parsing HTML
[21:00:52] i_node: Is it a module, a class, what is it?
[21:01:08] i_node: How does Nokogiri::HTML(open("somefile")) work?
[21:01:18] centrx: oh it's just a method with the name "HTML"
[21:01:33] dhollinger: has joined #ruby
[21:01:38] i_node: Methods are allowed to be named like that?
[21:01:58] centrx: yes, though I would say it's bad practice
[21:02:02] last_staff: has joined #ruby
[21:02:18] baweaver: has joined #ruby
[21:02:38] i_node: Wait I'm confused, how can it be a method if it's all caps?
[21:02:40] `based_pdev`: has joined #ruby
[21:03:10] SimplySeth: has joined #ruby
[21:03:25] tobiasvl: how can it not
[21:03:33] tobiasvl: what would stop it
[21:03:42] craysiii: if i use the shoes gem do i have to worry about logic blocking the UI?
[21:04:03] i_node: So an all-caps method is legal ruby?
[21:04:28] Musashi007: has joined #ruby
[21:04:39] toretore: i_node: yes
[21:04:50] SimplySeth: does anyone know of any examples of using optparse in a function ? I tried, but I just get boolean responses from the function.
[21:05:27] shevy: oh my old nemesis... optparse
[21:05:50] segfalt: has joined #ruby
[21:06:05] jhass: i_node: you can even use certain invisible unicode characters http://www.rubyinside.com/the-split-is-not-enough-whitespace-shenigans-for-rubyists-5980.html
[21:06:24] i_node: Where's Nokogiri::HTML in the Nokogiri code?
[21:06:41] i_node: https://github.com/sparklemotion/nokogiri/tree/master/lib
[21:07:14] leafybasil: has joined #ruby
[21:07:25] jhass: i_node: https://github.com/sparklemotion/nokogiri/blob/master/lib/nokogiri/html.rb#L14
[21:07:26] centrx: yes, right in that directory
[21:07:42] havenwood: has joined #ruby
[21:08:30] but3k4: has joined #ruby
[21:08:35] i_node: jhass: So HTML is a singleton method of the module Nokogiri?
[21:08:50] SimplySeth: I only get boolean responses not the actual values http://dpaste.com/24HF3ZH
[21:09:00] jhass: it's a method on the singleton class of the module Nokogiri, yes
[21:09:09] tkuchiki: has joined #ruby
[21:09:34] i_node: jhass: Why do we do Nokogiri::HTML? Why not Nokogiri.HTML?
[21:09:47] hydrozen: has joined #ruby
[21:09:54] jhass: i_node: for the lulz, the latter works equally well
[21:10:24] baweaver: has joined #ruby
[21:10:35] i_node: jhass: Maybe because it's a constant? I don't know.
[21:10:36] jhass: there's no deeper reason to doing all these beyond "it looks kinda neat, don't you think, huh?" really
[21:11:03] toretore: it's just because "it looks like a constant lookup, therefore we'll use ::"
[21:11:53] pragmatism: has joined #ruby
[21:13:38] swgillespie: has joined #ruby
[21:13:57] i_node: Is it worth using Nokogiri? Or can I just do everything without it if I know Regular Expressions?
[21:14:49] phreakocious: i_node: never regex html :)
[21:14:55] aldodelgado: has joined #ruby
[21:14:55] phreakocious: it's almost a troll question
[21:15:03] w1ite_mag1c: has joined #ruby
[21:15:15] tsujp: has joined #ruby
[21:15:19] i_node: regexing html's fun tho :)
[21:15:28] havenwood: i_node: See the top answer. Be sure to read the whole thing: http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags
[21:15:29] phreakocious: I know, I've done it
[21:15:33] hod0r: has joined #ruby
[21:16:13] i_node: havenwood: I actually skimmed over that a few days ago. The author didn't seem really happy.
[21:16:25] havenwood: i_node: You can't parse HTML with regex.
[21:16:35] havenwood: i_node: No. No. No!
[21:16:47] sp4rrow: has joined #ruby
[21:16:54] nzst: has joined #ruby
[21:17:01] yorickpeterse: nothing wrong with regexing HTML
[21:17:17] KensoDev: has joined #ruby
[21:17:21] havenwood: >> 'HTML' =~ /HTML/
[21:17:22] ruboto: havenwood # => 0 (https://eval.in/439188)
[21:17:29] craysiii: jhass do you know how to use a password with cinch? I can't find any reference to it in the documentation.
[21:17:41] craysiii: oh wait im blind nevermind sorry.
[21:17:43] jhass: server password or nickserv?
[21:18:08] i_node: Alright so does anyone know of any good tutorials for Nokogiri?
[21:18:11] craysiii: nickserv, but i believe i found it
[21:18:30] i_node: or should I just read the code?
[21:18:30] chris6131: has joined #ruby
[21:18:36] havenwood: i_node: Another option is Oga: https://github.com/YorickPeterse/oga#readme
[21:18:59] havenwood: i_node: Especially if you can't get Nokogiri installed. :P
[21:19:54] i_node: havenwood: Are there any major differences or is it pretty much the same as Nokogiri?
[21:20:06] yorickpeterse: The API is different
[21:20:09] havenwood: i_node: There are differences. Better to ask yorickpeterse.
[21:20:22] yorickpeterse: http://code.yorickpeterse.com/oga/latest/file.migrating_from_nokogiri.html
[21:20:27] jhass: craysiii: do saslauth
[21:22:04] craysiii: i don't know if i can, i'm using cinch to connect to the twitch irc interface
[21:23:28] i_node: has left #ruby: ()
[21:23:33] hectortrope: has joined #ruby
[21:23:44] jhass: craysiii: ah, nvm then
[21:23:56] craysiii: thanks though
[21:24:10] atmosx_laptop: has joined #ruby
[21:24:18] atmosx_laptop: has left #ruby: ()
[21:24:20] atmosx_laptop: has joined #ruby
[21:25:14] SimplySeth: welp .. thanks ... g'night
[21:25:54] shevy: oh twitch
[21:26:01] shevy: a video-broadcasting IRC bot!
[21:26:03] slayerja_: has joined #ruby
[21:26:34] craysiii: my friend requested a chat client where the newest messages are on top instead of on bottom
[21:27:57] TheHodge: has joined #ruby
[21:28:30] craysiii: jhass is it okay if i pm you regarding cinch
[21:28:58] jhass: I see no reason to take it private, cinch is popular, others can chime in
[21:29:06] jhass: there's also a #cinch or #cinchrb iirc
[21:29:13] craysiii: oh, thanks!
[21:30:36] craysiii: https://github.com/cinchrb/cinch/blob/master/examples/basic/msg.rb#L10 how can i find out the different arguments you can pass to the block for the various callbacks?
[21:30:42] craysiii: i can't seem to find it in the docs.
[21:31:15] jhass: craysiii: it's the message followed by your capture groups
[21:31:41] j4cknewt: has joined #ruby
[21:31:47] Pathfinder_: has joined #ruby
[21:31:51] jhass: so in that example who is the first capture group, (.+?), text is the second, (.+)
[21:32:14] FernandoBasso: has joined #ruby
[21:32:22] craysiii: that makes too much sense
[21:32:26] jhass: https://github.com/cinchrb/cinch/blob/master/docs/events.md
[21:32:30] jhass: for other events
[21:33:12] craysiii: oh i like these docs way more
[21:33:48] j4cknewt: has joined #ruby
[21:34:00] weaksauce: has joined #ruby
[21:35:07] craysiii: so if the first object is a message, why would i need to grab the text with regex? can i not simply get the info from the msg object itself? or is this just simplifying that for me
[21:36:04] adaedra: Because cinch do call your method only for matching messages then
[21:36:17] adaedra: It's a filtering
[21:36:48] jhass: you're not limited to one handler per event in case that wasn't obvious
[21:37:21] Kallis: has joined #ruby
[21:37:30] tejasmanohar_: has joined #ruby
[21:37:36] rezzack1: has joined #ruby
[21:37:37] chipotle_: has joined #ruby
[21:37:43] poguez_: has joined #ruby
[21:37:49] jhass: but you don't have to pass a regex and then get all messages
[21:40:11] hays: has joined #ruby
[21:40:20] bhorn1|away: has joined #ruby
[21:40:21] memnon34: has joined #ruby
[21:40:26] hfp__work: has joined #ruby
[21:41:01] camt: has joined #ruby
[21:42:08] casadei: has joined #ruby
[21:42:28] opensource_ninja: has joined #ruby
[21:43:30] gix: has joined #ruby
[21:44:20] last_staff: has joined #ruby
[21:44:47] ebragaparah: has joined #ruby
[21:46:24] craysiii: hm im using that code from the example to create a basic echo script, i can see the messages coming in on my terminal but its not replying to the channel
[21:46:59] r0bby_: has joined #ruby
[21:47:44] phreakocious: craysiii: you can use the .reply method to send something back to the channel it was received on
[21:47:47] hahuang61: has joined #ruby
[21:49:20] phreakocious: (half-assedly working on a cinch bot myself)
[21:49:54] craysiii: https://gist.github.com/craysiii/88435efb77460887dd84 like this?
[21:50:02] `derpy: Cinch bots?
[21:50:12] ebragaparah: has joined #ruby
[21:50:25] adaedra: did you try it?
[21:50:25] craysiii: put my credentials in there -.-
[21:50:29] craysiii: yes i did, didn't work
[21:50:35] phreakocious: craysiii: take a look at: https://github.com/phreakocious/verboten/blob/master/verboten.rb
[21:50:39] craysiii: i also tried who.reply
[21:51:17] adaedra: .+? is weird
[21:51:23] paulcsmith: has joined #ruby
[21:52:00] adaedra: Also, change your credentials, and delete the gist.
[21:52:10] phreakocious: +1 to that :)
[21:52:23] craysiii: yea i was on it already haha, dope over here -.-
[21:52:33] Xeago: has joined #ruby
[21:52:36] adaedra: That happens to everyone.
[21:53:11] adaedra: Better be some development credentials than company's production ones, right?
[21:53:43] craysiii: so the difference between :channel and :message is that :message catches private messages to users as well?
[21:53:53] darix: adaedra: there were tons of e.g. AWS credentials on github which you could find with the code search
[21:54:19] phreakocious: craysiii: I believe so, yeah
[21:54:38] jgpawletko: has joined #ruby
[21:55:50] `derpy: darix: among other things, yes.
[21:55:56] `derpy: oops, wrong window
[21:56:32] gusTester: has left #ruby: ()
[21:56:33] sp4rrow: has joined #ruby
[21:59:40] allcentury: has joined #ruby
[22:00:35] workmad3_: has joined #ruby
[22:00:50] banister: has joined #ruby
[22:04:23] s00pcan: has joined #ruby
[22:04:42] ebragaparah: has joined #ruby
[22:05:34] armyriad: has joined #ruby
[22:06:07] noethics: has joined #ruby
[22:07:29] dhollinger: has joined #ruby
[22:07:36] jottr_: has joined #ruby
[22:07:42] duggiefresh: has joined #ruby
[22:07:52] weemsledeux: has joined #ruby
[22:09:41] gurix: has joined #ruby
[22:09:55] tkuchiki: has joined #ruby
[22:09:59] failshell: has joined #ruby
[22:10:18] jenrzzz: has joined #ruby
[22:10:31] shinnya: has joined #ruby
[22:10:31] tubuliferous: has joined #ruby
[22:11:16] Musashi007: has joined #ruby
[22:11:25] freerobby: has joined #ruby
[22:13:02] devoldmx: has joined #ruby
[22:13:44] last_staff: has joined #ruby
[22:14:48] nux443: has joined #ruby
[22:15:41] craysiii: does shoes gem not work at all?
[22:16:06] riotjones: has joined #ruby
[22:16:07] baweaver: has joined #ruby
[22:16:49] slayerjain: has joined #ruby
[22:16:55] havenwood: has joined #ruby
[22:17:47] craysiii: would wxRuby be recommended?
[22:18:38] shevy: hanmac here maintains rxw bindings
[22:18:53] shevy: https://github.com/Hanmac/rwx
[22:19:01] shevy: apparently it is rwx not rxw
[22:19:03] icarus: has joined #ruby
[22:19:07] yfeldblum: has joined #ruby
[22:19:15] Hanmac: craysiii: wxRuby is dead since years
[22:19:17] failshell: has joined #ruby
[22:19:32] memnon34: has joined #ruby
[22:20:52] sp4rrow: has joined #ruby
[22:21:02] craysiii: i guess it would be smart to install the proper libraries on my os before trying to bundle huh lol
[22:21:47] Ebok: What's the difference between #count and #length? Is there like a correct / politically correct time to use one over the other when they do, do the same thing?
[22:22:09] adaedra: iirc they're aliases
[22:22:16] adaedra: &ri Array#count
[22:22:16] `derpy: http://www.rubydoc.info/stdlib/core/Array#count-instance_method
[22:23:20] adaedra: #count can take a parameter or a block, not length
[22:23:51] mary5030: has joined #ruby
[22:24:37] slayerja_: has joined #ruby
[22:24:41] dmolina: has joined #ruby
[22:24:52] Puffball: has joined #ruby
[22:25:25] wldcordeiro: has joined #ruby
[22:26:58] craysiii: https://gist.github.com/craysiii/68da1fb1dbc2224de435 i get this, and i can't find the log file
[22:27:07] sp4rrow: has joined #ruby
[22:27:50] jgt2: has joined #ruby
[22:28:09] Hanmac: >> [1,2,3].cycle.length
[22:28:11] ruboto: hanmac # => undefined method `length' for #<Enumerator: [1, 2, 3]:cycle> (NoMethodError) ...check link for more (https://eval.in/439191)
[22:28:15] michael_mbp: has joined #ruby
[22:28:16] Hanmac: >> [1,2,3].cycle.size
[22:28:17] ruboto: hanmac # => Infinity (https://eval.in/439192)
[22:28:19] praveen_p: has joined #ruby
[22:28:22] Hanmac: >> [1,2,3].cycle.count
[22:28:25] ruboto: hanmac # => (https://eval.in/439193)
[22:28:47] Hanmac: Ebok: if i remember correctly "length" is outdated
[22:28:54] phreakocious: craysiii: what OS are you on?
[22:28:59] praveen_p: has left #ruby: ()
[22:29:04] craysiii: ubuntu 15.04 x64
[22:29:06] phreakocious: it looks like you don't have compilers and headers installed
[22:29:16] adaedra: craysiii: as it says, you need to install development packages.
[22:29:32] phreakocious: do sudo apt-get build-essential
[22:29:40] phutchins: has joined #ruby
[22:29:42] craysiii: will do it now :)
[22:29:56] adaedra: and I think it may need wx development headers, too.
[22:30:10] phreakocious: yeah something like libwx-devel
[22:30:40] workmad3_: has joined #ruby
[22:31:06] armyriad: has joined #ruby
[22:31:10] bruno-: has joined #ruby
[22:31:21] stamina: has joined #ruby
[22:32:45] michael_mbp: has joined #ruby
[22:34:42] craysiii: installed build-essential, libwxgtk-3.0, and libwxgtk-30-dev, anything else i need?
[22:34:42] djbkd: has joined #ruby
[22:34:48] craysiii: still not working
[22:36:45] michael_mbp: has joined #ruby
[22:37:54] startupality: has joined #ruby
[22:37:58] casadei: has joined #ruby
[22:38:14] opensource_ninja: has joined #ruby
[22:39:49] CloCkWeRX: has joined #ruby
[22:39:59] adaedra: what's the error?
[22:41:15] craysiii: https://gist.github.com/craysiii/54b99add4393525f9a8f
[22:42:32] r0bby_: has joined #ruby
[22:44:24] adaedra: And what about the file named at the end?
[22:45:12] djbkd: has joined #ruby
[22:45:26] adaedra: Well, this and the mkmf.log, which should be in the folder given by the trace
[22:45:58] craysiii: the gem_make.out is the error that i posted in the gist, im posting mkmf.log now
[22:46:27] baweaver: has joined #ruby
[22:46:41] craysiii: https://gist.github.com/craysiii/4ad368968df96a91ffbe
[22:47:09] adaedra: you need ruby development headers.
[22:47:18] adaedra: ruby-dev or something.
[22:47:19] wryfi: has left #ruby: ()
[22:47:28] phreakocious: craysiii: there's a wx(blahblah)-headers too
[22:47:41] adaedra: Also, gdk and gtk+ dev packages.
[22:47:45] hal_9000_: has joined #ruby
[22:48:40] phreakocious: each time you see this line checking for wx/preferences.h... *** extconf.rb failed ***
[22:48:56] phreakocious: you are missing some other -dev package or some headers related to what it's looking for
[22:49:10] phreakocious: (or some variant of that line)
[22:49:20] adaedra: read the logs, all of them, they have all the information you want.
[22:49:42] phreakocious: and that :D ... always that. :)
[22:50:57] adaedra: Seriously, some people want to go too fast. Take time to read. Read the README, read the documentation, read the console output, read the log files.
[22:51:46] mdih: has joined #ruby
[22:52:07] craysiii: https://github.com/Hanmac/rwx/blob/master/README.rdoc the readme was sort of barren, but i get your point :P
[22:52:12] phreakocious: it takes a lot of looking at broken shit to know right where to look in large stack trace really quickly :)
[22:53:10] Xeago: has joined #ruby
[22:53:21] phreakocious: version 0.0.1.1-dev is promising ;)
[22:53:47] adaedra: craysiii: well, at least reading that entirely was not too long.
[22:53:55] barhum2013: has joined #ruby
[22:54:13] craysiii: the coffee is making me antsy, need to calm down
[22:55:16] craysiii: it's been building for a minute now, no error so far after installing the media and webview
[22:56:01] marr: has joined #ruby
[22:56:35] craysiii: oh yay a new error
[22:57:02] bkulbida: has joined #ruby
[22:58:12] phreakocious: native library stuff is best left to the masochists
[22:58:50] polly_wog: has joined #ruby
[22:58:57] phreakocious: there is no hand holding :)
[22:59:16] craysiii: ive gotten used to everything being handed to me by bundler
[22:59:27] phreakocious: sometimes you get lucky and there is an OS package for the gem you want
[22:59:45] phreakocious: and all the dependencies are magically resolved
[22:59:56] r0bby_: has joined #ruby
[23:00:32] failshell: has joined #ruby
[23:01:23] r0bby_: has joined #ruby
[23:01:49] adaedra: that only works if you're using system ruby though.
[23:02:32] Musashi007: has joined #ruby
[23:03:38] roxtrongo: has joined #ruby
[23:06:04] roxtrongo: has joined #ruby
[23:08:22] craysiii: hm i can't seem to find gdk library in apt
[23:08:49] Timba-as: has joined #ruby
[23:10:15] failshell: has joined #ruby
[23:10:44] Scripore: has joined #ruby
[23:10:45] DarthGandalf: has joined #ruby
[23:11:22] ebragaparah: has joined #ruby
[23:13:46] dfockler: has joined #ruby
[23:13:49] devoldmx: has joined #ruby
[23:14:45] sysx1000: has joined #ruby
[23:15:07] weemsledeux: has joined #ruby
[23:15:46] craysiii: it worked finally!!! thanks everyone
[23:16:03] sysx1000: noob question. when I create hash or specify keyword arguments, sometimes I see param: value, sometimes :param => value, which way is correct?
[23:16:38] dopamean_: has joined #ruby
[23:16:47] phreakocious: craysiii: congrats
[23:16:47] adaedra: `param: value` is syntaxic sugar.
[23:16:59] `tim`: has joined #ruby
[23:17:22] craysiii: so would i use rwx the same as wxruby? can i justuse the wxruby docs?
[23:17:30] tkuchiki: has joined #ruby
[23:25:04] SenpaiSilver: has joined #ruby
[23:26:40] Scripore: has joined #ruby
[23:27:52] bruno-: has joined #ruby
[23:28:19] iateadonut: has joined #ruby
[23:28:59] SenpaiSilver: has joined #ruby
[23:30:51] craysiii: man i really wish shoes would work >.< seemed so much simpler lol
[23:31:02] frege: has joined #ruby
[23:31:23] moeabdol: has joined #ruby
[23:32:31] rbennacer: has joined #ruby
[23:33:21] karapetyan: has joined #ruby
[23:35:43] charliesome: has joined #ruby
[23:38:41] Ropeney: has joined #ruby
[23:38:45] yitsushi: has joined #ruby
[23:40:01] saddad: has joined #ruby
[23:40:15] segfalt: has joined #ruby
[23:41:54] lhz: has joined #ruby
[23:42:45] craysiii: instead of all this im just going to write the bot as a daemon and have it send requests to a rails api sigh
[23:43:04] Igorshp: has joined #ruby
[23:43:38] jenrzzz: has joined #ruby
[23:43:54] nettoweb: has joined #ruby
[23:44:48] lagrangi-wan: has joined #ruby
[23:46:16] dfockler: has joined #ruby
[23:47:10] NeverDie: has joined #ruby
[23:47:58] LoganG: has joined #ruby
[23:48:18] nzst: has joined #ruby
[23:50:02] ReK2: has joined #ruby
[23:50:19] atomical: has joined #ruby
[23:51:35] workmad3_: has joined #ruby
[23:51:42] bkulbida: has joined #ruby
[23:52:26] SenpaiSilver: has joined #ruby
[23:52:38] baweaver: has joined #ruby
[23:53:10] bourbon: has left #ruby: ()
[23:53:59] Xeago: has joined #ruby
[23:54:20] davedev24: has joined #ruby
[23:54:37] bestbrents__: has joined #ruby
[23:54:59] jayne_: has joined #ruby
[23:55:01] towski__: has joined #ruby
[23:55:58] solocshaw: has joined #ruby
[23:56:18] LoganG_: has joined #ruby
[23:57:35] crdpink: has joined #ruby
[23:57:35] jordanm: has joined #ruby
[23:58:02] luckyruby: has joined #ruby
[23:58:05] asi_: has joined #ruby
[23:58:07] tw1sted: has joined #ruby
[23:58:23] bryancp: has joined #ruby
[23:58:29] catbusters: has joined #ruby
[23:58:31] linc01n: has joined #ruby
[23:58:56] ArchRogem: has joined #ruby
[23:58:57] cstrahan: has joined #ruby
[23:58:58] apipkin: has joined #ruby
[23:59:01] adambeynon: has joined #ruby
[23:59:02] vcoinminer: has joined #ruby
[23:59:04] bf4: has joined #ruby
[23:59:08] waxjar: has joined #ruby
[23:59:10] JoL1hAHN: has joined #ruby
[23:59:10] wookiehangover: has joined #ruby
[23:59:18] cball: has joined #ruby
[23:59:30] blackjid: has joined #ruby
[23:59:34] CloCkWeRX: has joined #ruby
[23:59:51] twistedpixels: has joined #ruby