« Back to channel list

#ruby - 30 July 2015

« Back 1 day Forward 1 day »
[00:00:58] MatthewsFace: has joined #ruby
[00:01:23] swgillespie: has joined #ruby
[00:01:39] niiamon: has joined #ruby
[00:02:09] Yzguy: has joined #ruby
[00:02:56] workmad3: has joined #ruby
[00:03:18] i8igmac: "(size 85 GB) and some junk (junk)"
[00:03:31] i8igmac: scan(/\(Size.*\)/)
[00:03:48] chadwtaylor: has joined #ruby
[00:03:55] i8igmac: how do i regex to the first location of )
[00:04:45] i8igmac: scan(/\(Size.*\)/) => (size 85 GB) and some junk (junk)
[00:05:01] i8igmac: scan(/\(Size.*\)/) => (size 85 GB) ???
[00:05:05] polpak: i8igmac: what are you trying to do
[00:05:08] i8igmac: scan(/\(Size.*B\)/) => (size 85 GB) ???
[00:05:58] freeze: has joined #ruby
[00:06:05] ledestin: has joined #ruby
[00:06:13] i8igmac: regex. the first bit of data
[00:06:25] i8igmac: (size 85 gb)
[00:06:26] michael_mbp: has joined #ruby
[00:06:35] i8igmac: but the regex above will go to the last location of )
[00:06:38] Scriptonaut: has joined #ruby
[00:06:52] apeiros: i8igmac: don't use .
[00:07:03] Scriptonaut: Hey guys, I'm doing a YAML.load_file on this file: https://gist.github.com/robins35/a5d8c699eaf02c3f6680 It is only giving me the last command:
[00:07:04] apeiros: you know you don't want to match a ), so tell the regex precisely that
[00:07:13] apeiros: [^)]* is everything except )
[00:07:24] Scriptonaut: anyone know why it would only return the last command rather than the entire hash?
[00:07:29] polpak: alternatively you can use ? to make the . non-greedy
[00:07:30] apeiros: (may have to escape the ) -> [^\)]*)
[00:07:37] apeiros: ?guy Scriptonaut
[00:07:37] ruboto: Scriptonaut, I don't know anything about guy
[00:07:40] apeiros: ?guys Scriptonaut
[00:07:41] ruboto: Scriptonaut, You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
[00:08:07] apeiros: Scriptonaut: a hash can't have the same key multiple times
[00:08:18] Scriptonaut: that's why, thanks
[00:08:28] apeiros: you can use an array
[00:08:30] Scriptonaut: also, it's excluding the !command, is ! a special char or something?
[00:08:35] theery: has joined #ruby
[00:08:37] i8igmac: [^\)]*) i dont know what this represents
[00:08:52] i8igmac: "(size 85 GB) and some junk (junk)".scan(/[^\)]*)/)
[00:08:54] apeiros: ! stuff is used to tell yaml how to deserialize iirc
[00:09:06] apeiros: for non-native datatypes
[00:09:12] banister: has joined #ruby
[00:09:22] zenspider: in yaml? ! is a type decl... you prolly need quotes around that stuff?
[00:09:28] apeiros: i8igmac: I just told you what it represents? I suggest you scroll back and read?
[00:09:39] zenspider: it's all redundant anyhow. just remove them
[00:09:50] JeramyRR: has left #ruby: ("Peace out!")
[00:10:53] polpak: >>> "(size 85 GB) and some junk (junk)".scan /\(size.*?\)/ # i8igmac
[00:10:54] ruboto: polpak # => /tmp/execpad-373340185978/source-373340185978:2: syntax error, unexpected '>' ...check link for more (https://eval.in/408643)
[00:11:01] polpak: >> "(size 85 GB) and some junk (junk)".scan /\(size.*?\)/ # i8igmac
[00:11:02] ruboto: polpak # => ["(size 85 GB)"] (https://eval.in/408644)
[00:11:41] Feyn: has joined #ruby
[00:11:44] polpak: i8igmac: or as apeiros said, you can exclude the ) from your search with [^\)]* instead of .
[00:11:55] polpak: i8igmac: err instead of .*
[00:12:55] i8igmac: so, the question mark, grabs the very next \)
[00:13:09] i8igmac: not the trialling after
[00:13:23] zenspider: the question mark in that context makes the * non-greedy
[00:13:30] polpak: i8igmac: the question mark makes the .* "non-greedy"
[00:13:57] zenspider: there's a \) right after the "?" that eats the paren
[00:14:05] polpak: i8igmac: it will find the smallest possible match instead of the largest
[00:16:08] freeze: has joined #ruby
[00:17:02] Scriptonaut: man I am not getting this, what is wrong with this yaml? https://gist.github.com/robins35/23584a58dd48323299df
[00:17:17] Scriptonaut: The error I get is: Psych::SyntaxError: (config/commands.yml): did not find expected ',' or '}' while parsing a flow mapping at line 2 column 3
[00:18:07] zenspider: that's not yaml, that's json. I don't remember which is the subset of the other.
[00:18:10] lwu_: has joined #ruby
[00:18:33] zenspider: that's also just plain valid ruby. You could do a YAML.dump with it to format it correctly
[00:18:59] Scriptonaut: http://yaml.org/spec/1.0/#type-map
[00:19:04] Scriptonaut: this thing says you can make hashes like that
[00:19:11] Antiarc: json is a subset of yaml
[00:19:50] zenspider: thought so, but I always get those confused...
[00:19:57] zenguy_pc: has joined #ruby
[00:20:50] fenjamin: has joined #ruby
[00:22:13] blaines: has joined #ruby
[00:22:22] apeiros: Scriptonaut: on a single line???
[00:22:42] apeiros: Scriptonaut: build the structure in ruby, use puts data.to_yaml, see how it looks, build from that
[00:23:31] howdoi: has joined #ruby
[00:26:26] ishahnaz: has joined #ruby
[00:26:51] drug: has joined #ruby
[00:27:13] drug: has left #ruby: ("As I often say, we have come a long way from the days of slavery, but in 2015, discrimination and inequality still saturate our society in modern ways. Though racism may be less blatant now in many cases, its existence is undeniable.")
[00:27:40] dimasg: has joined #ruby
[00:27:44] arescorpio: has joined #ruby
[00:27:59] Azure: has joined #ruby
[00:28:43] zenguy_pc: has joined #ruby
[00:30:59] freeze: has joined #ruby
[00:31:01] aaeron: has joined #ruby
[00:31:38] Tamae: has joined #ruby
[00:32:06] Oka: has joined #ruby
[00:32:49] diegoviola: has joined #ruby
[00:32:51] zenguy_pc: has joined #ruby
[00:32:51] PhantomSpank: has joined #ruby
[00:33:21] juanpaucar: has joined #ruby
[00:33:53] Channel6: has joined #ruby
[00:33:53] tjbiddle: has joined #ruby
[00:34:11] failshell: has joined #ruby
[00:35:47] zenspider: Dude. loved you in 12 monkeys.
[00:36:01] BraddPitt: Thank you sir
[00:37:03] triangles: has joined #ruby
[00:37:08] n_blownapart: has joined #ruby
[00:37:55] theery: has joined #ruby
[00:39:11] Vile`: has joined #ruby
[00:40:57] Oog: has joined #ruby
[00:42:42] davedev24: has joined #ruby
[00:42:50] sankaber: has joined #ruby
[00:43:33] nikhgupta: has joined #ruby
[00:43:44] davedev24: has joined #ruby
[00:46:30] tubuliferous: has joined #ruby
[00:47:09] hfp: has joined #ruby
[00:47:42] hfp_work: has joined #ruby
[00:49:19] PaulCapestany: has joined #ruby
[00:52:42] JCOE: has joined #ruby
[00:53:25] xxneolithicxx: has joined #ruby
[00:53:34] tkuchiki: has joined #ruby
[00:54:07] omegamike: has joined #ruby
[00:56:06] lampshades: has joined #ruby
[00:58:14] mercwithamouth: has joined #ruby
[00:58:54] failshell: has joined #ruby
[00:59:07] cornerma1: has joined #ruby
[00:59:10] werelivinginthef: has joined #ruby
[01:00:48] Oka: has joined #ruby
[01:02:32] niiamon: has joined #ruby
[01:03:23] ivanskie: has joined #ruby
[01:05:19] Musashi007: has joined #ruby
[01:05:42] fabrice31: has joined #ruby
[01:07:30] Oka: has joined #ruby
[01:07:45] tmtwd: has joined #ruby
[01:08:44] Oog: has joined #ruby
[01:09:18] neoseeker: has joined #ruby
[01:11:31] towski_: has joined #ruby
[01:12:44] dopie: has joined #ruby
[01:13:06] aaeron: has joined #ruby
[01:14:38] leesharma: has joined #ruby
[01:21:28] Ox0dea: has joined #ruby
[01:21:33] Ox0dea: >> [('a1'..'a9'), ('1'..'10'), ('a1'..'a10')].map(&:count)
[01:21:34] ruboto: Ox0dea # => [9, 10, 7019] (https://eval.in/408660)
[01:21:37] Ox0dea: That can't be right.
[01:23:00] tuelz: has joined #ruby
[01:23:47] al2o3-cr: >> [*'a1'..'a10'].last
[01:23:48] ruboto: al2o3-cr # => "zz9" (https://eval.in/408663)
[01:25:01] rickmasta: has joined #ruby
[01:26:41] Musashi007: has joined #ruby
[01:27:10] marens: has joined #ruby
[01:28:09] chadwtaylor: has joined #ruby
[01:28:50] dimasg: has joined #ruby
[01:29:05] Ox0dea: >> ['9'.next, 'a9'.next]
[01:29:06] ruboto: Ox0dea # => ["10", "b0"] (https://eval.in/408667)
[01:33:04] werelivinginthef: has joined #ruby
[01:35:10] christiandsg: has joined #ruby
[01:36:36] GeissT: has joined #ruby
[01:38:27] al2o3-cr: If the increment generates a ``carry,'' the character to the left of
[01:38:28] al2o3-cr: it is incremented. This process repeats until there is no carry,
[01:38:30] al2o3-cr: adding an additional character if necessary.
[01:38:37] tmtwd: has joined #ruby
[01:40:32] tkuchiki: has joined #ruby
[01:40:37] shevy: you are a vimster al2o3-cr?
[01:41:00] al2o3-cr: hmm, yep :)_
[01:41:20] zenspider: Ox0dea: wierd. look at the to_a of the latter one. kinda makes sense, but doesn't
[01:42:12] CloCkWeRX: has left #ruby: ()
[01:44:02] dstarh: has joined #ruby
[01:44:34] user1138: has joined #ruby
[01:44:48] dimasg: has joined #ruby
[01:45:15] jcdesimp: has joined #ruby
[01:46:38] curses: has joined #ruby
[01:47:08] tkuchiki: has joined #ruby
[01:48:15] bootstrappm: has left #ruby: ()
[01:48:41] dfockler: has joined #ruby
[01:50:50] leesharma: has joined #ruby
[01:51:30] Yiota: has joined #ruby
[01:53:28] Stratege_: has joined #ruby
[01:55:27] omegamike: has joined #ruby
[01:55:55] swgillespie: has joined #ruby
[01:56:55] casadei_: has joined #ruby
[01:57:18] texasmade: has joined #ruby
[01:57:26] michael_mbp: has joined #ruby
[01:58:08] mercwithamouth: has joined #ruby
[02:00:16] ivanskie: has joined #ruby
[02:00:54] tkuchiki: has joined #ruby
[02:03:31] niiamon: has joined #ruby
[02:07:39] bronson: has joined #ruby
[02:08:34] rickmasta: has joined #ruby
[02:08:49] tejasmanohar_: has joined #ruby
[02:10:06] GriffinHeart: has joined #ruby
[02:10:39] juanpablo______: has joined #ruby
[02:10:55] aaeron: has joined #ruby
[02:13:23] phutchins: has joined #ruby
[02:13:31] RobertBirnie: has joined #ruby
[02:13:58] theery: has joined #ruby
[02:14:00] Stratege_: has left #ruby: ()
[02:17:15] PhantomS_: has joined #ruby
[02:19:46] yfeldblum: has joined #ruby
[02:22:15] towski_: has joined #ruby
[02:24:54] CorySimmons: has joined #ruby
[02:25:07] bruno-: has joined #ruby
[02:25:48] riscky: has joined #ruby
[02:25:52] workmad3: has joined #ruby
[02:28:23] busterarm: note to self
[02:28:54] busterarm: don't write posts about how you hate a company's service on the internet. They might contact you out of the blue and ask you to interview with them.
[02:28:57] sevenseacat: has joined #ruby
[02:29:06] Aeyrix: busterarm: heh
[02:29:10] Aeyrix: busterarm: Did that myself.
[02:29:19] Aeyrix: Didn't get interviewed, but I have a feeling it contributed to the denied service.
[02:29:34] busterarm: I mean, I have a well reasoned argument about why I dislike their service _here_
[02:29:37] busterarm: They're great in other places
[02:29:45] Aeyrix: rm'd it eventually
[02:29:48] busterarm: oh. heh. Well, I didn't apply to work there - they contacted me
[02:29:53] busterarm: it's too late to remove - it's on HackerNews
[02:30:13] Aeyrix: I can't tell whether I like or detest HN.
[02:30:15] busterarm: which is coincidentally the same place they found out about me (my Who's Hiring post last month)
[02:30:54] busterarm: i'm in hysterics over the irony
[02:33:21] busterarm: it might be one of those things where I contact HN staff and be like "hey, this post might cost me my job some day, can you delete it?"
[02:33:23] aaeron: has joined #ruby
[02:34:17] Aeyrix: heh i guess it's based on how you wrote the post
[02:34:18] Aeyrix: but i doubt it
[02:34:29] hoelzro: has joined #ruby
[02:34:31] Scriptonaut: has joined #ruby
[02:34:40] busterarm: if I took a job from them...(probably won't)
[02:35:02] busterarm: i certainly want to interview with them though so I can leverage an offer with other places I'm interviewing with
[02:35:02] tubuliferous: has joined #ruby
[02:35:11] busterarm: it's an extremely well known company -.-
[02:35:22] avocadorivalry: has joined #ruby
[02:37:16] shortdudey123: has joined #ruby
[02:37:18] ruby-lang029: has joined #ruby
[02:41:58] tkuchiki: has joined #ruby
[02:45:25] pawz: has left #ruby: ("Linkinus - http://linkinus.com")
[02:46:16] allcentury: has joined #ruby
[02:48:11] freerobby: has joined #ruby
[02:51:12] leesharma: has joined #ruby
[02:51:47] _Mercurial: has joined #ruby
[02:56:28] theery: has joined #ruby
[02:57:14] zenspider: why does pry have to spew 400 lines of warnings if a load it and have -w on?
[02:57:32] modern: has joined #ruby
[02:57:32] modern: has joined #ruby
[02:59:24] iateadonut: has joined #ruby
[02:59:42] Musashi007: has joined #ruby
[03:02:17] christiandsg: has joined #ruby
[03:03:42] sevenseacat: most gems probably spew a lot of warnings
[03:03:55] niiamon: has joined #ruby
[03:04:06] niiamon_: has joined #ruby
[03:04:27] jobewan: has joined #ruby
[03:06:02] freerobby: has joined #ruby
[03:06:37] fabrice31: has joined #ruby
[03:08:51] _blizzy_: has joined #ruby
[03:09:28] spiceweasel: has joined #ruby
[03:10:22] baweaver: has joined #ruby
[03:11:00] braincrash: has joined #ruby
[03:11:27] juanpablo______: has joined #ruby
[03:11:38] jack_rabbit: has joined #ruby
[03:14:07] modern: has joined #ruby
[03:14:08] modern: has joined #ruby
[03:14:18] kies^: has joined #ruby
[03:14:18] mercwithamouth: has joined #ruby
[03:15:51] zenspider: sevenseacat: mine don't. rails doesn't. nokogiri and tenderlove's gems don't. plenty don't. all libraries shouldn't. I don't care what mess you make of your app... but don't fuck with mine with your shitty libs. makes me sad
[03:17:46] sevenseacat: a lot of the gems in the rails apps I've built issue a shitload of warnings
[03:18:40] zenspider: yeah... well.. they suck. file a bug.
[03:19:10] zenspider: sequel is among them. and jeremy's BS rationalization annoys me
[03:20:56] zenspider: sad that the one thing perlers got right was to respect their warnings and keep it clean
[03:21:46] sevenseacat: I think because warnings arent shown by default. but then again, the first thing I did in PHP dev was turn error_reporting way up
[03:21:48] mack25: has joined #ruby
[03:23:01] darkf: has joined #ruby
[03:23:32] neanderslob_: has joined #ruby
[03:23:36] blahwoop: has joined #ruby
[03:24:02] blahwoop: hello all. i was just reviewing ruby procs and i'm a bit confused.
[03:24:05] niiamon: has joined #ruby
[03:24:24] blahwoop: when should i use (&something) and (something)
[03:24:45] blahwoop: i've seen it work for both with passing procs as arguments
[03:26:11] blahwoop: is it only if i write a method that has (&block) as parameters?
[03:26:12] rickmasta: has joined #ruby
[03:26:57] iamse7en: has joined #ruby
[03:27:03] arooni-mobile: has joined #ruby
[03:27:22] bnagy: blahwoop: also common when passing methods themselves as args
[03:27:34] bnagy: >> %w(a b c).map( &:upcase )
[03:27:35] ruboto: bnagy # => ["A", "B", "C"] (https://eval.in/408698)
[03:27:52] blahwoop: it seems to work without the & sometimes
[03:28:10] dented42: has joined #ruby
[03:28:11] bnagy: yeah like for reduce / inject :+ because magic -__-
[03:28:13] blahwoop: well i'm looking at a closure example in the well grounded rubyist
[03:28:36] blahwoop: when i pass in a proc into a method the & is not required
[03:28:53] bnagy: because it's already a Proc
[03:29:15] bnagy: if you pass a block you have to magic it into a Proc with &
[03:30:38] bnagy: a Proc's just a block in a frock
[03:30:59] charliesome: has joined #ruby
[03:31:43] zenspider: roughly: m(&:sym) -> m(&:sym.to_proc) -> m() { |o| o.sym }
[03:32:14] blahwoop: let me look at it again
[03:32:34] zenspider: some methods will apply to_proc to a symbol passed to them. I don't think this is a good thing that encourages consistency and understanding
[03:33:08] zenspider: but... m(lambda { ... }) is different... that's explictly passing a proc/lambda to a method just as a regular old argument.
[03:33:15] Oog: has joined #ruby
[03:33:25] zenspider: also as: f=lambda { ... }; m(f)
[03:33:41] Ox0dea: zenspider: Heh.
[03:35:27] blahwoop: ok so a method that expects a block to be an argument requires the &. if a method doesn't require or expect a block argument can pass a proc without the &
[03:35:33] blahwoop: am i correct on this?
[03:35:34] curses: has joined #ruby
[03:35:49] bnagy: not really
[03:36:09] blahwoop: damn u procs
[03:36:12] bnagy: you can throw a block at anything afaik, and any method can yield or check block_given?
[03:36:39] bnagy: you only need &blk if you specifically want to pull a block arg into a variable as a proc
[03:36:50] bnagy: eg if you're passing it on to something else, or whatever
[03:37:05] zenspider: bnagy: you're conflating sending vs receiving
[03:37:29] bnagy: I thought we were talking about how to method definitions now
[03:37:35] bnagy: sorry I am pre coffee
[03:37:42] zenspider: no, the & in the *calling* position does 2 things: call to_proc on the thingy in question and put it in the implicit block slot for the message send (ie, you can yield in the method body).
[03:37:45] charliesome: has joined #ruby
[03:38:17] zenspider: the & in the *method definition* position simply gives a name to any block sent to it on the calling side
[03:38:22] Ox0dea: You never *have* to declare an explicit &block parameter.
[03:39:17] bnagy: that's more or less what I was trying to say. :) you mostly don't want to use &blk when you define your methods
[03:39:31] bnagy: you would only do that if you were, eg, passing it on to something else
[03:39:42] zenspider: I do so I can give them good names... that assumes I'm doing something with the proc, like storing it off
[03:39:59] zenspider: right, or passing it down
[03:40:08] blahwoop: because if i do use & when defining the method it will require it
[03:40:14] blahwoop: ok makes sense now
[03:40:25] zenspider: no, it can be nil if no block is sent
[03:40:27] jack_rabbit: has joined #ruby
[03:40:56] blahwoop: that's the difference between a proc and a lambda
[03:40:56] Ox0dea: >> def foo; proc[1, 2] end; foo { |a, b| a + b } # blahwoop: This should lessen your confusion. /s
[03:40:58] ruboto: Ox0dea # => 3 (https://eval.in/408700)
[03:41:28] Ox0dea: blahwoop: A lambda is a special kind of Proc which does argument checking.
[03:41:34] zenspider: blahwoop: stupid historical shit mostly. same thing for the most part
[03:41:50] zenspider: I use "lambda" a lot because I have been doing a lot of scheme lately
[03:41:58] blahwoop: ok thanks guys
[03:42:11] zenspider: I might mean proc or block or whatever else. that stabby fucker, not that I use those ever
[03:42:25] Ox0dea: >> [proc{}[1, 2], (lambda{}[1, 2] rescue $!)] # blahwoop
[03:42:26] ruboto: Ox0dea # => [nil, #<ArgumentError: wrong number of arguments (2 for 0)>] (https://eval.in/408701)
[03:43:20] blahwoop: been getting procs and lambdas for interview questions. never took the time to understand them lol
[03:43:32] zenspider: my requires analyzer/fixer is almost running
[03:43:32] Ox0dea: >> [lambda{return}[], (proc{return}[] rescue $!)] # blahwoop
[03:43:33] ruboto: Ox0dea # => [nil, #<LocalJumpError: unexpected return>] (https://eval.in/408703)
[03:43:52] Ox0dea: `return` in a lambda returns from the lambda, whereas `return` in a Proc behaves like a return from the enclosing scope.
[03:44:02] zenspider: blahwoop: more important to understand the semantics of closures
[03:44:23] blahwoop: ok. i'm up to that part now
[03:44:56] bnagy: if people are asking you minutiae about proc vs lambda they are probably just assholes.
[03:45:36] tmtwd: has joined #ruby
[03:45:37] Ox0dea: >> x = 10; double_x = -> { x * 2 }; [double_x[], x = 21, double_x[]] # blahwoop
[03:45:38] ruboto: Ox0dea # => [20, 21, 42] (https://eval.in/408705)
[03:45:48] qiukun: has joined #ruby
[03:45:56] michael_mbp: has joined #ruby
[03:46:51] astrobunny: has joined #ruby
[03:47:08] Ox0dea: The double_x lambda "closes over" the x variable.
[03:47:20] Ox0dea: Thus "closure".
[03:48:25] blahwoop: how do closures get garbage collected? looks like it's possible to have memory leaks if used the wrong way?
[03:48:30] niiamon: has joined #ruby
[03:49:17] Ox0dea: I'm not intimately familiar with Ruby's GC, but I'd imagine the lambda would be collected once everything to which it holds a reference is gone.
[03:50:39] leat: has joined #ruby
[03:51:14] _Mercurial: has joined #ruby
[03:51:20] MatthewsFace: has joined #ruby
[03:52:36] qiukun: has joined #ruby
[03:53:03] icebourg: has joined #ruby
[03:53:53] icebourg: has joined #ruby
[03:54:43] icebourg: has joined #ruby
[03:57:49] lessless: has joined #ruby
[03:57:55] nofxx: has joined #ruby
[03:57:55] nofxx: has joined #ruby
[03:59:41] willywos: has joined #ruby
[04:00:02] Scripore: has joined #ruby
[04:01:15] agent_white: has joined #ruby
[04:01:16] jack_rabbit: has joined #ruby
[04:01:44] nisstyre: has joined #ruby
[04:02:43] khebbie: has joined #ruby
[04:02:43] theery: has joined #ruby
[04:02:46] agent_white: Evenin' folks
[04:04:18] niiamon: has joined #ruby
[04:04:46] Vile`: has joined #ruby
[04:06:47] konsolebox: has joined #ruby
[04:08:20] ellisTAA: has joined #ruby
[04:08:22] ivanskie: has joined #ruby
[04:08:24] zenspider: other way around. the lambda goes away whenever nothing is referencing IT. it is a valid reference to everything it closes over. I don't think ruby yet does free variable analysis on closures.
[04:08:31] houhoulis: has joined #ruby
[04:09:10] gix: has joined #ruby
[04:09:49] Oog: has joined #ruby
[04:10:04] rickmasta: has joined #ruby
[04:11:23] werelivinginthef: has joined #ruby
[04:11:57] rehat: has joined #ruby
[04:12:22] rehat: can I set a string as a default value to a method parameter?
[04:13:47] dgutierrez1287: has joined #ruby
[04:14:06] niiamon: has joined #ruby
[04:14:08] JoshuaPaling: has joined #ruby
[04:14:37] workmad3: has joined #ruby
[04:14:46] ohaibbq: has joined #ruby
[04:14:57] Ox0dea: rehat: You can use pretty much anything as a default value.
[04:15:12] agent_white: pontiki: MANNING IS HOLDING R4IA HOSTAGE?!
[04:15:21] Ox0dea: >> def foo bar = (def bar; end); bar end; foo
[04:15:22] ruboto: Ox0dea # => :bar (https://eval.in/408707)
[04:16:30] rehat: ahh I was getting a error and I thought it was because I used a string. But it was because I had two default parameter with a non default parameter between them
[04:16:36] Henchman21: has joined #ruby
[04:16:44] Henchman21: has left #ruby: ("WeeChat 1.2")
[04:17:20] j4cknewt: has joined #ruby
[04:17:54] rbowlby: has joined #ruby
[04:19:26] Xiti: has joined #ruby
[04:20:29] RobertBirnie: has joined #ruby
[04:21:07] niiamon: has joined #ruby
[04:23:05] bnagy: has joined #ruby
[04:23:11] tubuliferous: has joined #ruby
[04:24:10] blaines: has joined #ruby
[04:24:15] niiamon: has joined #ruby
[04:26:19] niiamon: has joined #ruby
[04:29:13] fenjamin: has joined #ruby
[04:30:00] niiamon: has joined #ruby
[04:31:43] baweaver: has joined #ruby
[04:33:20] Inside: has joined #ruby
[04:33:23] Inside: hey guys~
[04:33:55] Inside: this is more of a database question, I guess, but uhhh what's the best way to monitor a database (sql server through tinytds) and then perform an action whenever there is a row update?
[04:34:04] Inside: (action on the client)
[04:37:08] Inside: I can poll the database once per second or so
[04:37:24] Inside: it's a local sql server instance so it's not like performance is going to be impacted any
[04:37:39] j4cknewt_: has joined #ruby
[04:37:49] lxsameer: has joined #ruby
[04:37:55] GGMethos: has joined #ruby
[04:40:49] ellisTAA: has joined #ruby
[04:41:06] keen__________32: has joined #ruby
[04:45:16] havenwood: has joined #ruby
[04:45:17] EminenceHC: has joined #ruby
[04:45:20] j4cknewt: has joined #ruby
[04:46:56] niiamon: has joined #ruby
[04:47:28] triangles: has joined #ruby
[04:49:41] texasmade: has joined #ruby
[04:50:29] Mendenhall: has joined #ruby
[04:50:49] theery: has joined #ruby
[04:51:03] armyriad: has joined #ruby
[04:51:17] redlegion: has joined #ruby
[04:51:56] christiandsg: has joined #ruby
[04:52:10] Channel6: has joined #ruby
[04:52:15] Sapna: has joined #ruby
[04:52:27] Sapna: Hello everyone..
[04:52:52] Sapna: Suppose my command is (Get-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion" -Name "InstallationType" -ErrorAction "SilentlyContinue").InstallationType and I want to store it in variable suppose output then how to do it in ruby??
[04:53:19] armyriad: has joined #ruby
[04:54:35] GriffinHeart: has joined #ruby
[04:56:04] tjbiddle: has joined #ruby
[04:56:07] sameerynho: has joined #ruby
[04:56:24] havenwood: Sapna: If I understand what you're asking, shell out with backticks: http://ruby-doc.org/core-2.2.2/Kernel.html#method-i-60
[04:56:58] leat: has joined #ruby
[04:57:28] tmtwd: has joined #ruby
[04:57:29] sysx1000: has joined #ruby
[04:58:09] havenwood: Sapna: E.g.: directory_contents = `dir`
[04:59:26] woodruffw: has joined #ruby
[04:59:43] Oog: has joined #ruby
[05:00:13] juanpablo______: has joined #ruby
[05:00:42] piotrj: has joined #ruby
[05:02:04] Thomas-0725: has joined #ruby
[05:03:11] Sapna: havenwood : I have tried output = `(Get-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion" -Name "InstallationType" -ErrorAction "SilentlyContinue").InstallationType` But it not store output in variable .It gives null value in variable
[05:03:36] havenwood: Sapna: Just? nil
[05:03:39] freerobby: has joined #ruby
[05:03:50] havenwood: Sapna: Is the output actually going to stderr instead of stdout possibly?
[05:04:04] failshell: has joined #ruby
[05:04:49] niiamon: has joined #ruby
[05:05:01] lkba: has joined #ruby
[05:05:35] Sapna: havenwood : Then how to store output in variable
[05:05:38] ayonkhan: has joined #ruby
[05:06:03] RobertBirnie: has joined #ruby
[05:06:17] arooni-mobile: has joined #ruby
[05:06:18] havenwood: Sapna: Backticks just capture stdout. If you want stderr as well look at the various options with open3 or popen3.
[05:07:13] leat: has joined #ruby
[05:07:24] fabrice31: has joined #ruby
[05:08:00] charliesome: has joined #ruby
[05:08:15] happy_dev: has joined #ruby
[05:09:43] havenwood: Sapna: For example, a merged stdout and stderr stream: require 'open3'; directory_contents, status = Open3.capture2e 'dir'
[05:10:08] rickmasta: has joined #ruby
[05:10:17] bnagy: Sapna: that looks like powershell
[05:10:19] temerut: has joined #ruby
[05:10:21] temerut: has left #ruby: ()
[05:10:30] bnagy: I doubt you can run that as a normal command
[05:10:32] jriese: has joined #ruby
[05:10:33] havenwood: Sapna: Or you can have stdout and stderr separate. I'm still not clear if you really are getting error output or if it's just not returning anything.
[05:11:07] nofxx: has joined #ruby
[05:11:15] bnagy: I'd suggest reading the registry directly with one of the windows gems
[05:11:34] Sapna: havenwood : It returns null value in variable
[05:12:37] happy_dev: hey all, im having a bit of trouble getting jekyll installed on my VPS on a mac
[05:12:44] happy_dev: I'm getting this error when I run `gem install jekyll` https://gist.github.com/anonymous/bc4b1355fa0e2127651c
[05:13:14] havenwood: happy_dev: sudo apt-get install ruby-dev
[05:13:43] steve64: has joined #ruby
[05:13:47] happy_dev: I could have sworn I did that
[05:13:52] happy_dev: oh sudo ._.
[05:13:55] steve64: has left #ruby: ()
[05:13:58] happy_dev: thanks havenwood
[05:14:26] havenwood: happy_dev: no prob, yeah they don't have mkmf in debian ruby package like normal ruby - you have to install the dev package to get that
[05:15:03] Ox0dea: Sapna: Why are you using the phrase "null value" here? If the command you're running with backticks doesn't write to stdout, the return value will be an empty string, not nil.
[05:21:44] niiamon: has joined #ruby
[05:21:57] theery: has joined #ruby
[05:24:25] curses: has joined #ruby
[05:25:04] bnagy: Ox0dea: if it's not a real command you'll get nil
[05:25:26] bnagy: which is consistent with trying to run powershell goop in ``
[05:25:27] Ox0dea: bnagy: I get an ENOENT.
[05:25:30] astrobun_: has joined #ruby
[05:25:42] bnagy: Ox0dea: foo = `tfghvjbklhkgjfh`; foo
[05:25:50] theery: has joined #ruby
[05:26:16] Ox0dea: bnagy: See above?
[05:26:44] bnagy: it raises, and the variable will be nil
[05:29:22] Ox0dea: bnagy: That's only because the variable has been brought into existence. An unsuccessful `` apparently doesn't return anything.
[05:30:23] bnagy: ... which is what I just said
[05:30:34] bnagy: and what Sapna described
[05:31:27] Ox0dea: No, it isn't.
[05:31:46] bnagy: whatever :) I have better things to do than watch you pretend to be right all along
[05:32:01] Ox0dea: bnagy: Well, you said `` returns nil on failure; does it?
[05:32:43] Ox0dea: Rather, you strongly indicated that to be your understanding of the thing.
[05:33:31] agent_white: Ox0dea: Step down, son! bnagy is my homeboy,.
[05:33:43] Ox0dea: agent_white: Someone is wrong on the Internet. You know how this works.
[05:33:51] Ilyas: has joined #ruby
[05:34:06] agent_white: Ox0dea: Nah I'm going gang mentality. I haven't read the above, just got back to the keys. I love bnagy.
[05:34:25] michael_mbp: has joined #ruby
[05:34:34] Ox0dea: Did you mean "mob mentality"?
[05:34:41] j4cknewt: has joined #ruby
[05:35:35] arooni-mobile__: has joined #ruby
[05:36:15] arooni-mobile__: has left #ruby: ()
[05:36:15] GriffinHeart: has joined #ruby
[05:36:32] tjbiddle: has joined #ruby
[05:36:56] elton: has joined #ruby
[05:37:53] nini1294: has joined #ruby
[05:37:59] j4cknewt: has joined #ruby
[05:38:11] niiamon: has joined #ruby
[05:38:17] agent_white: Nah. I'm a crypt. Whaddup, 'cuz?
[05:38:29] allomov: has joined #ruby
[05:38:44] Aeyrix: You mean Crip, right?
[05:38:50] agent_white: Ox0dea: On a serious note, it doesn't make me happy to know that an empty string is returned from an stderr response.
[05:39:02] tagrudev: has joined #ruby
[05:39:10] agent_white: Aeyrix: Nah, I'm talking about skeletons, and ghouls n' stuff.
[05:39:37] wprice: has joined #ruby
[05:40:34] Ox0dea: agent_white: You would prefer that backticks merged the streams or something?
[05:40:54] riotjones: has joined #ruby
[05:42:48] Sapna: has joined #ruby
[05:43:07] bluOxigen: has joined #ruby
[05:43:07] agent_white: Ox0dea: I'm just wondering why would you want "a = `asdfasdflkjasdflkj`"
[05:43:27] agent_white: and "a = `>&2 echo 'error`" to return the same value.
[05:44:08] bnagy: they don't?
[05:44:28] last_staff: has joined #ruby
[05:44:30] agent_white: Oh. I'm assigning them both to variables :)
[05:44:51] bnagy: if it raises then there's no return so you get a nil variable
[05:45:11] bnagy: if it completes with an error (and not stdout) you get "" because .. there's no stdout
[05:45:37] bnagy: if you want stderr you need to do something else, which havenwood went over above
[05:45:46] agent_white: Oh ok! I'll look up.
[05:46:01] bnagy: eg use one of the Open3 methods
[05:46:27] agent_white: Odd that it would treat stderr differently, though... wonder why. *me straps on his google cape*
[05:46:43] bnagy: cause `` means "give me the stdout of this command"
[05:47:38] Ox0dea: bnagy: You don't get a nil variable. A bad `` essentially causes the interpreter to ignore the enclosing expression.
[05:47:40] agent_white: Ah. Why not just have it give the stdout and stderr?
[05:47:53] icosa1: has joined #ruby
[05:48:04] agent_white: If I shell out, I want the response. Be stdout, stderr, stdhismother.
[05:48:08] bnagy: Ox0dea: you absolutely do get a nil variable :) You get a variable which exists, and is nil
[05:48:22] bnagy: you're explaining why, which is fine
[05:48:26] Ox0dea: bnagy: Here: https://gist.github.com/0x0dea/eb7c2a8e677675979174
[05:48:43] Oog: has joined #ruby
[05:48:54] EminenceHC: has joined #ruby
[05:49:28] skade: has joined #ruby
[05:49:29] Ann: has joined #ruby
[05:49:55] bnagy: I am honestly not even going to bother loading that
[05:50:37] swgillespie: has joined #ruby
[05:50:43] affenhoden: has joined #ruby
[05:51:18] agent_white: So... why don't backticks give both stderr and stdout? Instead of having to use Open3?
[05:51:28] Ox0dea: Because that would be very stupid.
[05:51:37] bnagy: agent_white: because that's almost never what you want
[05:51:59] agent_white: Well, stderr OR stdout.
[05:52:11] elton: has joined #ruby
[05:52:11] bnagy: that would be even more confusing imho
[05:52:23] bnagy: you mean stdout if stderr is empty?
[05:52:32] davedev24: has joined #ruby
[05:52:34] agent_white: `>&2 echo "error"`
[05:52:43] agent_white: >> `>&2 echo "error"`
[05:52:44] ruboto: agent_white # => (https://eval.in/408737)
[05:53:02] agent_white: Why does it make sense for that to return an empty string?
[05:53:11] bnagy: because there's no stdout
[05:53:17] agent_white: That's my question.
[05:53:18] bnagy: this is a slightly circular argument o_0
[05:53:39] agent_white: Nah, it poses why I should use backticks at all instead of just Open3.
[05:53:48] Ox0dea: agent_white: You would be within your rights to redefine Kernel#`.
[05:54:13] lsmola: has joined #ruby
[05:54:22] bnagy: agent_white: I guess the most common use went into the shortest syntax
[05:55:01] bnagy: mostly you don't want stderr and mostly you _definitely_ don't want "maybe stdout, maybe stderr, lol"
[05:55:05] Ox0dea: >> module Kernel; alias ` eval; end; `1 + 2`
[05:55:06] ruboto: Ox0dea # => 3 (https://eval.in/408738)
[05:55:17] gix: has joined #ruby
[05:55:22] agent_white: Yeah... I'm just questioning using backticks at all. I think I will avoid them.
[05:55:33] bnagy: seems legit
[05:55:58] elton: has joined #ruby
[05:56:00] astrobun_: has joined #ruby
[05:59:41] agent_white: >> stdout_str, stderr_str= Open3.capture3("make")
[05:59:42] ruboto: agent_white # => uninitialized constant Open3 (NameError) ...check link for more (https://eval.in/408739)
[05:59:55] agent_white: >> require 'open3'; stdout_str, stderr_str= Open3.capture3("make")
[05:59:56] ruboto: agent_white # => (https://eval.in/408740)
[06:00:09] yardenbar: has joined #ruby
[06:00:35] sevenseacat: has joined #ruby
[06:01:25] agent_white: I don't get it... then if there's no stdout for that command (of course assuming no makefile to be had there), why isn't the first element nil, since there is no stdout?
[06:01:46] roolo: has joined #ruby
[06:02:20] bnagy: y u do dis
[06:02:32] agent_white: I can't nil :(
[06:02:44] Ilyas: has joined #ruby
[06:02:46] riotjones: has joined #ruby
[06:02:46] bnagy: stdout is empty. So you get an empty string.
[06:02:58] bnagy: not, imho, weird
[06:03:20] workmad3: has joined #ruby
[06:03:32] axisys: has joined #ruby
[06:03:44] axisys: has joined #ruby
[06:03:55] agent_white: I thought nil was empty
[06:03:58] agent_white: Why do I need a string?
[06:04:07] bnagy: to hold the contents of stdout
[06:04:12] agent_white: That don't exist?
[06:04:36] codecop: has joined #ruby
[06:04:44] elton: has joined #ruby
[06:05:00] Ox0dea: agent_white: $ ls /proc/self/fd
[06:05:01] bnagy: o,e=Open3.blahblah if o.empty? ... do stuff
[06:05:04] piotrj: has joined #ruby
[06:05:05] agent_white: Is there a command that would, using Open3, return nil for stdout?
[06:05:34] Ox0dea: agent_white: File descriptors 0 (stdin), 1 (stdout), and 2 (stderr) exist by default.
[06:05:47] agent_white: Ox0dea: I know.
[06:06:39] agent_white: Why a file descriptor unwritten has a value is my concern.
[06:06:44] bnagy: agent_white: no (I hope, anyway)
[06:07:02] bnagy: because if it doesn't raise it should always return a string
[06:08:24] elton: has joined #ruby
[06:08:37] Ox0dea: agent_white: You'd want Open3 to take into account whether the process being invoked explicitly uses close(3) on one of its default descriptors?
[06:09:24] arup_r: has joined #ruby
[06:10:19] schaerli: has joined #ruby
[06:10:42] Ox0dea: An empty file isn't nonexistent; it's just empty.
[06:11:02] j4cknewt: has joined #ruby
[06:11:21] tubuliferous: has joined #ruby
[06:11:59] Asher: has joined #ruby
[06:12:10] agent_white: Nil scares me.
[06:12:36] brianpWins: has joined #ruby
[06:12:42] unshadow: has joined #ruby
[06:14:27] Ox0dea: >> ObjectSpace.each_object.count(&:nil?)
[06:14:28] ruboto: Ox0dea # => 0 (https://eval.in/408742)
[06:14:29] Ox0dea: nil is a myth.
[06:15:00] htmldrum: has joined #ruby
[06:17:26] jas02: has joined #ruby
[06:17:34] agent_white: Well... kewl. Learned to not use backticks today :D
[06:17:43] rsc___: has joined #ruby
[06:17:59] j4cknewt: has joined #ruby
[06:18:43] agent_white: Ox0dea, bnagy: Thanks for listening to absurdity. I read the above but didn't get the response I understood until asking my stupid questions. :D
[06:18:49] krz: has joined #ruby
[06:19:10] agent_white: And thanks for the explanation! Nil is a bit less opaque.
[06:19:24] affenhoden: has joined #ruby
[06:20:25] affenhoden: has left #ruby: ()
[06:21:43] sinkensabe: has joined #ruby
[06:23:31] j4cknewt_: has joined #ruby
[06:24:20] hahuang65: has joined #ruby
[06:24:33] ksjdflsjldf: has joined #ruby
[06:24:35] wasamasa: "Null References: The Billion Dollar Mistake"
[06:25:02] shock_one: has joined #ruby
[06:25:14] GriffinHeart: has joined #ruby
[06:25:34] MatthewsFace: has joined #ruby
[06:26:41] bruno-: has joined #ruby
[06:27:06] leat: has joined #ruby
[06:27:07] j4cknewt: has joined #ruby
[06:27:55] ksjdflsjldf: has joined #ruby
[06:28:54] affenhoden: has joined #ruby
[06:29:18] j4cknewt: has joined #ruby
[06:30:51] AnoHito: has joined #ruby
[06:31:29] agent_white: NULL penetrates all the layers to find you, and can only say, helplessly, "Looks like you're having a problem". Endemic to the problem, not the problem, complicity, and might be the problem).
[06:32:11] fabrice31: has joined #ruby
[06:33:01] nini1294: has joined #ruby
[06:33:04] agent_white: _why, deviant knight of the NULL.
[06:33:05] Guest38847: has joined #ruby
[06:33:40] shock_one: has joined #ruby
[06:34:23] safeforge: has joined #ruby
[06:36:12] niiamon: has joined #ruby
[06:36:43] affenhoden: has joined #ruby
[06:37:40] leat: has joined #ruby
[06:37:41] christiandsg: has joined #ruby
[06:38:55] woodruffw: has joined #ruby
[06:39:33] tvw: has joined #ruby
[06:40:52] niiamon: has joined #ruby
[06:41:25] j4cknewt: has joined #ruby
[06:41:40] howdoicomputer: has joined #ruby
[06:43:17] howdoicomputer: has joined #ruby
[06:44:32] niiamon1: has joined #ruby
[06:46:15] abucha_: has joined #ruby
[06:47:50] howdoicomputer: has joined #ruby
[06:48:03] eGGsha: has joined #ruby
[06:48:39] werelivinginthef: has joined #ruby
[06:48:50] niiamon: has joined #ruby
[06:49:01] sepp2k: has joined #ruby
[06:49:08] juanpablo______: has joined #ruby
[06:51:19] aganov: has joined #ruby
[06:52:03] Anne: has joined #ruby
[06:52:38] abucha_: /msg NickServ VERIFY REGISTER abucha zdwgeoounmfq
[06:52:45] chinmay_dd: has joined #ruby
[06:54:27] graft: has joined #ruby
[06:56:28] craysiii: has joined #ruby
[06:57:10] abucha: has joined #ruby
[06:57:12] Philipp__: has joined #ruby
[06:58:57] fabrice31: has joined #ruby
[06:58:59] strixd: has joined #ruby
[06:59:58] strixd: has joined #ruby
[07:00:49] strixd: has joined #ruby
[07:02:39] Sapna: has joined #ruby
[07:03:23] schaerli: has joined #ruby
[07:04:18] towski_: has joined #ruby
[07:06:19] failshell: has joined #ruby
[07:06:21] timonv: has joined #ruby
[07:06:34] ofdtrinity: has joined #ruby
[07:06:47] niiamon: has joined #ruby
[07:07:51] bayed: has joined #ruby
[07:07:56] piotrj: has joined #ruby
[07:08:07] iateadonut: has joined #ruby
[07:08:27] tjbiddle: How can I rescue an exception, but not have it continue? I just want to eat the message (Trying to abort a capistrano task - I'm printing my own message)
[07:08:43] joonty: has joined #ruby
[07:09:06] ljarvis: tjbiddle: and then do what? exit? to "not continue" you need to forcibly abort
[07:09:31] ishahnaz: has joined #ruby
[07:09:32] ljarvis: or just re-raise your own error
[07:09:41] ljarvis: (which is quite common thing to do)
[07:09:46] Vile`: has joined #ruby
[07:10:09] tjbiddle: ljarvis: Wouldn't my error just be called and then bubble up and the same issue happen?
[07:10:58] Feyn: has joined #ruby
[07:11:05] ljarvis: tjbiddle: the same rescue block won't rescue the exception you just rescued, but of course it is possible that it could be rescued somewhere else yeah
[07:11:21] tjbiddle: Ah fuck it. Don't need this functionality anyways. Just going down another rabbit hole to defer.
[07:11:22] khebbie: has joined #ruby
[07:11:33] tjbiddle: Thanks anyhow
[07:11:52] khebbie_: has joined #ruby
[07:12:06] crayfishx: has joined #ruby
[07:12:30] code1o6: has joined #ruby
[07:15:27] j4cknewt: has joined #ruby
[07:15:29] woodruffw: has joined #ruby
[07:15:33] dfockler: has joined #ruby
[07:15:43] BraddPitt: tjbiddle do you mean using 'next' to continue withouth doing anything with the exception?
[07:15:59] graft: has joined #ruby
[07:15:59] graft: has joined #ruby
[07:16:01] rht: has joined #ruby
[07:16:21] dvb_ua: has joined #ruby
[07:16:23] schaerli: has joined #ruby
[07:16:27] PhantomSpank: has joined #ruby
[07:16:57] tjbiddle: BraddPitt: No - I don't want it to continue. I wanted to print a message and just end everything.
[07:17:26] BraddPitt: you can just keep throwing it up
[07:17:35] BraddPitt: or don't rescue it at all?
[07:17:49] BraddPitt: or explicitly exit if the exception is rescued
[07:18:20] walterzm: has joined #ruby
[07:18:33] mercwithamouth: has joined #ruby
[07:19:52] zdwgeoounmfq: has joined #ruby
[07:19:52] ThongKu: has joined #ruby
[07:19:56] aotg: has joined #ruby
[07:19:59] omegamike: has joined #ruby
[07:23:04] ishahnaz: has joined #ruby
[07:23:31] neanderslob: has joined #ruby
[07:23:33] abucha: has joined #ruby
[07:23:39] Ropeney: has joined #ruby
[07:24:43] niiamon: has joined #ruby
[07:25:23] SOLDIERz: has joined #ruby
[07:25:55] michael_mbp: has joined #ruby
[07:26:33] dmolina: has joined #ruby
[07:27:35] niiamon1: has joined #ruby
[07:28:07] rikkipitt: has joined #ruby
[07:28:47] ThongKu: has left #ruby: ("Leaving")
[07:29:18] schaerli: has joined #ruby
[07:29:19] Kedare: has joined #ruby
[07:29:48] allomov: has joined #ruby
[07:30:04] flughafen: oi oi oi shevy sevenseacat how goes it
[07:30:18] sevenseacat: not bad... not bad
[07:30:19] schaerli: has joined #ruby
[07:30:55] flughafen: is it gererally an ok/whatever/bad practice to use minitest assertions with cucumber/capybbbara?
[07:32:59] senayar: has joined #ruby
[07:35:19] senayar: Anne: stop spam please
[07:35:57] TinkerTyper: has joined #ruby
[07:36:41] livathinos: has joined #ruby
[07:37:00] Trynemjoel: has joined #ruby
[07:38:56] arturmartins: has joined #ruby
[07:39:57] fabrice31_: has joined #ruby
[07:40:49] Sapna: has joined #ruby
[07:41:43] chipotle: has joined #ruby
[07:41:51] duncannz: has joined #ruby
[07:42:08] {756d6f}: has joined #ruby
[07:44:19] zemmihates: hey, I was looking for some resources on background jobs and was wondering if any of you had some recommendations
[07:44:51] fabrice31: has joined #ruby
[07:45:01] andikr: has joined #ruby
[07:45:01] niiamon: has joined #ruby
[07:45:49] tjbiddle_: has joined #ruby
[07:48:12] Oog: has joined #ruby
[07:48:35] TheHodge: has joined #ruby
[07:49:00] walterizyion: has joined #ruby
[07:50:47] ljarvis: zemmihates: sidekiq + redis is a popular option
[07:51:23] htmldrum: has joined #ruby
[07:51:37] wldcordeiro_: has joined #ruby
[07:51:39] zemmihates: ljarvis: is there much in the way of rabbitmq?
[07:52:02] ljarvis: zemmihates: Not sure, I haven't used it before
[07:52:03] workmad3: has joined #ruby
[07:52:10] zemmihates: no problems :D
[07:52:18] zemmihates: thank you, I'll have a look at sidekiq none the less.
[07:52:21] iateadonut: has joined #ruby
[07:52:29] shortdudey123: most queuing systems can be used for background jobs: redis, activemq, rabbitmq, kafka
[07:53:09] shortdudey123: i have seen cassandra and mysql used for background tasks too haha
[07:53:51] alienaut: has joined #ruby
[07:54:17] abdulrehman: do we have another way of taking in commands beside the optionparser?
[07:54:17] bnagy: zemmihates: for a pure queue, beanstalkd is pretty great
[07:54:48] bnagy: I use rabbit as well, but only for pubsub
[07:55:46] fabrice31_: has joined #ruby
[07:55:52] abucha: has joined #ruby
[07:56:05] shortdudey123: abdulrehman: trollop
[07:56:20] zemmihates: bnagy: thanks.
[07:56:26] abdulrehman: I'll look that up, many thanks shortdudey123
[07:56:33] marr: has joined #ruby
[07:56:51] execat: has joined #ruby
[07:56:55] zemmihates: this whole background job and queue stuff is just making my head hurt. heh.
[07:57:03] bnagy: zemmihates: beanstalkd is pretty roll-your-own, though, if you're using other (eg web stuff) then the other recommendations are probably better
[07:57:04] arturmartins: has joined #ruby
[07:57:19] bnagy: if only because more other people use them and will be able to help
[07:57:36] zemmihates: thanks for the heads up :)
[07:57:48] adaedra: jhass: it's very interesting anyway, thanks
[07:58:05] wldcordeiro_: has joined #ruby
[07:58:35] shortdudey123: zemmihates: if you use redis, take a look at redis-sentinel too
[07:58:40] execat: Guys. how does "private" work in Ruby (while interpreting)?
[07:58:47] ruboto: You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
[07:59:00] execat: I expected it to be a keyword.
[07:59:17] bnagy: haha, fooled you.
[07:59:31] tubuliferous: has joined #ruby
[07:59:46] execat: "Guys" should be redefined to mean "people" instead of "male members".
[08:00:03] zenspider: flughafen: I'd consider it bad practice to use cucumber in general... but I'm biased
[08:00:19] ljarvis: cucumber is utter shit
[08:00:28] flughafen: zenspider: cucumber isn't going anywhere, i didn't start it.
[08:00:32] zenspider: execat: that's nice, but it's not going to happen here, so respect the community norms
[08:00:47] flughafen: what do you guys uyse instead of cucumber?
[08:00:55] agent_white: I disagree with ruboto's dictionary. I call friends who are girls "dude" all the time. Making the distinction of "guys" is worse than not.
[08:00:58] ljarvis: execat: check the documentation, it's a method on Module
[08:01:13] ljarvis: flughafen: I use minitest for writing my tests
[08:01:17] agent_white: ruboto: Good on your for being sexist you prick.
[08:01:24] sevenseacat: agent_white: sorry what?
[08:01:29] bnagy: ?guys2 agent_white
[08:01:29] ruboto: agent_white, it doesn???t matter if it???s "normal"/gender neutral to say "guys" in your idiolect. "You guys" to refer to a mixed group is erasure. All we ask from you is to be a decent channel member and respect that. If you want to further discuss this, join #ruby-offtopic.
[08:01:41] bnagy: <3 ruboto
[08:01:52] ljarvis: agent_white: no more discussing this please. It's the rules of this community
[08:01:57] niiamon: has joined #ruby
[08:02:02] ljarvis: if you want to discuss, go to #ruby-offtopic
[08:02:07] execat: ljarvis: That is exactly what I wanted. Thanks!
[08:02:14] zenspider: ... cancels the /stfu agent_white
[08:02:22] zenspider: and I was so ready too
[08:02:22] agent_white: sevenseacat: Can't discuss here or I'll be in the trees. Sorry.
[08:02:38] sevenseacat: good, take your insults and sexism elsewhere.
[08:02:58] zenspider: !mute agent_white
[08:02:59] ruboto: +q agent_white!*@*
[08:02:59] ruboto: -o ruboto
[08:03:09] zenspider: nope. we're done
[08:03:15] axl_: has joined #ruby
[08:03:39] flughafen: zenspider: ("\(*,,,,*)/") rawr!!!
[08:03:44] sevenseacat: I expect a PM barrage shortly.
[08:03:50] niiamon1: has joined #ruby
[08:04:04] bnagy: Vote Cthulhu 2016
[08:04:33] zenspider: agent_white is welcome to take it up with me in ruby-banned or -offtopic
[08:04:37] flughafen: i'd vote for cthulu over trump
[08:04:42] zenspider: but yup. here come the pms
[08:04:57] djbkd_: has joined #ruby
[08:05:17] lkba_: has joined #ruby
[08:07:05] failshell: has joined #ruby
[08:07:14] n008f4g_: has joined #ruby
[08:08:23] tjbiddle: has joined #ruby
[08:09:13] ruboto: nomnomnomnom
[08:09:25] michael_mbp: has joined #ruby
[08:09:28] ruby-lang332: has joined #ruby
[08:09:51] abucha_: has joined #ruby
[08:09:52] ruby-lang332: is there a channel to discuss ruby c extensions?
[08:10:12] GriffinHeart: Hey guys having some problems with the openssl ruby docs, this should work: https://gist.github.com/GriffinHeart/aea2989399e069a02cce
[08:10:22] niiamon: has joined #ruby
[08:10:30] ljarvis: ruby-lang332: here is fine
[08:10:33] rdark: has joined #ruby
[08:10:34] bnagy: I shouldn't find this so funny
[08:10:40] adaedra: ruby-lang332: http://ruby-community.com/pages/channels
[08:10:51] abucha_: has joined #ruby
[08:10:52] bronson: has joined #ruby
[08:11:15] ruby-lang332: ljarvis: how well supported is win32 / visual studio from that perspective?
[08:11:28] BraddPitt: those are incorrect types of keyfiles, GriffinHeart
[08:11:30] rdark: has joined #ruby
[08:11:40] BraddPitt: a .pem file is not an RSA pub/priv key
[08:12:21] abdulrehman: adaedra: hahahha he is like me , he really means everyone when he says guys.... on his behalf sorry lol
[08:12:46] ruby-lang332: ljarvis: I've been having no end of trouble with it. Ruby just AVs over and over, in all sorts of experiments I've tried.
[08:12:54] GriffinHeart: BraddPitt: maybe the docs are wrong then, here http://ruby-doc.org/stdlib-2.0.0/libdoc/openssl/rdoc/OpenSSL.html#module-OpenSSL-label-Loading+a+Key
[08:13:15] ljarvis: ruby-lang332: I can't help I'm afraid, I have very little knowledge of windows related stuff, sorry
[08:13:21] BraddPitt: perhaps I'm mistaken then
[08:13:46] GriffinHeart: BraddPitt: I don't think so, thats the google answer I got (not a pub/priv key)
[08:13:56] ruby-lang332: ljarvis: no poblem. Are there any Ruby on Windows experts that hang around this channel?
[08:14:07] sevenseacat: I think thats an oxymoron
[08:14:27] GriffinHeart: BraddPitt: maybe `.to_pem` without password is just a `to_s` and a `.to_pem` with password is in fact a different kind of file
[08:14:28] zenspider: imperator when he's here
[08:14:34] ljarvis: tell that to Luis Lavena
[08:14:34] BraddPitt: you should verify what is actually being created with the to_pem call
[08:14:34] zenspider: but he's here less and less
[08:14:54] zenspider: ljarvis: to be fair, they did say "hang around in this channel"
[08:15:04] niiamon: has joined #ruby
[08:15:07] bnagy: ruby-lang332: me, but I don't do C extensions
[08:15:17] GriffinHeart: BraddPitt: something like: "-----BEGIN RSA PRIVATE KEY-----\nProc-Type: 4,ENCRYPTED\nDEK-Info: id-aes256-GCM,9DB6893C1D67458508018878\n\n........"
[08:15:38] mikecmpbll: has joined #ruby
[08:15:54] BraddPitt: seems correct
[08:15:58] ruby-lang332: ljarvis: Luis Lavena is a Ruby/Win32 expert?
[08:16:00] BraddPitt: only thing I can think of is if formatting is somehow off
[08:16:33] bnagy: BraddPitt: try to interop with the openssl commandline tools?
[08:16:38] zenspider: it's not silly line endings, is it?
[08:16:48] bnagy: your code doesn't look obviously wrong to me, but the openssl API is just terribad
[08:17:25] GriffinHeart: well i tried like `OpenSSL::PKey::RSA.new(OpenSSL::PKey::RSA.new(2048).to_pem(OpenSSL::Cipher.new('aes-256-gcm'), 'TEST_PASSWORD'), 'TEST_PASSWORD')`
[08:17:28] senayar: has joined #ruby
[08:17:57] Sapna: has joined #ruby
[08:18:23] GriffinHeart: which is just the ugly version of the gist I guess. I'll try generate from rb and read for openssl
[08:18:33] GriffinHeart: and the opposite (I mean commandline tools)
[08:18:36] bnagy: GriffinHeart: fwiw it doesn't work if you follow the docs exactly either
[08:18:44] bnagy: using export
[08:19:48] GriffinHeart: bnagy: hmm...yeah in docs export is actually wrong
[08:19:59] neanderslob: has joined #ruby
[08:20:08] Zai00: has joined #ruby
[08:20:10] GriffinHeart: http://ruby-doc.org/stdlib-2.0.0/libdoc/openssl/rdoc/OpenSSL/PKey/RSA.html#method-i-export goes to `#to_pem`
[08:20:38] bnagy: works without a passphrase
[08:20:54] khebbie: has joined #ruby
[08:20:58] bnagy: I would recommend checking the src to see if there are actually tests in openssl for this
[08:20:59] GriffinHeart: bnagy: Yeah without passphrase is ok
[08:21:00] khebbie_: has joined #ruby
[08:21:08] Musashi007: has joined #ruby
[08:21:09] senayar: has joined #ruby
[08:21:10] bnagy: wouldn't be the first time I've hit stuff which is just Not Implemented
[08:21:22] GriffinHeart: bnagy: good idea, I'll try to check
[08:21:33] bnagy: but try with commandline tools first imho
[08:21:48] bnagy: like maybe it's only one of export/import with passphrase that's borked
[08:22:17] eGGsha: has joined #ruby
[08:22:30] wldcordeiro_: has joined #ruby
[08:23:01] _blizzy_: has joined #ruby
[08:23:24] bnagy: ruby-lang332: btw a better approach is almost certainly writing your windows native stuff as a DLL and then using FFI from ruby
[08:23:50] bnagy: ruby-lang332: because then you don't screw everyone that doesn't use MRI (and you will probably have a MUCH more fun time)
[08:24:08] zenspider: am I the only one who has an innate distrust of ffi?
[08:24:17] abucha: has joined #ruby
[08:24:37] yorickpeterse: zenspider: how so?
[08:24:46] bnagy: it can be touchy and the docs are awful
[08:24:58] bnagy: just that imho all the other options are worse ;)
[08:25:22] zdwgeoounmfq: has joined #ruby
[08:25:29] GriffinHeart: bnagy: seems they do have a test: https://github.com/ruby/openssl/blob/master/test/test_pkey_rsa.rb#L252-L264
[08:25:37] GriffinHeart: but the usage is different
[08:26:25] christiandsg: has joined #ruby
[08:26:43] zdwgeoounmfq: has joined #ruby
[08:26:54] abucha: has joined #ruby
[08:27:00] wldcordeiro_: has joined #ruby
[08:27:20] GriffinHeart: Ok, it might be the cipher is not supported, just tried same code with 'AES-128-CBC' and it works
[08:28:23] djbkd_: has joined #ruby
[08:28:47] bnagy: the cipher is supported, but it's just broken -_____-
[08:29:00] bnagy: muppets :<
[08:29:09] GriffinHeart: bnagy: yeah just found something http://security.stackexchange.com/questions/83384/creating-a-private-key-with-openssl-and-encrypting-it-with-aes-gcm
[08:29:35] bnagy: looks like gcm is the problem
[08:30:00] Violentr: has joined #ruby
[08:30:16] Hounddog: has joined #ruby
[08:30:23] bnagy: ok so it's openssl muppetry not Ruby muppetry
[08:30:37] bnagy: crypto is fun! Let's all do crypto! With openssl! \o/
[08:30:37] apfeluser: has joined #ruby
[08:30:48] GriffinHeart: dark magic voddoo stuff, thanks for helping me out guys
[08:31:09] GriffinHeart: bnagy: did you find a bugtrack or issue or similar that I could follow?
[08:31:52] bnagy: GriffinHeart: only that answer where they say it should be patched in g
[08:32:42] wldcordeiro_: has joined #ruby
[08:33:08] Fraeon: has joined #ruby
[08:34:39] dumdedum: has joined #ruby
[08:34:42] abucha_: has joined #ruby
[08:36:45] ksldjflks: has joined #ruby
[08:37:16] wldcordeiro_: has joined #ruby
[08:37:45] juanpablo______: has joined #ruby
[08:37:48] abucha_: has joined #ruby
[08:38:11] GriffinHeart: bnagy: Thank you
[08:38:26] abucha_: has joined #ruby
[08:39:00] leat: has joined #ruby
[08:39:01] schaerli: has joined #ruby
[08:39:07] abucha: has joined #ruby
[08:40:58] wldcordeiro_: has joined #ruby
[08:41:05] kline: has joined #ruby
[08:41:17] Guest38847: has joined #ruby
[08:43:14] abucha: has joined #ruby
[08:44:32] f4cl3y: has joined #ruby
[08:44:52] blackmesa: has joined #ruby
[08:45:20] camilasan: has joined #ruby
[08:47:20] umo20: has joined #ruby
[08:48:05] abucha: has joined #ruby
[08:49:10] sameerynho: has joined #ruby
[08:49:13] wldcordeiro_: has joined #ruby
[08:49:35] meph: has joined #ruby
[08:49:45] djbkd: has joined #ruby
[08:51:18] bumbar_: has joined #ruby
[08:51:38] shevy: if I yield a block, it returns the last statement given? for instance... foo { :one; :two } <-- I would only receive the symbol :two here right?
[08:53:38] neanias: ACTION goes back to work
[08:53:54] wldcordeiro_: has joined #ruby
[08:54:09] gagrio: has joined #ruby
[08:54:44] brotspinne: has joined #ruby
[08:54:44] zenspider: shevy: just like any other block expression. `if true then 1; 2; end`
[08:54:47] BeatzKilla_: has joined #ruby
[08:55:38] stef204: has joined #ruby
[08:56:10] Igorshp: has joined #ruby
[08:56:19] c0m0: has joined #ruby
[08:56:35] xcesariox: has joined #ruby
[08:56:39] Siyfion: has joined #ruby
[08:56:45] senayar: has joined #ruby
[08:56:51] anisha: has joined #ruby
[08:57:09] sysx1000: How can i set @ variable? e.g. some_super_ultra_function_of_setting_@_variable('my_variable_name', :its_value)
[08:57:12] quimrstorres: has joined #ruby
[08:57:17] anisha: has joined #ruby
[08:57:29] mikecmpbll: instance_variable_set("@var", val)
[08:57:36] _ixti_: has joined #ruby
[08:58:00] mikecmpbll: you were close though!
[08:58:28] jxL: has joined #ruby
[08:58:40] folex: has joined #ruby
[08:59:10] Ox0dea: >> Module.methods.grep(/[gs]et$/) # sysx1000
[08:59:11] ruboto: Ox0dea # => [:const_get, :const_set, :class_variable_get, :class_variable_set, :instance_variable_get, :instance ...check link for more (https://eval.in/408853)
[08:59:30] folex: Is there any way to enable strict checking for variable names? I want ruby to warn me about using undeclared variable. I just want some protection from typos.
[08:59:54] bougyman: folex: I use static analysis for that.
[08:59:57] bougyman: rubocop, specifically.
[09:00:08] bougyman: it's tied into my editor, I can't save a file with a mistake like that in it.
[09:00:18] folex: bougyman: how often do you run it?
[09:00:28] bougyman: folex: my editor runs it every time I save a file.
[09:00:28] folex: bougyman: what editor exactly?
[09:00:34] sevenseacat: has joined #ruby
[09:00:49] bougyman: and if it hits a warning (the levels are configurable), it halts the save and puts the cursor on the line with the problem.
[09:01:00] bougyman: with a notification in the statusbar telling me how I fucked up.
[09:01:15] bougyman: I'm using vim with syntastic and a couple settings to enable this.
[09:01:18] DoubleMalt: has joined #ruby
[09:01:24] zenspider: folex: ruby -w warns against uninitialized vars
[09:01:40] workmad3: has joined #ruby
[09:01:43] firoxer: bougyman, do you think the default settings for Rubocop are sane?
[09:02:01] zenspider: I don't... but I created seattle-style. :)
[09:02:54] [k-: has joined #ruby
[09:03:04] firoxer: Uh, what do you mean by that? :D
[09:03:07] Sapna: has joined #ruby
[09:03:49] ixti: has joined #ruby
[09:04:15] zenspider: I don't like rubocop's default settings. at all. still (only sorta) working on getting a config that represents our programming style. still probably have ~10 bugs open on rubocop (that might not be true anymore... I haven't checked)
[09:04:25] Stan: has joined #ruby
[09:04:30] kline: has left #ruby: ("WeeChat 1.0.1")
[09:05:00] yorickpeterse: Some of its defaults are _really_ pedantic
[09:05:09] yorickpeterse: e.g. requiring whitespace after { and before } when using hash literals
[09:05:14] senayar: has joined #ruby
[09:05:15] yorickpeterse: (so { ... } vs {...})
[09:05:30] firoxer: I try to convince myself that my code will get better if I obey...
[09:05:33] yorickpeterse: or requiring #encoding comments
[09:05:33] PhantomSpank: has joined #ruby
[09:05:38] yorickpeterse: (not sure if that's still in)
[09:05:40] firoxer: Though some of the stuff it spouts out is _really really_ pedantic
[09:05:47] zenspider: I'm a BIG fan of using the space bar, personally
[09:05:49] wldcordeiro_: has joined #ruby
[09:05:53] zenspider: but I agree
[09:05:57] schaerli: has joined #ruby
[09:06:26] banister: has joined #ruby
[09:06:41] firoxer: IMO blocks should be padded and hash literals not
[09:06:47] firoxer: Makes the different meanings stand out
[09:07:19] Renich: has joined #ruby
[09:07:27] zenspider: simple context makes them stand out
[09:07:38] firoxer: Well, yeah
[09:07:50] firoxer: If you have to depend on whitespace you're already screwed
[09:08:14] omegamike: has joined #ruby
[09:08:47] mikecmpbll: i went through a period of crippling self-doubt over my block style, but i'm out the other side and nobody will sway me now
[09:08:52] zenspider: I'm old. With older eyes. I need whitespace.
[09:08:55] mikecmpbll: ACTION feels emboldened
[09:09:15] folex: zenspider: "-w' Enables verbose mode without printing version message at the beginning. It sets the $VERBOSE variable to true."
[09:09:15] folex: I'm pretty sure I'm looking at the wrong `-w' http://linux.die.net/man/1/ruby
[09:09:27] quimrstorres: has joined #ruby
[09:09:28] Oog: has joined #ruby
[09:09:38] rsc___: has joined #ruby
[09:09:53] zenspider: % ruby -we 'p @var'
[09:09:53] zenspider: -e:1: warning: instance variable @var not initialized
[09:10:05] elia: has joined #ruby
[09:11:34] OrbitalKitten: has joined #ruby
[09:14:02] shevy: whitespace - and a big font :D
[09:14:16] gregf_: the -w switch i guess is for warnings
[09:14:20] zenspider: biiig font. :)
[09:14:36] zenspider: I wish emacs could do that font with the programming ligatures
[09:14:49] startupality: has joined #ruby
[09:15:00] adaedra: Comic Sans 22pt
[09:15:10] firoxer: Googled "programming ligatures" and this is COOL
[09:15:46] SOLDIERz: hello everyone I need some help
[09:15:47] doerteDev: has joined #ruby
[09:16:05] schaerli: has joined #ruby
[09:16:10] SOLDIERz: I got a tar.gz file drom ruby but I'm not sure which version it is how could i verify this
[09:16:29] zenspider: SOLDIERz: do you know where you got it from?
[09:16:45] SOLDIERz: yes from the original ruby site
[09:17:06] zenspider: current stable url is https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.gz
[09:17:10] zenspider: so the version is right in the tarball
[09:17:16] gregf_: SOLDIERz: untar/unip and read the README?
[09:17:52] arup_r: has joined #ruby
[09:18:12] gregf_: SOLDIERz: rvm/rbenv(environment managers) could save you all that trouble :/
[09:19:05] SOLDIERz: gregf_ actually I'm using them but I got a weired problem that ruby -v is not returning me the correct version it's returning me 2.2.1 but the deployed version is 2.2.2 so
[09:19:40] SOLDIERz: Yes I'm using chruby adaedra
[09:20:08] riffraff: has joined #ruby
[09:20:27] SOLDIERz: could not find any version in the README
[09:20:34] adaedra: I just throw that in here, since it was missing from gregf_ list :)
[09:21:34] adaedra: are you sure the right ruby version is selected? That system ruby is not interfering?
[09:21:44] adaedra: What does `which ruby` prints?
[09:21:55] [k-: .ruby_version kind of stuff?
[09:22:56] SOLDIERz: http://pastebin.com/BRpQjUsT
[09:22:57] ruboto: SOLDIERz, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/9bfb1fcf8699629453a4
[09:22:57] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[09:23:02] eGGsha: has joined #ruby
[09:23:10] AnoHito: has joined #ruby
[09:23:43] zenspider: SOLDIERz: if you still have the tarball: grep define.RUBY_VERSION version.h
[09:24:45] platzhirsch: has joined #ruby
[09:24:45] zenspider: is `which` alias / function savvy?
[09:24:53] SOLDIERz: zenspider version.h:#define RUBY_VERSION "2.2.2"
[09:25:00] zenspider: try `type ruby` instead... depending on what shell you're in
[09:25:19] Sapna: has joined #ruby
[09:26:30] melter: has joined #ruby
[09:27:32] banister: has joined #ruby
[09:30:13] leafybasil: has joined #ruby
[09:30:27] zeeraw: has joined #ruby
[09:30:33] mercwithamouth: has joined #ruby
[09:31:14] abucha_: has joined #ruby
[09:31:36] blackmesa: has joined #ruby
[09:33:11] jhass: I think command -v is the most portable one
[09:33:19] withnale_: has joined #ruby
[09:33:19] nofxx: has joined #ruby
[09:33:28] havenwood: command -v ruby
[09:33:42] havenwood: beat me to it, aye posixy
[09:33:44] nofxx: has joined #ruby
[09:33:52] rsc___: has joined #ruby
[09:34:07] MatrixBridge: has joined #ruby
[09:36:09] CustosLimen: has joined #ruby
[09:37:17] amcoder: has joined #ruby
[09:37:24] shevy: oh yes... -v for ... verbose! :D
[09:37:35] charliesome: has joined #ruby
[09:37:50] abucha: has joined #ruby
[09:39:21] htmldrum: has joined #ruby
[09:39:28] wpp: has joined #ruby
[09:39:37] havenwood: shortdudey123: -V for *more* verbose
[09:39:46] havenwood: shortdudey123: oops, sry
[09:40:03] havenwood: Why do you fail me, autocomplete?
[09:40:35] hololeap: has joined #ruby
[09:42:25] adaedra: Because the Fail key is so close to the Tab one.
[09:42:56] mxrguspxrt: has joined #ruby
[09:43:16] bruno-: has joined #ruby
[09:43:38] SOLDIERz: zenspider adaedra gregf_ okay I find out the reason why this was happening I don't know why but it seems chruby was pointing me to the major shared library libruby.so.2.2.0
[09:44:11] SOLDIERz: which was not pointing to 2.2.2 it referred me too 2.2.1
[09:44:42] nish1294: has joined #ruby
[09:45:27] havenwood: SOLDIERz: What do you get for?: command -v \ruby
[09:45:43] pygospa: has joined #ruby
[09:46:15] leat: has joined #ruby
[09:47:07] havenwood: SOLDIERz: echo $RUBY_ROOT
[09:47:40] tubuliferous: has joined #ruby
[09:47:55] havenwood: SOLDIERz: echo $RUBY_VERSION
[09:47:56] rakm: has joined #ruby
[09:48:22] rakm: hey, i install rbenv on centos and am attempting to install gem install bundler, but i get "/usr/local/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/config_file.rb:330:in `exist?': Insecure operation - exist? (SecurityError)"
[09:48:27] rakm: any idea what the problem could be?
[09:49:02] folex: Is there specific settings in RuboCop for detecting usage of undeclared variables?
[09:49:07] tsujp: has joined #ruby
[09:49:11] folex: I was unable to find anything
[09:49:15] adaedra: folex: the ruby -w flag
[09:49:49] dr_bob: has joined #ruby
[09:49:58] BeatzKilla_: has left #ruby: ("Konversation terminated!")
[09:50:30] folex: adaedra: the thing is, I'm running everything via cucumber/calabash, and I'm not really sure how to pass `-w' there.
[09:53:31] zenspider: rakm: that sounds like your OS is preventing it? do you have it on lockdown or something? or something has set $SAFE > 0
[09:53:37] bodgix: has joined #ruby
[09:54:11] rakm: yeah zenspider, i think it's a unix pemissions problem? not sure how to resolve though. i have rbenv install directory owned by the rbenv group and my current user is part of that group
[09:54:32] ips|malc: has joined #ruby
[09:55:07] zenspider: it's in ruby. rb_stat is called by rb_file_exist_p
[09:55:07] adaedra: folex: "It sets the $VERBOSE variable to true"
[09:55:24] adaedra: folex: you will get noise from 3rd party libraries tho
[09:55:44] zenspider: and rb_stat checks the $SAFE level
[09:56:07] zenspider: rubygems doesn't set SAFE
[09:56:48] senayar: has joined #ruby
[09:56:53] elia: has joined #ruby
[09:57:01] KnownSyntax: has joined #ruby
[09:57:06] rakm: zenspider this is all unfamiliar territory for me. how should i fix?
[09:57:32] zenspider: not entirely sure how you got in that mess to begin with
[09:57:58] folex: In the end, rubocop can't detect usage of undeclared variables?
[09:58:02] zenspider: you JUST installed ruby via ruby-install ?
[09:58:22] senayar: has joined #ruby
[09:58:35] zenspider: folex: have you googled it?
[09:58:45] folex: yeah, googling right now
[09:59:05] SOLDIERz: havenwood command -v \ruby --> /opr/rubies/ruby-2.2.2/bin/ruby
[09:59:09] folex: I'm really a Scala guy and just helping our testing team, so it's kinda hard :)
[09:59:14] havenwood: SOLDIERz: Looks right.
[09:59:17] senayar: has joined #ruby
[09:59:18] senayar: has joined #ruby
[09:59:28] havenwood: SOLDIERz: assuming /opr is a typo
[09:59:35] SOLDIERz: echo $RUBY_ROOT --> /opt/rubies/ruby2.2.2
[09:59:36] rakm: zenspider no, installed with rbenv
[09:59:39] zenspider: looks like the VariableInspector does it
[09:59:44] zenspider: rbenv doesn't install anything
[09:59:49] senayar: has joined #ruby
[09:59:49] senayar: has joined #ruby
[09:59:51] SOLDIERz: echo $RUBY_VERSION --> 2.2.2
[10:00:03] rakm: zenspider `rbenv install 2.1.1` does :)
[10:00:04] SOLDIERz: yeah sry opr is a typo should be opt
[10:00:10] zenspider: rakm: did you ALSO install ruby-install as a plugin?
[10:00:34] senayar: has joined #ruby
[10:00:38] rakm: i only installed the `ruby-build` plugin
[10:01:05] zenspider: sure. whatever. so.. THAT is what is doing the install.
[10:01:40] havenwood: SOLDIERz: That is all correct, so where is 2.2.1 coming into things?
[10:02:10] zenspider: havenwood: dynamic linking. looks like the newer binary is attaching to the older libruby
[10:02:25] zenspider: dunno how / why... other than RUBY_API_VERSION being compat
[10:02:25] havenwood: zenspider: ahh
[10:02:43] havenwood: or a typo and SOLDIERz meant 2.2.0 and it's just the ABI?
[10:03:09] zenspider: possibly... I wish ppl would actually copy/paste instead of leaving us guessing
[10:03:18] zenspider: rakm: so, again... you JUST installed this from a fresh build?
[10:03:27] rakm: zenspider ye
[10:03:31] zenspider: you've not used ruby on this system before?
[10:03:50] zenspider: `env | egrep "RUBY|GEM"`
[10:04:05] rakm: i think it has a system ruby 1.8.7 as well
[10:04:13] rakm: install with yum or something
[10:04:16] rakm: don't know
[10:04:31] SOLDIERz: havenwood what you mean with it's just the ABI?
[10:04:54] folex: zenspider:
[10:04:54] folex: I hope it's my last stupid question.
[10:04:55] folex: I need something like
[10:04:55] folex: Style/VariableInspector
[10:04:55] folex: Enabled: True
[10:04:56] folex: In rubocop.yml, right? I'm not sure is it `Style/` or another namespace, and can't see it's being speicfied anywhere in rubocop's source.
[10:05:10] senayar: has joined #ruby
[10:05:11] rakm: that cmd didn't return anything
[10:05:17] folex: I guess it's Lint/
[10:05:21] SOLDIERz: havenwood this one hear ruby(abi) = 2.1?
[10:05:35] havenwood: SOLDIERz: Application Binary Interface
[10:05:43] havenwood: SOLDIERz: 2.2.2's ABI is 2.2.0.
[10:07:06] stamina: has joined #ruby
[10:07:23] SOLDIERz: and what is the ABI Interface for 2.2.1 also 2.2.0
[10:07:25] zenspider: rakm: that's good. but bad...
[10:07:34] havenwood: SOLDIERz: yup
[10:07:34] zenspider: I don't know what's setting your SAFE variable
[10:07:40] failshell: has joined #ruby
[10:07:42] eGGsha: has joined #ruby
[10:08:10] rakm: zenspider i deleted the 2.1.1 version in rbenv dir and reinstalled and now i can install bundler
[10:08:10] SOLDIERz: okay mhh I don't get it why this happens
[10:08:25] rakm: not sure what was different from last time around
[10:08:26] zenspider: rakm: *shrug*
[10:08:38] havenwood: rakm: Why a global install of rbenv (i'm not an rbenv user but i'm used to seeing it in users' home dir)?
[10:08:52] folex: has left #ruby: ()
[10:09:49] m4rCsi: has joined #ruby
[10:09:57] Sapna: has joined #ruby
[10:10:06] havenwood: rakm: The /usr/local rbenv (ruby-build) install must not play nice with limited permissions. Do you need it for multiple users?
[10:10:51] rakm: havenwood i changed the group of /usr/local/rbenv to an "rbenv" group and added the users i wanted to i
[10:10:58] JoshuaPaling: has joined #ruby
[10:11:05] rakm: don't _really_ have a use case for multi user right now
[10:11:06] havenwood: rakm: Ah, gotcha, actually multi-user.
[10:11:07] Oog: has joined #ruby
[10:12:22] SOLDIERz: but it's defiantly related to the libruby.so.2.2.0 something is messing around here
[10:12:42] SOLDIERz: when I change to old version 2.1.2 everything is fine correct ruby version everything
[10:12:42] havenwood: SOLDIERz: Where are you seeing 2.2.1? Are you seeing 2.2.1?
[10:12:57] havenwood: SOLDIERz: Was 2.2.1 a typo and you're not seeing it?
[10:13:31] havenwood: SOLDIERz: Run the thing that's actually bothering you and Gist the verbatim error log?
[10:13:42] SOLDIERz: When I'm switching to ruby 2.2.2 with chruby ruby-2.2.2 and then do a ruby -v it is displaying 2.2.1
[10:13:58] havenwood: SOLDIERz: So right now, if you?: ruby -v
[10:14:25] SOLDIERz: it returns 2.2.1 but I switched to 2.2.2 with chruby
[10:14:29] davedev24: has joined #ruby
[10:14:33] havenwood: SOLDIERz: Check?: \ruby -v
[10:14:58] havenwood: SOLDIERz: Just to confirm.
[10:15:10] christiandsg: has joined #ruby
[10:16:19] havenwood: SOLDIERz: I'd be curious to see a gist of the output of running: chruby/scripts/bug_report.sh
[10:16:43] havenwood: SOLDIERz: Well, seems something is amiss...
[10:17:14] workmad3: has joined #ruby
[10:18:56] chinmay_dd: has joined #ruby
[10:19:06] blueOxigen: has joined #ruby
[10:19:17] havenwood: SOLDIERz: I'd reinstall Ruby 2.2.2. ;)
[10:19:39] havenwood: SOLDIERz: Nuke it from orbit and reinstall.
[10:19:59] leat: has joined #ruby
[10:20:17] sdothum: has joined #ruby
[10:20:27] rickmasta: has joined #ruby
[10:20:46] Fraeon: has joined #ruby
[10:21:47] rbowlby: has joined #ruby
[10:21:49] adaedra: ACTION gets out his orbital cannon
[10:22:09] dseitz: has joined #ruby
[10:23:22] darix: maybe buy also a new computer with a clean disk.
[10:24:42] shevy: and clean your seat
[10:24:51] SOLDIERz: havenwood ?
[10:25:05] phutchins: has joined #ruby
[10:25:23] piotrj: has joined #ruby
[10:26:12] SOLDIERz: havenwood http://pastebin.com/bkic1TeN http://pastebin.com/2RkHv8nc
[10:26:13] ruboto: SOLDIERz, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/eaa7261be95a7e4d5b56
[10:26:13] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[10:26:50] juanpablo______: has joined #ruby
[10:27:07] armyriad: has joined #ruby
[10:27:13] havenwood: SOLDIERz: So your PATH has Ruby 2.2 gems then Ruby 2.2.1.
[10:27:38] havenwood: SOLDIERz: Which is your RUBY_ROOT.
[10:28:34] lkba: has joined #ruby
[10:28:44] SOLDIERz: the first on was with version 2.2.1 and the second 2.2.2 after changing with chruby
[10:29:02] havenwood: SOLDIERz: Hem?
[10:29:03] ringarin: has joined #ruby
[10:29:26] mathie: has joined #ruby
[10:29:36] Sapna: has joined #ruby
[10:29:39] SOLDIERz: I'm going crazy I don't know why this is happening
[10:30:07] SOLDIERz: so you got everything up and running you got multiple version 2.2.1 and 2.2.2 on other
[10:30:16] leat: has joined #ruby
[10:30:39] SOLDIERz: and everything is fine also the version switch havenwood
[10:30:52] phutchins: has joined #ruby
[10:31:06] havenwood: SOLDIERz: Try just reinstalling Ruby 2.2.2? It seems you have Ruby 2.2.1 in a 2.2.2 directory. I don't know why.
[10:31:10] ndrei: has joined #ruby
[10:31:55] havenwood: SOLDIERz: My suggestion: rm -rf /opt/rubies/ruby-2.2.2/
[10:32:10] havenwood: SOLDIERz: If you don't need 2.2.1 nuke that as well.
[10:32:29] brotspinne: has joined #ruby
[10:33:20] schaerli: has joined #ruby
[10:33:36] allcentury: has joined #ruby
[10:33:44] havenwood: SOLDIERz: Install a fresh 2.2.2 that really is 2.2.2.
[10:34:10] casadei_: has joined #ruby
[10:37:22] SOLDIERz: havenwood hm okay thx anyway :-)
[10:37:30] CustosLimen: has joined #ruby
[10:37:31] havenwood: SOLDIERz: Good luck!
[10:37:47] Zai00: has joined #ruby
[10:38:02] iateadonut: has joined #ruby
[10:39:23] tsujp: has joined #ruby
[10:39:31] senayar: has joined #ruby
[10:40:16] Siyfion: has joined #ruby
[10:41:58] Guest38847: has joined #ruby
[10:42:10] sarkyniin: has joined #ruby
[10:43:04] ndrei: has joined #ruby
[10:43:56] bruno-: has joined #ruby
[10:45:38] jgt: has joined #ruby
[10:46:36] niiamon: has joined #ruby
[10:47:05] jgt: hey folks
[10:47:39] jgt: can I use a regex to test a string only contains a single word?
[10:47:45] pontiki: morning, all
[10:47:56] Violentr: has joined #ruby
[10:48:00] havenwood: pontiki: good mornin'
[10:48:06] jgt: so if my string is "one", it matches, but if it's "one two", it doesn't match
[10:48:10] pontiki: i mean, yes, you can
[10:48:25] jgt: pontiki: I know you'll say this is not the best way to do this ;)
[10:48:55] pontiki: not at all; i don't really know "best" in most cases
[10:48:59] pontiki: havenwood does
[10:49:11] jgt: the easiest way I can think of is "one two".split(" ")[1]
[10:49:14] havenwood: pontiki: oh, i just pretend ;P
[10:49:25] havenwood: jgt: include? ' '
[10:49:40] havenwood: jgt: Are you wanting to know if there's a space? Or any whitespace?
[10:49:50] pontiki: yeah, see, jgt, i was going at: "one two".scan(/\w+/).size > 1
[10:50:49] havenwood: >> 'one two' !~ /\s/
[10:50:50] ruboto: havenwood # => false (https://eval.in/408917)
[10:50:57] jgt: havenwood: now that you mention it, I guess I could test for whitespace after trimming the string
[10:51:56] jgt: >> "one two" =~ /^\s/
[10:51:57] ruboto: jgt # => nil (https://eval.in/408918)
[10:52:25] pontiki: >> "one two" =~ /\S/
[10:52:26] ruboto: pontiki # => 0 (https://eval.in/408919)
[10:52:45] jgt: ok, ok, fine. I'll confess my real use case.
[10:52:55] pontiki: that wasn't what i expected...
[10:53:05] pontiki: NO DON'T DO IT!!
[10:53:24] jgt: I want to test if a string contains a digit, or a forward slash, or contains only one word
[10:53:37] apeiros: jgt: in order to?
[10:53:47] havenwood: jgt: any of the above or all of the above?
[10:53:58] jgt: havenwood: any of the above
[10:54:12] PhantomSpank: has joined #ruby
[10:54:13] jgt: if any of the above are true of a given string, I throw some exception
[10:54:39] jgt: s/throw/raise/
[10:55:04] apeiros: how do you define a word?
[10:55:17] rodfersou: has joined #ruby
[10:55:35] _blizzy_: has joined #ruby
[10:55:36] apeiros: are "??rgerlich" or "Sm??rrebr??d" words?
[10:56:22] jgt: apeiros: https://twitter.com/hintjens/status/535524341854011392?lang=en
[10:56:40] jgt: ??rgerlich and Sm??rrebr??d are both single words
[10:56:58] jgt: (in this context)
[10:56:59] havenwood: jgt: is fsd8**hi a word?
[10:57:00] sarkyniin: has joined #ruby
[10:57:00] sevenseacat: its not being pedantic, its clarifying the problem domain
[10:57:02] apeiros: ok, because then \w won't do
[10:57:18] apeiros: sevenseacat: pedantic was wrt throw/raise ;-)
[10:57:26] omegamike: has joined #ruby
[10:57:31] apeiros: the part about words I wouldn't consider pedantry either!
[10:57:39] jgt: havenwood: "fsd8**hi" is one word, but there is an 8 in there so I would raise for that
[10:57:56] codecop: has joined #ruby
[10:58:07] apeiros: jgt: so anything without a whitespace in it is a word?
[10:58:15] jgt: apeiros: yes
[10:58:30] apeiros: btw., you still didn't actually tell your use-case :-p
[10:58:39] riffraff: has joined #ruby
[10:58:39] jgt: so, by word, I mean whitespace-delimited token
[10:58:40] apeiros: the use case is defined by that "in order to???"
[10:58:42] jhass: "foobar. baz-quux" what are the words in here?
[10:59:01] jgt: jhass: ["foobar.", "baz-quux"]
[10:59:30] apeiros: " hello " this would also be a string containing only a single word, right?
[10:59:37] jgt: apeiros: I have a list of names of humans, and I want to discern first names and last names
[10:59:42] sinkensabe: has joined #ruby
[10:59:52] jgt: apeiros: yes. I think I would have to trim the string first.
[11:00:01] apeiros: jgt: I assume you are aware that there are names which can act as both
[11:00:02] jhass: only people from western countries?
[11:00:11] apeiros: in fact, there are regions where the first name of the parent makes the last name of the child
[11:00:16] jgt: only Scandinavian people
[11:00:26] tsujp: has joined #ruby
[11:00:28] sevenseacat: what about people with more than two names? :/
[11:00:30] sevenseacat: or less than two
[11:00:42] jgt: nobody in my set of data has less than two names
[11:00:48] jgt: or rather, they shouldn't
[11:00:50] ljarvis: less than two has caught me out :(
[11:00:51] sevenseacat: http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/
[11:00:58] jgt: ohhhhh here we go
[11:01:48] startupality: has joined #ruby
[11:01:51] Sapna: has joined #ruby
[11:01:52] jgt: there are people with more than two names, e.g., "John David Smith", in which case "John David" would be the first name
[11:02:07] sevenseacat: thats correct.
[11:02:07] T3: has joined #ruby
[11:02:12] bnagy: hand in your gun and badge
[11:02:48] sevenseacat: i went to school with a girl, her first name was Amanda Louise, and she got so grumpy if you did not call her by her proper first name
[11:02:55] apeiros: I like "40. People have names."
[11:02:59] apeiros: "hi 7of9!"
[11:03:04] apeiros: (it's a designation! not a name!)
[11:03:44] apeiros: friend's name is anne catherine, single first name :)
[11:04:14] PhantomSpank: has joined #ruby
[11:04:19] towski_: has joined #ruby
[11:04:55] cajone: has joined #ruby
[11:05:12] stef204: has joined #ruby
[11:05:14] jgt: so, I guess there's no way to use a regex to determine if a string contains only a single whitespace-delimited token, huh?
[11:05:31] bruno-: has joined #ruby
[11:05:41] apeiros: I do have an assumption about names, though
[11:06:15] ljarvis: jgt: scan(/\S+/).size
[11:06:16] apeiros: people who do in fact appear as any point in the above list had to deal with enough shit from computerized systems that they have a canonical latin name :D
[11:06:27] ljarvis: names are hard
[11:06:33] chills42: has joined #ruby
[11:06:35] apeiros: (or will give you a canonical latin name)
[11:06:42] bnagy: apeiros: nope
[11:06:45] pontiki: we make names harder than they are. names are just names.
[11:06:46] niiamon: has joined #ruby
[11:06:58] jgt: I'm sure there's a nerdy virgin out there who legally changed their name to "7" just to prove a point to other programmers about human names and software, but those sorts of people just do not exist in my set of data
[11:07:12] chills42: has joined #ruby
[11:07:13] pontiki: is you set of data fixed?
[11:07:24] apeiros: jgt: do they not exist because they could not be entered in the first place?
[11:07:28] bnagy: apeiros: the people aren't always happy about being in databases (refugees etc)
[11:07:31] pontiki: i.e., the set will never change?
[11:08:03] jgt: the dataset may change, but it's really not that many humans
[11:08:15] jgt: we're talking a few thousand average Joe Scandinavians
[11:08:29] bnagy: still no reason to write oppressive code imho
[11:08:32] failshell: has joined #ruby
[11:08:46] shevy: freedom for code!
[11:08:52] jgt: bnagy: cry me a river?
[11:08:52] bnagy: when it's just as easy not to :P
[11:09:23] shevy: jgt can you store exotic umlauts in your database?
[11:09:31] jgt: shevy: yes
[11:09:42] pontiki: there's more than one kind of umlaut?
[11:09:44] apeiros: well, anyway: str.strip =~ / / && str !~ /\d|\//
[11:09:46] pontiki: like quarks?
[11:09:56] apeiros: that'd satisfy your above requirement
[11:09:57] darix: ACTION strips apeiros 
[11:10:05] shevy: pontiki one day someone may even pick the unicode snowman as the surname!
[11:10:12] apeiros: darix: I didn't think you were from that side of the river???
[11:10:17] pontiki: that's not an umlaut, shevy
[11:10:18] jgt: (I took "umlauts" to generally mean "accents")
[11:10:29] shevy: I am sure there are also some sn?wman out there
[11:10:31] adaedra: ACTION is offended
[11:10:36] pontiki: anyway, the snowman is mine
[11:10:36] apeiros: jgt: diacrit is the generic name
[11:10:39] pontiki: you can't have it
[11:10:44] jgt: apeiros: right
[11:10:46] apeiros: pontiki: ?????? are the only umlauts afaik
[11:10:49] leat: has joined #ruby
[11:10:58] jgt: apeiros: na??ve
[11:11:01] shevy: adaedra it's ok, one day we will all settle for english. see the bright side, it has no umlauts
[11:11:04] apeiros: jgt: not an umlaut afaik
[11:11:10] adaedra: jgt: that's not an umlaut
[11:11:23] jgt: TIL all about umlauts
[11:11:27] bnagy: touche :)
[11:11:28] apeiros: ???? neither
[11:11:30] shevy: >> "?".downcase
[11:11:31] ruboto: shevy # => "??" (https://eval.in/408926)
[11:11:39] adaedra: jgt: https://en.wikipedia.org/wiki/Diaeresis_%28diacritic%29
[11:11:46] pontiki: maybe those are the exotic umlauts shevy mentioned
[11:11:51] apeiros: i,e, not all ?? + char = umlaut
[11:11:59] jgt: apeiros: thanks for actually giving me an answer
[11:12:09] havenwood: shevy: String.downcase "??" #=> "??"
[11:12:24] adaedra: shevy: I hope this hell never comes.
[11:12:45] apeiros: jgt: you are welcome. I thought you had heard all the criticisms and were ready for an answer to throw it away frustratedly because it won't cover it all anyway ;-)
[11:12:48] pontiki: sparkle umlauts?
[11:13:03] Renich: has joined #ruby
[11:13:34] shevy: I am sure there will be corner cases
[11:13:48] havenwood: shevy: (clojure.string/lower-case "??") #=> "??"
[11:13:51] shevy: just like the invisible unicode character... the invisible umlaut
[11:14:24] vdamewood: has joined #ruby
[11:14:31] omegamike: has joined #ruby
[11:14:33] bnagy: you could use it to add \m/etal to band names without making them confusing to spell
[11:14:50] pontiki: wher's the fun in that?!?!
[11:14:56] apeiros: m??t??rh????d?
[11:14:59] jgt: shevy: invisible unicode characters are a real problem for the data I'm working with. Most of the people using the system use OSX, which is an OS that makes it very easy to type nbsp chars
[11:15:19] havenwood: bnagy: \m/??t??l
[11:15:30] shevy: them be evil a people, them macsters
[11:15:42] apeiros: jgt: haha, tell me about it??? I have a piece in my pry-/irbrc which strips nbsp from input
[11:15:51] abdulrehman: I'm having a small problem, I am getting a numeric from the DB and its really long, I need to round it to 10 and display it in float, but when the value is negetive it still shows as exp value like this; 1.83046e-05 even though I have indicated to_i , anyadvice?
[11:16:18] apeiros: abdulrehman: printf/sprintf
[11:16:22] jgt: shevy: definitely. I considered switching to Arch recently, but AFAICT the Linux kernel doesn't have drivers for the FacetimeHD camera
[11:16:30] Sapna: has joined #ruby
[11:16:54] eGGsha: has joined #ruby
[11:16:57] abdulrehman: apeiros: I am saving the value to a key in a hash,
[11:17:29] apeiros: abdulrehman: rounded floats as a hash key? ok??? but I don't see how that changes your question.
[11:18:03] abdulrehman: no no, I am not rounding a float as a hash key, the rounding for the value of the key
[11:18:11] niiamon1: has joined #ruby
[11:18:20] apeiros: I don't even.
[11:18:32] shevy: jgt aha, well if you are ever ready, jhass here also uses arch \o/
[11:18:41] abdulrehman: but I have noticed that thhe same thing is working in the other value but not for some ungodly reason with one of them
[11:19:15] abdulrehman: :security_weight => sec_row.weight.to_f.round(10),
[11:19:30] abdulrehman: :security_price => sec_row.clean_price.to_f.round(10), working here though
[11:19:52] wasamasa: don't use floats for that purpose
[11:20:03] abdulrehman: what other option do I have?
[11:20:07] wasamasa: a price is either specified as int (cents) or decimal
[11:20:23] abdulrehman: no but these are not just any prices
[11:20:23] wasamasa: everything else will get you a swift slap from your accountant
[11:20:28] bnagy: or milicents or a rational
[11:20:36] abdulrehman: these are stock weights and used in risk software
[11:20:40] bnagy: or a fixed precision construct
[11:20:44] wasamasa: aka decimal
[11:20:55] abdulrehman: let me try that
[11:21:06] wasamasa: ruby has #to_d for that
[11:21:22] abdulrehman: do I need to include the decimal ? or no includes?
[11:23:08] xKraty: has joined #ruby
[11:24:12] abdulrehman: ok I required the correct files,
[11:24:20] abdulrehman: and it seems that the big decimal is the better option
[11:24:36] shevy: the bigger the better
[11:25:07] havenwood: require 'bigdecimal'; require 'bigdecimal/util'
[11:25:14] abdulrehman: havenwood: thanks done that
[11:25:19] abdulrehman: but I am back to square 1
[11:25:28] abdulrehman: its displaying the number as exp
[11:25:34] abdulrehman: -0.137033996E-2
[11:25:45] abucha_: has joined #ruby
[11:26:24] abdulrehman: -0.00137033996042487000.to_d(10).to_digits
[11:26:37] abdulrehman: -0.00137033996042487000.to_d(10).to_digits => prints "0.00137033996"
[11:27:00] abdulrehman: -0.00137033996042487000.to_d(10) => prints "-0.137033996E-2"
[11:27:08] abdulrehman: many thanks, everyone
[11:28:47] brendan-: has joined #ruby
[11:28:48] [k-: its not called decimal, though, isnt it called a double
[11:29:28] abdulrehman: the gem called bigdecimal
[11:29:46] apeiros: abdulrehman: funny, now you're where you'd be with sprintf too???
[11:29:52] apeiros: but yeah, good we talked about it :-p
[11:30:20] allcentury: has joined #ruby
[11:30:35] symm-: has joined #ruby
[11:31:39] apeiros: -o apeiros
[11:32:14] abdulrehman: apeiros: true, but no harm of learning a new thing ahhaha
[11:32:44] vali: has joined #ruby
[11:32:46] [k-: doesn't Ruby ship with bigdecimal
[11:33:02] vali: I have an issue with a ruby check/app that I need for some dnssec ...
[11:33:04] havenwood: [k-: yup, in the stdlib
[11:33:25] vali: more exactly I have installed using rvm rb 2.1.5 and also have installed by system ruby 1.8.0 using rpms
[11:33:41] [k-: you mean you updated the gem?
[11:33:44] vali: i need both unfortunately but for this check/app I need 2.1.5
[11:33:57] [k-: i know i did that for psyck last time
[11:34:07] vali: for some reason path for the gems/bin is seen as the old one, any ideas why ?
[11:34:13] vali: I can see the correct path in env
[11:34:49] [k-: correct path in env doesnt mean that path will get checked
[11:34:54] dblessing: has joined #ruby
[11:34:58] niiamon: has joined #ruby
[11:35:06] vali: ok, fair enough, so how can I make it use that path?
[11:35:06] [k-: it is probably the first one that has the file gets run
[11:35:11] havenwood: vali: What is your?: rvm current
[11:35:12] dorei: has joined #ruby
[11:35:17] abucha: has joined #ruby
[11:35:27] vali: its -> rvm current
[11:35:27] vali: ruby-2.1.5
[11:35:43] havenwood: vali: How are you running the app?
[11:35:49] tubuliferous: has joined #ruby
[11:36:02] Violentr: has joined #ruby
[11:36:07] sarkyniin: has joined #ruby
[11:36:22] quimrstorres: has joined #ruby
[11:36:26] vali: calling the file directly -> /dnssec_monitor/lib/dnssec_monitor.rb
[11:36:43] vali: the check has #!/usr/bin/env ruby
[11:36:46] ldnunes: has joined #ruby
[11:36:47] arup_r: has joined #ruby
[11:37:03] vali: so I'm guessing it is using the env settings for it, but it seems not
[11:37:26] vali: when nagios executes it, it complains -> /dnssec_monitor/lib/dnssec_monitor.rb:34:in `require': no such file to load -- rubygems (LoadError)
[11:37:41] ndrei: has joined #ruby
[11:38:06] niiamon1: has joined #ruby
[11:38:13] vali: if I execute myself the check/app it works correctly
[11:38:21] vali: if it gets executed by nagios, it fails
[11:38:54] workmad3: vali: probably means that nagios is picking up the system ruby, not one through RVM, and the system ruby is 1.8.7 (or possibly 1.8.6)
[11:39:52] vali: workmad3: yep, it is using 1.8.5
[11:40:29] vali: so, how can I make it use that path ?
[11:40:57] havenwood: vali: Check what you get for?: command -v ruby
[11:41:11] workmad3: havenwood: nagios is running in a different environment (which is the root of the problem)
[11:41:21] havenwood: workmad3: Aha, I don't know nagios.
[11:41:39] ynroot: has joined #ruby
[11:41:44] vali: havenwood: /usr/local/rvm/rubies/ruby-2.1.5/bin/ruby
[11:41:49] vali: this is as user nagios
[11:42:03] workmad3: vali: user nagios != environment that the nagios daemon is running in
[11:42:34] workmad3: vali: by logging in as the user, you triggered a login shell, which would have activated RVM... the daemon won't be an interactive login shell, which won't trigger RVM
[11:43:17] vali: ok...how could I make it trigger an env update or export that path ?
[11:44:08] workmad3: vali: two things you could do... you could generate a wrapper for the ruby binary that loads the RVM environment when run... I think RVM has docs for that on rvm.io (look for 'wrappers'). Or you could alter the nagios daemon init script and make sure RVM is loaded there
[11:44:19] abucha_: has joined #ruby
[11:44:47] vali: workmad3: http://pastie.org/10319926
[11:44:56] vali: I added these paths to the init script
[11:45:00] vali: is there something missing ?
[11:45:05] vali: still not working correctly
[11:45:24] workmad3: vali: you've not modified PATH
[11:45:49] havenwood: vali: The wrappers workmad3 mentioned create the proper env vars for you.
[11:45:52] workmad3: vali: and I can't see from that how the nagios daemon is being made into a daemon... frequently that's done in a way that can reset the environment...
[11:46:00] workmad3: wrapper script would be the best solution
[11:46:10] havenwood: vali: See the cron or god examples on rvm.io.
[11:46:23] shevy: hmm error of today... rescue LoadErrors; end
[11:46:37] workmad3: (barring using something like chef or puppet to generate init scripts that stamp the entire environment out for you)
[11:46:51] vali: trying to find some info on how to make a wrapper..
[11:47:15] niiamon: has joined #ruby
[11:47:26] Silox|: has joined #ruby
[11:47:50] rsc___: has joined #ruby
[11:48:06] havenwood: vali: It's an area of docs that could really be improved for RVM. They wrappers docs are spread around under init.d, cron, god, etc. The gem-wrappers gem is the RVM internal: https://github.com/rvm/gem-wrappers#readme
[11:49:13] rdark: has joined #ruby
[11:49:18] workmad3: vali: the init.d docs is probably what you want: http://rvm.io/deployment/init-d
[11:49:31] niiamon: has joined #ruby
[11:50:56] abdulrehman: apeiros: I looked up the sprintf pretty strong, but one question if I may, how to make the 00s after the decimal point optional, so if zeros don't show, only show if there is numbers, currently doing this : sprintf("%.10f",12.222) which displays this 12.2222000000
[11:52:19] dimasg: has joined #ruby
[11:53:00] wasamasa: use g instead of f
[11:53:19] wasamasa: assuming ruby has stolen sprintf from C
[11:53:44] adaedra: ???stolen???
[11:54:03] apeiros: abdulrehman: I'm not sure that's possible
[11:54:14] apeiros: abdulrehman: and usually you should indicate the precision of your numbers
[11:54:28] niiamon: has joined #ruby
[11:54:45] abdulrehman: you mean for what before the decimal point ?
[11:54:51] abdulrehman: wasamasa: it worked the way you said
[11:55:03] abdulrehman: sprintf("%.10g", '22.22') => 22.22
[11:55:16] abdulrehman: sprintf("%.10f", '22.22') => "22.2200000000"
[11:55:20] niiamon1: has joined #ruby
[11:55:29] abdulrehman: wasamasa: thank you
[11:55:35] apeiros: yeah, but %g will use exponential notation with large numbers
[11:55:38] wasamasa: too many nicks starting with a in here
[11:55:43] abdulrehman: that's the issue
[11:55:45] apeiros: >> "%.10g" % 123124123124124.123
[11:55:46] ruboto: apeiros # => "1.231241231e+14" (https://eval.in/408960)
[11:55:52] CloCkWeRX: has joined #ruby
[11:56:05] abdulrehman: >> sprintf("%.10f", '22.2223423423423423423')
[11:56:06] ruboto: abdulrehman # => "22.2223423423" (https://eval.in/408962)
[11:56:40] apeiros: >> sprintf("%.10g", 123.456).sub(/0*$/, '')
[11:56:41] ruboto: apeiros # => "123.456" (https://eval.in/408964)
[11:56:47] abdulrehman: >> sprintf("%.10f", '2213123122.2223423423423423423')
[11:56:48] ruboto: abdulrehman # => "2213123122.2223424911" (https://eval.in/408965)
[11:56:52] araujo: has joined #ruby
[11:56:56] abdulrehman: you are right
[11:57:11] apeiros: but again, IMO show the precision of your numbers.
[11:57:14] abdulrehman: ok, then the BAs should make do with the extra zeros
[11:57:36] abdulrehman: apeiros: not sure what do you mean by that, I really haven't used this before
[11:58:09] [k-: hello, we must round off everything to 3 s.f in science!
[11:58:38] abdulrehman: [k-: this isn't science, I work for an evil corp and they want it to the nears 10 decimal places lol
[11:58:43] apeiros: abdulrehman: having the trailing zeroes shows the precision to which you round
[11:59:07] abdulrehman: oh ok, so you are saying keeping the zeros is fine?
[11:59:12] apeiros: and that's how it should be. if you are to round to a given number of digits, trailing zeroes should be there.
[11:59:37] [k-: precision should be 3sf if it processed or to the precision of the instrument!
[11:59:39] apeiros: it's a sad thing we don't have an indicator character for rounding.
[11:59:40] abdulrehman: apeiros: that's logical, and make sense,
[11:59:57] apeiros: [k-: not helping.
[11:59:58] brotspinne: has joined #ruby
[12:00:58] [k-: but, science! (ok this is my last sentence about precision)
[12:02:18] juanpaucar: has joined #ruby
[12:02:21] workmad3: [k-: it is the precision of the instrument... the financial instrument :P
[12:02:55] sdothum: has joined #ruby
[12:02:56] workmad3: abdulrehman: at least, I'm guessing this is still to do with numbers related to stocks? :)
[12:03:39] abdulrehman: ya, all my work is around these types of instruments.... the problem is that my code feed into another software so I can't make up my own spec
[12:03:46] abdulrehman: although I'd love to
[12:04:13] senayar: has joined #ruby
[12:04:18] Muhannad: has joined #ruby
[12:04:44] f3ttX]: has joined #ruby
[12:05:41] ashleyw: has joined #ruby
[12:06:10] Igorshp: has joined #ruby
[12:06:13] lannonbr: has joined #ruby
[12:06:21] axl_: has joined #ruby
[12:06:54] [k-: let the financial experts do it
[12:07:02] ashleyw: hey, is the only solution for thread safe local variables in threads to use Thread.current? Is there a better way so my method isn't littered with so many Thread.current[:blahs]?
[12:07:06] [k-: you can push the blwme to them then!
[12:07:27] abdulrehman: [k-: true that
[12:07:28] cheeti: has joined #ruby
[12:08:26] arup_r1: has joined #ruby
[12:08:30] ips|malc: has joined #ruby
[12:08:39] mack25: has joined #ruby
[12:09:00] nini1294: has joined #ruby
[12:09:11] cheeti: i am trying to build new gem locally, i build the gem using bundle gem your_gem_name command. how to install this gem in my local machine
[12:09:28] cheeti: adaedra i am trying to build new gem locally, i build the gem using bundle gem your_gem_name command. how to install this gem in my local machine
[12:09:49] adaedra: was the hl really necessary
[12:09:54] cheeti: [k- i am trying to build new gem locally, i build the gem using bundle gem your_gem_name command. how to install this gem in my local machine
[12:11:17] [k-: ?anyone
[12:11:17] ruboto: Just ask your question, if anyone has or can, they will respond.
[12:11:21] ishahnaz: has joined #ruby
[12:11:36] mightymike: has joined #ruby
[12:11:49] but3k4: has joined #ruby
[12:11:54] mary5030: has joined #ruby
[12:12:16] Sapna: has joined #ruby
[12:12:22] mightymike: first time usin irc :P
[12:12:36] adaedra: so far so good
[12:12:52] mightymike: what is the purpose of an irc ?
[12:12:52] cheeti: i am trying to build new gem locally, i build the gem using bundle gem your_gem_name command. how to install this gem in my local machine
[12:13:44] [k-: cheeti: http://bundler.io/v1.10/git.html jump to local
[12:14:24] firoxer: has joined #ruby
[12:14:25] [k-: mightymike: Internet Relay _Chat_
[12:14:40] rdark: has joined #ruby
[12:15:18] juanpablo______: has joined #ruby
[12:16:10] mightymike: has left #ruby: ("Leaving")
[12:16:23] firoxer_: has joined #ruby
[12:17:17] niiamon: has joined #ruby
[12:17:19] niiamon1: has joined #ruby
[12:17:25] workmad3: cheeti: gem install <filename>
[12:17:38] vali: thank you for the support guys
[12:17:48] vali: using the wrapper works as expected :)
[12:19:51] cheeti: workmad3 it's giving ERROR: Could not find a valid gem 'xxxxx' (>= 0) in any repository
[12:20:56] mercwithamouth: has joined #ruby
[12:21:08] leslie: has joined #ruby
[12:21:08] leslie: has joined #ruby
[12:21:37] niiamon: has joined #ruby
[12:21:47] carlosoliveira: has joined #ruby
[12:23:38] mary5030: has joined #ruby
[12:24:01] firoxer_: has left #ruby: ()
[12:26:57] startupality: has joined #ruby
[12:28:49] momomomomo: has joined #ruby
[12:29:48] emilkarl: has joined #ruby
[12:30:11] shevy: the name of the gem probably does not exist
[12:30:32] ips|malc: has joined #ruby
[12:30:39] joonty: has joined #ruby
[12:30:42] shevy: if you have a .gem file, try
[12:30:49] shevy: gem install ./name_of_gem_file_here.gem
[12:31:23] failshell: has joined #ruby
[12:31:34] allcentury: has joined #ruby
[12:32:28] Hobbyboy: has joined #ruby
[12:32:32] Scripore: has joined #ruby
[12:32:55] eGGsha: has joined #ruby
[12:32:59] [k-_: has joined #ruby
[12:33:23] dimasg: has joined #ruby
[12:33:51] alex88: has joined #ruby
[12:33:51] alex88: has joined #ruby
[12:33:51] alex88: has joined #ruby
[12:33:51] dstarh: has joined #ruby
[12:34:53] Yiota: has joined #ruby
[12:35:36] boobi: has joined #ruby
[12:35:54] Ropeney: has joined #ruby
[12:36:56] senayar: has joined #ruby
[12:36:56] senayar: has joined #ruby
[12:36:57] TvL2386: has joined #ruby
[12:37:17] prestorium: has joined #ruby
[12:37:22] sankaber: has joined #ruby
[12:39:46] failshell: has joined #ruby
[12:40:07] niiamon: has joined #ruby
[12:41:19] riscky: has joined #ruby
[12:41:58] dfockler: has joined #ruby
[12:44:18] tkuchiki: has joined #ruby
[12:46:09] Soda: has joined #ruby
[12:46:10] chouhoulis: has joined #ruby
[12:47:13] A124: has joined #ruby
[12:48:07] elia: has joined #ruby
[12:50:39] brotspinne: has joined #ruby
[12:50:42] sgambino: has joined #ruby
[12:51:13] bmurt: has joined #ruby
[12:53:54] bustrarm: has joined #ruby
[12:54:27] davejlong: has joined #ruby
[12:54:39] ips|malc: has joined #ruby
[12:55:00] ndrei: has joined #ruby
[12:55:03] olistik: has joined #ruby
[12:56:46] senayar: has joined #ruby
[12:56:49] niiamon: has joined #ruby
[12:58:36] Sapna: has joined #ruby
[12:58:51] cornerma1: has joined #ruby
[12:59:45] DoubleMalt: has joined #ruby
[12:59:52] pdoherty: has joined #ruby
[13:00:09] gix: has joined #ruby
[13:00:10] niiamon_: has joined #ruby
[13:00:39] Zai00: has joined #ruby
[13:00:48] chills42: has joined #ruby
[13:01:00] senayar: has joined #ruby
[13:02:31] senayar: has joined #ruby
[13:02:31] senayar: has joined #ruby
[13:02:45] rsc___: has joined #ruby
[13:04:52] niiamon: has joined #ruby
[13:05:51] Scripore: has joined #ruby
[13:06:58] shortCircuit__: has joined #ruby
[13:07:23] startupality: has joined #ruby
[13:08:42] Zai00: has joined #ruby
[13:09:47] shortCircuit__: I want to create a simple ORM kind of wrapper around redis. presently I had this. https://gist.github.com/aghosh47/4b74408bf86eaceec882 but the methods are very implementation specific. I could do something like only the barebone structure like in th eInstanceMethods I have create_sorted_set , and then create_list, create_set .. and then have the implementation specific call. with maybe with instance_eval and lambdas. help with ideas please
[13:10:18] mercwithamouth: has joined #ruby
[13:11:12] victortyau: has joined #ruby
[13:12:12] Sapna: has joined #ruby
[13:12:57] rsc___: has joined #ruby
[13:13:58] troulouliou_div2: has joined #ruby
[13:14:46] EminenceHC: has joined #ruby
[13:15:13] schaerli_: has joined #ruby
[13:15:16] decoponio: has joined #ruby
[13:17:48] rsc___: has joined #ruby
[13:18:14] tkuchiki: has joined #ruby
[13:19:22] werelivinginthef: has joined #ruby
[13:20:05] prestorium: has joined #ruby
[13:21:24] niiamon: has joined #ruby
[13:23:08] Scripore: has joined #ruby
[13:23:58] tubuliferous: has joined #ruby
[13:24:23] auzty: has joined #ruby
[13:25:01] mary5030: has joined #ruby
[13:25:39] mary5030: has joined #ruby
[13:28:05] malconis: has joined #ruby
[13:28:38] mack25: has joined #ruby
[13:28:48] Rinzlit: How dafq do I type ||
[13:29:09] spider-mario: has joined #ruby
[13:29:11] tuelz: has joined #ruby
[13:29:24] [k-_: you just typed it?
[13:29:34] [k-_: what is your keyboard layout
[13:29:42] Rinzlit: I've got a really old HP keyboard
[13:29:44] quimrstorres: has joined #ruby
[13:29:44] [k-_: doesn't everyone use US?
[13:30:02] malconis: has joined #ruby
[13:30:05] Rinzlit: I copy and pasted it before lol
[13:30:41] apeiros: Rinzlit: you type option-7
[13:30:56] apeiros: (bummer if that doesn't work for you???)
[13:31:04] juanpablo______: has joined #ruby
[13:31:48] dimasg: has joined #ruby
[13:31:54] pengin: has joined #ruby
[13:31:56] Rinzlit: Well on the bright side I shouldn't really need to use it that often, and if I do I can just do alt+179
[13:32:34] apeiros: ACTION wonders what that 179 stands for???
[13:32:35] armyriad: has joined #ruby
[13:32:41] apeiros: it's not the ascii code, that's for sure
[13:32:53] Zai00: has joined #ruby
[13:33:00] dblessing: has joined #ruby
[13:34:07] sonOfRa: has joined #ruby
[13:35:05] elia: has joined #ruby
[13:36:26] elia: has left #ruby: ()
[13:36:46] bazbing81: how do I match unless word contains a pattern? e.g. I want to match 't' not 'ca' http://rubular.com/r/eIfu52x3kM
[13:37:06] bazbing81: sorry, I want to match 't' not 'cat'
[13:37:34] apeiros: ((?<!ca)t)
[13:37:45] segfalt: has joined #ruby
[13:37:52] apeiros: (?!ca) says "starting from here, no 'ca' must occur'
[13:38:10] apeiros: and when the cursor is at "t" in "cat", there's indeed no "ca" starting from there.
[13:38:29] mercwithamouth: has joined #ruby
[13:38:56] niiamon: has joined #ruby
[13:39:07] eGGsha: has joined #ruby
[13:39:47] [k-_: unterminated " and '
[13:40:17] hinbody: has joined #ruby
[13:40:37] bazbing81: apeiron thanks for the explanation I got it :)
[13:40:56] apeiros: bazbing81: tab completion ftw.
[13:41:16] Vile`: has joined #ruby
[13:41:37] bazbing81: apeiros: http://i.imgur.com/bbuifZz.gif
[13:42:09] apeiros: it does that way better than I
[13:42:14] momomomomo: has joined #ruby
[13:42:15] apeiros: brb, gotta get myself a monkey
[13:42:29] bazbing81: apeiros: haha!
[13:42:42] Thr3d: has joined #ruby
[13:42:43] DJSpies: has joined #ruby
[13:42:47] JoshL: has joined #ruby
[13:43:55] mary5030_: has joined #ruby
[13:44:25] christiandsg: has joined #ruby
[13:44:32] tvw: has joined #ruby
[13:44:53] mary5030_: has joined #ruby
[13:44:58] avocadorivalry: has joined #ruby
[13:45:21] nsuke: has joined #ruby
[13:49:12] chridal: has joined #ruby
[13:50:08] bustrarm: son of a bitch, it's still doing it
[13:50:40] Zai00: has joined #ruby
[13:51:53] apeiros: their client, something with their nick
[13:53:52] Frank13760: has joined #ruby
[13:54:34] djbkd_: has joined #ruby
[13:55:01] ndrei: has joined #ruby
[13:55:09] startupality: how could I add preformatted text (with new lines) to a spreadsheet cell with ???axlsx??? ?
[13:55:43] busterarm: has joined #ruby
[13:57:05] rsc___: has joined #ruby
[13:57:52] shock_one: has joined #ruby
[13:57:53] railsraider: has joined #ruby
[13:59:14] devdazed: has joined #ruby
[13:59:45] whippythellama: has joined #ruby
[14:00:37] quimrstorres: has joined #ruby
[14:00:49] blackmesa: has joined #ruby
[14:00:58] livathinos: has joined #ruby
[14:02:50] CloCkWeRX: has joined #ruby
[14:06:21] shock_one: has joined #ruby
[14:07:12] hinbody: has joined #ruby
[14:07:55] freerobby: has joined #ruby
[14:08:12] ndrei: has joined #ruby
[14:08:31] freerobby1: has joined #ruby
[14:08:40] snophey: has joined #ruby
[14:09:57] codecop: has joined #ruby
[14:10:58] juanpablo______: has joined #ruby
[14:11:40] Zai00: has joined #ruby
[14:12:00] sonOfRa: has joined #ruby
[14:12:19] dopie: has joined #ruby
[14:14:40] Igorshp: has joined #ruby
[14:14:59] aryaching: has joined #ruby
[14:16:15] allomov: has joined #ruby
[14:16:23] jschoolcraft: has joined #ruby
[14:18:53] shock_one: has joined #ruby
[14:19:03] krz: has joined #ruby
[14:19:11] juanpablo______: has joined #ruby
[14:19:20] jschoolcraft: has joined #ruby
[14:19:22] ndrei: has joined #ruby
[14:19:34] leesharma: has joined #ruby
[14:20:10] baroquebobcat: has joined #ruby
[14:20:31] werelivi_: has joined #ruby
[14:22:32] yb_drowe: has joined #ruby
[14:23:34] chills42: has joined #ruby
[14:24:35] prefixed: has joined #ruby
[14:25:07] Igorshp: has joined #ruby
[14:25:29] Thr3d: has joined #ruby
[14:26:54] niiamon: has joined #ruby
[14:27:00] msnyon: has joined #ruby
[14:27:04] Igorshp_: has joined #ruby
[14:27:13] blue_deref: has joined #ruby
[14:27:47] wprice: has joined #ruby
[14:28:17] nzst: has joined #ruby
[14:29:04] shock_one: has joined #ruby
[14:29:50] vt102: has joined #ruby
[14:29:52] willywos: has joined #ruby
[14:30:35] beef-wellington: has joined #ruby
[14:34:49] nateberkopec: has joined #ruby
[14:34:56] DoubleMalt: has joined #ruby
[14:35:18] vt102: has joined #ruby
[14:35:22] blackmesa: has joined #ruby
[14:36:25] rickmasta: has joined #ruby
[14:37:00] prefixed: has joined #ruby
[14:37:20] Igorshp: has joined #ruby
[14:37:31] infernix: has joined #ruby
[14:37:36] njs126: has joined #ruby
[14:37:44] mrmargolis: has joined #ruby
[14:38:33] yqt: has joined #ruby
[14:39:25] tenderlove: has joined #ruby
[14:40:58] infernix: if foo can be Nil or a string and bar can be Nil or an Array, how can I get a count from both these variables without a lot of ugly if/else? e.g. possible values for foo.count and bar.count could be 0+0, 1+0, 0+5, 1+5
[14:41:24] infernix: i seem to be needing a lot of lines for this and there must be a neat and short way
[14:41:43] apeiros: a) ensure they're never nil
[14:41:51] apeiros: b) var && var.count
[14:41:52] axl__: has joined #ruby
[14:41:55] serivich: has joined #ruby
[14:42:18] jas02: has joined #ruby
[14:42:21] jhass: (var && var.count) || 0
[14:42:28] [k-_: c) there is no such thing as Nil
[14:42:36] jhass: but yeah, show your real code so we can show you how they can't become nil
[14:42:59] hfp_work: has joined #ruby
[14:43:25] hfp: has joined #ruby
[14:43:47] davejlong: has joined #ruby
[14:44:01] tjohnson: has joined #ruby
[14:44:38] apeiros: c) extract count into a method
[14:44:57] jhass: d) use .size if you don't pass an argument or block to count
[14:45:01] ljarvis: b) see a; c) see a
[14:45:11] jas02: has joined #ruby
[14:45:16] apeiros: f) ask ljarvis
[14:45:18] adaedra: d) Answer D
[14:45:19] senayar: has joined #ruby
[14:45:19] senayar: has joined #ruby
[14:45:29] apeiros: g) the result is 42
[14:45:43] ljarvis: 42 - 42 #=> 42
[14:45:45] jhass: ??? ) [k-_ in crystal there is
[14:45:45] infernix: https://bpaste.net/show/b2c239dce25c
[14:45:50] apeiros: did we lose track? :)
[14:46:21] apeiros: infernix: "Nil" is interpreted as a string
[14:46:23] cschneid_: has joined #ruby
[14:46:25] apeiros: write nil if you mean nil
[14:46:33] ljarvis: well i mean, this code shouldn't be in the view
[14:46:34] infernix: ok, s/"Nil"/nil/
[14:46:45] infernix: ACTION is new to ruby
[14:47:21] umgrosscol: has joined #ruby
[14:47:22] infernix: i need an integer which is the total of @box (if string then 1 else 0) and @disks.count (0 or any other integer)
[14:47:27] jhass: infernix: well, what we're getting is that there's probably a way to get rid of the "or is nil", you don't show where it comes from there
[14:47:47] apeiros: ACTION agrees with that ljarvis
[14:47:48] ljarvis: yeah those ivars should be set really
[14:47:56] infernix: @disks = config.disks, @box = env[:machine].box
[14:47:56] apeiros: that code does not belong into the template
[14:48:12] infernix: I have no control over config.disks or env*
[14:48:13] kies^: has joined #ruby
[14:48:18] jobewan: has joined #ruby
[14:48:37] apeiros: your view should just read "<boot order='<%= @boot_order %>'/>
[14:49:22] apeiros: you create unmaintainable and untestable templates this way
[14:49:42] jhass: well, <% if @boot_order %><boot order='<%= @boot_order %>' /><% end %> is okay too
[14:50:08] apeiros: true, the code has elsifs without else.
[14:50:33] ljarvis: also, there's duplicate code in their that's super confusing
[14:50:48] sanguisdex: has joined #ruby
[14:51:04] adaedra: did you a word
[14:51:20] bruno-: has joined #ruby
[14:51:25] infernix: i agree that it gets ugly. so I'll get that out of the template and set up vars in the code that invokes it
[14:51:26] hfp: has joined #ruby
[14:51:27] blackmesa: has joined #ruby
[14:51:58] apeiros: when you've done that, we can talk about the code ;-)
[14:52:00] hfp_work: has joined #ruby
[14:52:22] jhass: remember to show the code you end up with for doing that
[14:53:51] sanguisdex: has left #ruby: ()
[14:54:50] infernix: i think i'm going to have to throw the entire thing out and apply boot ordering in a separate class to make this work nicely and make it readable
[14:55:08] Zai00: has joined #ruby
[14:55:19] ljarvis: a separate class sounds smart
[14:55:20] apeiros: famous last words
[14:55:24] ljarvis: easy to unit test
[14:55:55] ljarvis: ACTION expects infernix back in 6 weeks tired and fed up with some new code
[14:55:55] senayar: has joined #ruby
[14:55:55] senayar: has joined #ruby
[14:56:12] ljarvis: "folk's, i re-wrote everything"
[14:56:39] infernix: ha. first dinner, then back to hacking, give me a few hours and i'll link a PR :>
[14:57:36] davejlong: has joined #ruby
[14:57:55] paulcsmith: has joined #ruby
[14:58:22] Zai00: has joined #ruby
[14:59:05] weemsledeux: has joined #ruby
[14:59:08] paulcsmith: has joined #ruby
[15:00:21] davejlong: has joined #ruby
[15:01:21] tennis_: has joined #ruby
[15:02:26] pandaant: has joined #ruby
[15:03:05] Zai00: has joined #ruby
[15:04:35] tenderlove: has joined #ruby
[15:06:37] Scripore: has joined #ruby
[15:06:51] michaeldeol: has joined #ruby
[15:07:40] bazbing81: i only want to match 'fish' and 'frog' in this regex: http://rubular.com/r/eIfu52x3kM The sections where cat is preceeded by one whitespace character don't get matched, as expected. So I change up \s to \s* to make it work and now it's invalid? http://rubular.com/r/lGyAMW6fXN
[15:08:31] bazbing81: sorry wrong links hold on
[15:08:42] jhass: bazbing81: yeah, lookarounds must be fixed width
[15:09:05] ljarvis: also this doesn't need lookarounds
[15:10:06] bazbing81: ljarvis: this is where it works with one whitespace http://rubular.com/r/mWhuIbcviE doesn't need lookarounds?
[15:10:44] startupality: has joined #ruby
[15:11:35] ljarvis: well that exact example does, but it's awfully restrictive and tells me this isn't for a real world thing
[15:12:07] tubuliferous: has joined #ruby
[15:12:30] bazbing81: trying hard not to find out where the person who invented regex lives and murdering him
[15:12:46] bazbing81: well maybe not murder. just saying "whhhhyyy"
[15:12:55] [k-_: it's your own fault that you fail at regex!
[15:13:03] ljarvis: [k-_: that's not very nice
[15:13:12] [k-_: he wanted to murder someone
[15:13:15] ljarvis: bazbing81: regexp is nice and powerful once you get past the headache
[15:13:18] juanpablo______: has joined #ruby
[15:13:27] txdv_: has joined #ruby
[15:13:34] txdv_: who do ruby blocks do not support inline rescue?
[15:13:47] malcolmva: has joined #ruby
[15:14:06] riotjones: has joined #ruby
[15:14:15] casadei_: has joined #ruby
[15:14:21] txdv_: what no ljarvis ?
[15:14:34] bazbing81: ljarvis yep...I'd be very much in love with it if I could variable length lookaheads. maybe a gem?
[15:14:34] txdv_: i want to know why not that it doesnt
[15:14:37] txdv_: i know that it doesnt
[15:14:44] juanpablo______: has joined #ruby
[15:14:46] [k-_: use begin..end blocks
[15:14:50] ljarvis: txdv_: ask matz
[15:15:00] txdv_: [k-_: they look disgusting
[15:15:14] txdv_: what too bad
[15:15:17] [k-_: languages have limits
[15:15:19] txdv_: ruby is all about looking sexy
[15:15:24] txdv_: and not like your grandmas java
[15:15:25] nzst: Hi, has a convention on adding a ! to the end of a function name ever been set? last I was reading it was side effect will be produced or an exception will be raised
[15:15:29] [k-_: haskell is more sexy than ruby
[15:15:51] [k-_: nzst: yes, it means that the method is "dangerous"
[15:15:52] txdv_: imperative asshole
[15:15:53] apeiros: nzst: as per matz: "!" denotes a method which you should be careful
[15:15:57] snockerton: has joined #ruby
[15:16:00] [k-_: haskell is not imperative
[15:16:04] [k-_: haskell is functional
[15:16:04] ljarvis: nzst: the exception raised thing is more of a rails tradition. In Ruby it's (usually) used to signify the receiver is being modified. Really though it's just "caution"
[15:16:05] txdv_: i mean functional
[15:16:06] apeiros: txdv_: language
[15:16:16] nzst: thanks all
[15:16:16] apeiros: txdv_: *watch your language
[15:16:18] [k-_: "i mean functional"
[15:16:22] ljarvis: ?ot [k-_ txdv_
[15:16:23] ruboto: [k-_, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[15:16:24] txdv_: functional git!
[15:16:28] txdv_: Is that ok?
[15:16:29] jhass: !mute txdv_
[15:16:30] ruboto: +q txdv_!*@*
[15:16:30] ruboto: -o ruboto
[15:16:37] jhass: they're only here to troll, already banned
[15:16:37] txdv_: has left #ruby: ()
[15:16:58] [k-_: "imperative"
[15:17:05] djstorm: has joined #ruby
[15:17:30] [k-_: arent blocks also introduced to be more functional
[15:17:30] halflife: has joined #ruby
[15:18:16] halflife: Hellow fellas, I have a totally unrelated question to question that was asked here before, does anybody know why ruby blocks do not have inline rescues like functions do?
[15:18:32] jhass: really, so bored?
[15:18:40] jhass: !mute halflife
[15:18:44] halflife: jhass: excuse me my language
[15:18:45] ruboto: +q halflife!*@*
[15:18:45] ruboto: -o ruboto
[15:18:59] yorickpeterse: jhass: you know they're just going to change their nick again right?
[15:19:03] marr: has joined #ruby
[15:19:04] halflife: has left #ruby: ()
[15:19:09] Ilyas: has joined #ruby
[15:19:11] jhass: yorickpeterse: yeah, they proxy though
[15:19:13] halflife2: has joined #ruby
[15:19:14] jhass: not much we can do
[15:19:18] bazbing81: yorickpeterse halflife 3 confirmed
[15:19:34] yorickpeterse: jhass: you can start by just banning the host
[15:19:42] yorickpeterse: seems to be the same
[15:19:45] halflife2: everytime someone mentions halflife 2 + 1, it gets delayed by one month
[15:19:47] halflife2: please dont make me do it
[15:19:51] apeiros: apeiros kicked halflife2:
[15:19:52] apeiros: +b *!*@78-56-9-125.static.zebra.lt
[15:19:57] Igorshp: has joined #ruby
[15:20:02] apeiros: -o apeiros
[15:20:04] jhass: yorickpeterse: this time, didn't match with txdv_
[15:20:49] jhass: chris2: ^ check your channel too and consider if you still want such people inside it
[15:20:51] halflife3: has joined #ruby
[15:21:13] riotjones: has joined #ruby
[15:21:21] [k-_: but is there a reason actually?
[15:21:50] juanpablo______: has joined #ruby
[15:21:53] halflife3: to be fair my last time i got my mute was minimal trolling
[15:22:00] halflife3: the admins had rather a bad day
[15:22:06] halflife3: i apologize non the less
[15:22:24] yorickpeterse: Interesting way of saying "fuck yo ban"
[15:22:39] [k-_: ban evasion is against the network rules
[15:22:43] werelivinginthef: has joined #ruby
[15:22:43] busterarm: He's got his hammer pants on
[15:23:32] momomomomo: has joined #ruby
[15:23:33] tmtwd: has joined #ruby
[15:23:42] rcvalle: has joined #ruby
[15:24:28] busterarm: i mean, they've got their.. :(
[15:25:16] jhass: +q $r:halflife
[15:25:31] tuelz: has joined #ruby
[15:25:39] halflife3: has left #ruby: ()
[15:26:16] halflife3: has joined #ruby
[15:26:26] halflife3: i always the type the wrong channel first
[15:26:33] tenderlove: has joined #ruby
[15:26:57] NeverDie: has joined #ruby
[15:27:19] adaedra: I suppose you won't if we ask you kindly to get out?
[15:27:21] yorickpeterse: jhass: +b *!*@cs.iti.l
[15:27:23] niiamon: has joined #ruby
[15:27:25] yorickpeterse: jhass: +b *!*@cs.iti.lt
[15:27:36] yorickpeterse: it's a games server so it doesn't really hurt
[15:27:44] adaedra: yorickpeterse: it's his 3rd host, won't change much, I guess
[15:27:44] apeiros: apeiros kicked halflife3:
[15:27:51] apeiros: +b *!*@cs.iti.lt
[15:28:04] yorickpeterse: adaedra: assuming they don't have a botnet they'll lose the game eventually
[15:28:10] apeiros: adaedra: dunno, most people have limited supply of non-dynamic ips
[15:28:16] jhass: was worth a shot whether they figure out realname bans :P
[15:28:32] shock_one: has joined #ruby
[15:28:32] startupality: has joined #ruby
[15:28:41] yorickpeterse: I wonder if there would be a way to have a bot auto ban people based on this pattern of message -> banned -> rejoin, similar message
[15:28:46] yorickpeterse: though it would be pretty hard to do right
[15:28:57] apeiros: but granted, penny-wise paymend for DO boxes and the like doesn't help with a dedicated troll :)
[15:28:58] Contigi: has joined #ruby
[15:29:13] Kully3xf_: has joined #ruby
[15:29:24] adaedra: they have so many resources
[15:29:31] apeiros: yorickpeterse: I wish irc would allow a pre-screening hook
[15:29:34] adaedra: if only they used it for good.
[15:29:42] ixti: has joined #ruby
[15:29:45] halflife3: has joined #ruby
[15:29:45] yorickpeterse: apeiros: it's called nick registration
[15:29:54] yorickpeterse: worked pretty well in #ruby-lang for a while :P
[15:29:55] apeiros: yorickpeterse: not doing even half of what I'd want
[15:30:03] apeiros: and we discussed nick-reg.
[15:30:07] jhass: bazbing81: so, might indeed be easier to just .reject lines that .include?("cat") :/
[15:30:09] [k-_: +bb halflife*!*@* *!*@cs.iti.lt
[15:30:09] shevy: pre-screening hook ... pre-crime... ah this science fiction movie!
[15:30:11] yorickpeterse: I think that's the one thing I like about Gitter: it's tied into your Github account
[15:30:23] yorickpeterse: everything else is just meh
[15:30:29] apeiros: yorickpeterse: https://github.com/apeiros/ruby-community/issues/19
[15:30:29] adaedra: At least it has one thing :p
[15:30:34] juanpablo_______: has joined #ruby
[15:30:34] jhass: jeez, ircloud is still on/off?
[15:30:41] halflife3: *.iti.lt would help more
[15:31:00] icebourg: has joined #ruby
[15:31:13] halflife3: if you are ok with banning an entire ISP provider of a country
[15:31:21] tejasmanohar_: has joined #ruby
[15:31:29] nini1294: has joined #ruby
[15:32:11] ryanpc: has joined #ruby
[15:32:26] juanpablo_: has joined #ruby
[15:32:43] adaedra: halflife3: nice try
[15:33:17] apeiros: apeiros kicked halflife3: next time
[15:33:18] j4cknewt: has joined #ruby
[15:33:18] apeiros: +b *!*@*.iti.lt
[15:33:38] [k-_: what is even lt
[15:33:41] shevy: an epic struggle
[15:33:48] apeiros: -b *!*@cs.iti.lt
[15:33:59] adaedra: or whatever it is written, sorry for lt people if any
[15:34:03] DukeDave: has joined #ruby
[15:34:04] jhass: -b+b *!*@*.iti.lt *!*@*.iti.lt$#ruby-banned
[15:34:04] yorickpeterse: queue them joining with some shady hostname
[15:34:59] [k-_: why not just remove the iti and go with *.lt
[15:35:19] adaedra: Ban an entire country?
[15:35:31] [k-_: ??\_(???)_/??
[15:35:34] adaedra: Hell yeah, why not just ban * ?
[15:35:41] toksjauvyras: has joined #ruby
[15:35:47] [k-_: that would be the most efficient!
[15:36:00] adaedra: Let's shutdown all of freenode then, even more efficient!
[15:36:01] [k-_: +b halflife*!*@* would be nice
[15:36:13] brianpWins_: has joined #ruby
[15:36:26] yorickpeterse: They'd just change the nick
[15:36:28] casadei_: has joined #ruby
[15:36:55] spider-mario: has joined #ruby
[15:37:11] [k-_: in case he gets out of lithuania
[15:37:13] mroth: has joined #ruby
[15:37:42] adaedra: ??? txdv_ (~gracious@static-89-1-30-211.netcologne.de) has left #ruby
[15:37:52] nini1294: has joined #ruby
[15:38:03] toksjauvyras: not koeln too come on guys
[15:38:12] ivanskie: has joined #ruby
[15:38:17] adaedra: it's all up to you
[15:38:22] baroquebobcat: has joined #ruby
[15:38:26] [k-_: it's your fault this is happening
[15:38:29] apeiros: /mode #ruby +b *!*@*.de
[15:38:29] jhass: +bb +b!*@* *!*@static-89-1-30-211.netcologne.de
[15:38:50] Cache_Money: has joined #ruby
[15:38:55] toksjauvyras: has left #ruby: (requested by jhass (toksjauvyras))
[15:38:56] yorickpeterse: or just set +q for the next hour or so
[15:39:01] adaedra: goodbye jhass
[15:39:24] adaedra: apeiros: you can't do it only for not registered?
[15:39:26] jinx123: has joined #ruby
[15:39:29] jhass: -b +b!*@*
[15:39:30] yorickpeterse: apeiros: regarding the issue, good points on both sides
[15:39:44] niiamon: has joined #ruby
[15:39:48] havenwood: has joined #ruby
[15:39:48] apeiros: adaedra: I'd need my cheatsheet first
[15:39:52] yorickpeterse: The typical spam with links and such isn't too hard to detect and autoban
[15:39:58] adaedra: fair enough
[15:39:59] yorickpeterse: e.g. pretty sure you could train spamassassin for it
[15:40:10] apeiros: adaedra: read: the one I haven't written yet :o)
[15:40:13] tenderlove: has joined #ruby
[15:40:14] yorickpeterse: The type of spam above is harder :/
[15:40:32] pglombardo: has joined #ruby
[15:40:45] ckrailo: has joined #ruby
[15:40:49] adaedra: there's still the old manual way, even if annoying :/
[15:40:58] adaedra: we have enough ops for that now no?
[15:41:29] jhass: I think they gave up
[15:41:44] shock_one: has joined #ruby
[15:41:58] Kully3xf: has joined #ruby
[15:42:27] akahn: has joined #ruby
[15:43:02] [k-_: /mode #channel +q $~a can be used to prevent unregistered users from speaking in channel while allowing them to join.
[15:43:03] centrx: has joined #ruby
[15:43:25] chipotle: has joined #ruby
[15:43:46] jhass: -qqqq $r:halflife txdv_!*@* halflife!*@* *!*@tgn.188.23.73.dts.mg
[15:43:48] jhass: -qqqq *!*@*177.52.25.228 *!~baryad@*.business.telecomitalia.it aperosguba!*@* JERKOPS!*@*
[15:43:50] jhass: -qq newish!*@* Bed-lam!*@*
[15:43:55] niiamon_: has joined #ruby
[15:43:57] adaedra: [k-_: you read what is send to the channel or you have wo mode?
[15:44:45] [k-_: wo mode?
[15:44:48] towski_: has joined #ruby
[15:44:51] adaedra: write-only
[15:45:23] ljarvis: [k-_ is always on write-only
[15:45:28] [k-_: i read but not necessarily process
[15:45:39] [k-_: ljarvis: lies! i learn stuff!
[15:46:08] qhartman: has joined #ruby
[15:46:11] jhass: -bbbb *!~devoldmx@*$#ruby-fix-your-connection *!*@122.155.138.106 iamjarvo!*@*$#ruby-fix-your-connection d[^_^]b!*@*$#ruby-fix-your-connection
[15:46:13] jhass: -bbb lnr!*@*$#ruby-fix-your-connection matcouto!*@*$#ruby-fix-your-connection *!*@190.197.66.2
[15:47:50] [k-_: i cant view the banlist, that means he cant too!
[15:47:57] nish1294: has joined #ruby
[15:49:05] pingpong11: has joined #ruby
[15:49:28] flooberdoo: has joined #ruby
[15:49:29] [k-_: oh /banlist works but not /mode #ruby +b 23:47:31 You're not a channel operator in #ruby
[15:49:49] adaedra: works for me: /mode +b
[15:50:11] [k-_: probably my client
[15:50:26] _blizzy_: has joined #ruby
[15:50:54] yorickpeterse: heh, the /mode works for me
[15:50:57] yorickpeterse: get on my level
[15:51:16] adaedra: sea level?
[15:51:28] jhass: most of dutch is below, no?
[15:51:53] [k-_: buuuuuuurn
[15:52:01] mxrguspxrt: has joined #ruby
[15:52:14] gcfhvjbkn: has joined #ruby
[15:52:24] bruno-: has joined #ruby
[15:52:57] ndrei: has joined #ruby
[15:53:43] gcfhvjbkn: hello i'm new to ruby
[15:53:44] gcfhvjbkn: http://pastie.org/private/scczwk0g15wxgzde5nxona
[15:53:47] gcfhvjbkn: i'm doing this
[15:54:01] gcfhvjbkn: why does this happen?
[15:54:10] banister: has joined #ruby
[15:54:18] shock_one: has joined #ruby
[15:54:33] tenderlove: has joined #ruby
[15:54:35] dfockler: has joined #ruby
[15:54:44] _seanc_: has joined #ruby
[15:54:45] adaedra: why would you even use a 1.9.3
[15:54:46] gcfhvjbkn: http://pastie.org/private/twbgx8uy5bzsjh8qozvspw
[15:54:48] gcfhvjbkn: this is gem env
[15:55:03] jhass: because you work as root
[15:55:06] gcfhvjbkn: adaedra: which version should i use?
[15:55:09] gcfhvjbkn: i do use rvm
[15:55:17] TheHodge: has joined #ruby
[15:55:20] adaedra: 2.2.2 is the latest
[15:55:26] adaedra: and yes, don't work as root
[15:55:51] blue_deref: has joined #ruby
[15:56:11] gcfhvjbkn: the error is not immediately caused by being root, is it?
[15:56:15] startupality: has joined #ruby
[15:56:39] jhass: it causes so many issues, it might as well
[15:56:41] hpoydar: has joined #ruby
[15:56:50] jhass: https://rvm.io/support/troubleshooting second to last entry, then reinstall as normal user
[15:57:35] ellisTAA: has joined #ruby
[15:57:56] Igorshp: has joined #ruby
[15:59:09] mdavid613: has joined #ruby
[15:59:26] shock_one: has joined #ruby
[15:59:31] htmldrum: has joined #ruby
[16:00:16] amclain: has joined #ruby
[16:01:13] shock_one: has joined #ruby
[16:02:59] shock_one: has joined #ruby
[16:03:34] pingpong11: how do i restart a rails application (1.8.25) on ruby (1.8.7)
[16:03:42] pingpong11: using passenger 4.0 on apache2
[16:03:51] nini1294: has joined #ruby
[16:03:55] jhass: install Ruby 2.2.2 and then ask #passenger
[16:03:56] pingpong11: it's in production, and i restarted apache but it didnt seem to pick up the change
[16:04:06] apeiros: rails 1.8.25? which grave did you dig up?
[16:04:11] apeiros: does that even exist?
[16:04:12] pingpong11: urgh, let's not go into it
[16:04:26] pingpong11: i think is the rails version, i think the gem version is 1.8.25
[16:04:28] spider-mario: has joined #ruby
[16:04:33] pingpong11: i cant remember, wait there
[16:04:54] startupality: has joined #ruby
[16:04:56] mleung: has joined #ruby
[16:04:56] jhass: I know it must look like fancy space suits to you, but yes, that are our clothes today
[16:05:00] apeiros: I think somewhere after rails 1.2 rails 2.x branch started???
[16:05:27] pingpong11: either way, when rails is in production how do i get it to pick up changes to the files?
[16:05:38] pingpong11: should restarting apache make it pick up the changes?
[16:05:40] apeiros: yeah, 1.2.6 was the last of the 1.x branch
[16:05:41] paulcsmith: has joined #ruby
[16:05:59] pingpong11: yeah it's rails 2.3.8
[16:06:04] pingpong11: sorry, ruby 1.8.7
[16:06:07] apeiros: touch tmp/restart.txt
[16:06:12] apeiros: in the rails root
[16:06:12] centrx: you better be sorry
[16:06:16] pingpong11: i tried that, maybe it didnt fix my thingy
[16:06:23] apeiros: ?rails pingpong11
[16:06:24] ruboto: pingpong11, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[16:06:49] momomomomo: has joined #ruby
[16:06:51] adaedra: /msg NickServ HELP
[16:06:54] apeiros: ohnoes! so better ask in the wrong channel then!
[16:06:56] pingpong11: i wasnt sure if this was passenger/ruby/rails or how to ask
[16:07:10] imperator: has joined #ruby
[16:07:13] apeiros: that's a better rationale :-p
[16:07:15] pingpong11: not really, i mean, it could have been a ruby command or a passenger command, so i asked in the room with teh broadest scope
[16:07:22] adaedra: centrx ?? you better be sorry - I laughed
[16:07:29] pingpong11: wrong window
[16:07:32] adaedra: irc: ls: command not found
[16:07:36] jpinnix______: has joined #ruby
[16:07:39] centrx: adaedra, at least I got one ruby
[16:07:39] imperator: there an equivalent of Benchmark.measure{ } but for memory/cpu ?
[16:07:44] apeiros: pingpong11: anyway, now you know
[16:07:57] apeiros: imperator: measure measures CPU?
[16:08:06] yorickpeterse: imperator: I've never found one that measures memory usage
[16:08:13] apeiros: for memory I still resort to ps, though I think with require 'objspace' you can do more now
[16:08:37] imperator: hrm, ok, guess i'll use sys-proctable then
[16:08:44] [k-_: apeiros is on guard!
[16:08:46] apeiros: ah, right, you're on win
[16:08:57] yorickpeterse: imperator: https://github.com/YorickPeterse/oga/blob/master/profile/profile_helper.rb what I use
[16:08:59] imperator: apeiros, how would you use objspace? curious about that
[16:09:12] apeiros: imperator: it's gotten new methods to track allocation and size of objects
[16:09:14] [Butch]: has joined #ruby
[16:09:23] apeiros: mostly 2.1 and 2.2
[16:09:37] apeiros: stuff like trace_object_allocations
[16:09:45] rsc___: has joined #ruby
[16:09:55] yorickpeterse: IIRC that requires disabling the GC to get accurate numbers out
[16:10:01] yorickpeterse: at least I recall reading stuff on that
[16:10:05] bricker: has joined #ruby
[16:10:09] imperator: yorickpeterse, you're just parsing out /proc ;)
[16:10:11] glowcoil: has joined #ruby
[16:10:20] imperator: which is what sys-proctable does, on linux anyway
[16:10:28] imperator: doesn't work so well elsewhere ;)
[16:10:29] knowtheory: has joined #ruby
[16:10:34] yorickpeterse: Yeah I looked into that Gem but figured this would save me having to work about other Gems
[16:10:34] Scripore: has joined #ruby
[16:10:40] apeiros: -o apeiros
[16:10:41] yorickpeterse: Plus I don't care about OS X/Windows for my profiling needs
[16:10:45] yorickpeterse: since I use Lunix
[16:10:47] PhilK: has joined #ruby
[16:11:11] cbetta: has joined #ruby
[16:11:32] imperator: apeiros, we need a nice wrapper then. Something like Memory.measure{ }
[16:11:45] imperator: ACTION looks at objspace
[16:11:54] apeiros: imperator: hope that somebody already wrote it and scour ruby-toolbox.com - make sure you tell me if you found one :)
[16:12:00] apeiros: imperator: also tell me if you wrote one ;-)
[16:12:01] leslie: has joined #ruby
[16:12:02] leslie: has joined #ruby
[16:12:04] imperator: for the moment, just want to compare rexml vs nokogiri
[16:12:12] apeiros: imperator: not oga?
[16:12:16] apeiros: yorick will be sad
[16:12:17] rbowlby: has joined #ruby
[16:12:19] imperator: not up to me
[16:12:59] armyriad: has joined #ruby
[16:13:09] apeiros: oh wow, I wonder what perf penalty trace_object_allocations incurs
[16:13:16] apeiros: but the functionality for debugging is awesome
[16:13:22] drewo: has joined #ruby
[16:13:30] apeiros: "where did that object come from?" -> turn on the tracer!
[16:14:44] imperator: never looked at objspace before, lots of goodies here
[16:14:48] banister: has joined #ruby
[16:14:58] txdv: has joined #ruby
[16:15:21] startupality: has joined #ruby
[16:15:25] Muhannad: has joined #ruby
[16:16:12] jlyndon: has joined #ruby
[16:16:17] apeiros: imperator: looked over it myself now too. I think it's not granular and/or precise enough, though :-/
[16:16:24] baweaver: has joined #ruby
[16:17:06] curses: has joined #ruby
[16:17:08] Silox|: has joined #ruby
[16:17:12] aaeron: has joined #ruby
[16:17:26] amitchellbullard: has joined #ruby
[16:17:34] paulcsmith: has joined #ruby
[16:17:36] culturelabs: has joined #ruby
[16:17:42] Tamal: has joined #ruby
[16:17:43] towski_: has joined #ruby
[16:17:57] HashNuke: has joined #ruby
[16:19:19] ivanskie: has joined #ruby
[16:19:52] imperator: apeiros, this may interest you: https://github.com/srawlins/allocation_stats
[16:20:04] rippa: has joined #ruby
[16:20:20] joonty: has joined #ruby
[16:20:33] zrl: has joined #ruby
[16:20:52] imperator: lol, forgot i can't get mem info on osx with sys-proctable
[16:21:17] Igorshp: has joined #ruby
[16:21:21] apeiros: imperator: that does look interesting
[16:21:37] startupality: has joined #ruby
[16:22:16] frode15243: has joined #ruby
[16:22:31] johnMcLain: has joined #ruby
[16:22:47] petems: has joined #ruby
[16:22:52] spastorino: has joined #ruby
[16:23:01] dmoe: has joined #ruby
[16:23:30] ggherdov: has joined #ruby
[16:23:50] mxrguspxrt: has joined #ruby
[16:24:04] startupality: has joined #ruby
[16:25:06] Scripore: has joined #ruby
[16:25:37] jevs: has joined #ruby
[16:25:53] umo20: has joined #ruby
[16:26:02] mjc_: has joined #ruby
[16:26:08] Frank13760: has joined #ruby
[16:26:12] Siyfion: has joined #ruby
[16:26:16] momomomomo: has joined #ruby
[16:26:32] leesharma: has joined #ruby
[16:26:48] holsee_: has joined #ruby
[16:27:08] mxrguspx_: has joined #ruby
[16:27:16] frankS2: has joined #ruby
[16:27:57] tenderlove: has joined #ruby
[16:28:10] ramblinpeck: has joined #ruby
[16:28:21] Hanmac: has joined #ruby
[16:28:34] nickfausnight: has joined #ruby
[16:28:49] thesheff17: has joined #ruby
[16:28:53] benlieb: has joined #ruby
[16:28:57] Scripore: has joined #ruby
[16:29:25] rsc___: has joined #ruby
[16:30:24] troter___: has joined #ruby
[16:31:02] tjohnson: has joined #ruby
[16:31:45] mdavid613: has joined #ruby
[16:32:15] jmcc: has joined #ruby
[16:32:24] fenjamin: has joined #ruby
[16:32:26] tejasmanohar_: has joined #ruby
[16:32:42] AdamMeghji: has joined #ruby
[16:32:47] daxroc: has joined #ruby
[16:33:11] sbhatore: has joined #ruby
[16:33:15] pdoherty: has joined #ruby
[16:34:03] aaeron: has joined #ruby
[16:34:06] araujo: has joined #ruby
[16:34:43] bayed: has joined #ruby
[16:35:30] araujo: has joined #ruby
[16:35:38] SCHAAP137: has joined #ruby
[16:36:22] sdothum: has joined #ruby
[16:36:31] ponga: has joined #ruby
[16:36:35] pietr0: has joined #ruby
[16:36:37] weemsledeux: has joined #ruby
[16:36:37] MatthewsFace: has joined #ruby
[16:36:50] niiamon: has joined #ruby
[16:37:41] Kharma: has joined #ruby
[16:37:49] gizmore: has joined #ruby
[16:38:48] cyrus_mc: has joined #ruby
[16:38:49] chinmay_dd: has joined #ruby
[16:39:22] cyrus_mc: https://gist.github.com/cyrus-mc/fe9e75bce27be09ebf96 - when using a variable assignment in a conditional, what is it evaluating on?
[16:40:04] curses: has joined #ruby
[16:40:37] adaedra: >> a = "hello"
[16:40:38] ruboto: adaedra # => "hello" (https://eval.in/409073)
[16:40:47] zipkid: has joined #ruby
[16:41:06] niiamon_: has joined #ruby
[16:41:10] mwksl: has joined #ruby
[16:41:10] adaedra: assignations are valid expressions, that evaluates to the values being assigned
[16:41:24] tenderlove: has joined #ruby
[16:41:28] fantazo: has joined #ruby
[16:42:46] cyrus_mc: adaedra: so in the case above, the variable ends up as string "false", not boolean false.
[16:43:07] havenwood: cyrus_mc: Note that unlike `&&`, `and` has a lower precedence than `=`.
[16:43:11] havenwood: cyrus_mc: http://ruby-doc.org/core/doc/syntax/precedence_rdoc.html
[16:43:33] niiamon: has joined #ruby
[16:43:42] adaedra: it gets the result of whatever the result of the expression at right of assignation is
[16:43:54] adaedra: er, value, not result, for the first one
[16:43:55] bestie: has joined #ruby
[16:43:56] rakm: has joined #ruby
[16:44:06] prefixed: has joined #ruby
[16:44:09] christiandsg: has joined #ruby
[16:44:14] neektza: has joined #ruby
[16:44:22] mwksl: I'm trying to figure out a way to emulate running something to the effect of "curl -F "file=@file.txt" https://url.com" (submit form via curl) are there any gems or methods you folks would recommend?
[16:44:35] towski_: has joined #ruby
[16:44:41] havenwood: >> a = 1 and 2 ;a
[16:44:42] ruboto: havenwood # => 1 (https://eval.in/409075)
[16:44:43] havenwood: >> a = 1 && 2 ;a
[16:44:43] cyrus_mc: adaedra: I think I get that .. so the value is string "false" wouldn't that be like doing if "false" ..
[16:44:43] ruboto: havenwood # => 2 (https://eval.in/409076)
[16:44:56] havenwood: cyrus_mc: ^
[16:45:06] ruboto: momomomomo # => 0 (https://eval.in/409077)
[16:45:18] havenwood: cyrus_mc: and the String "false" is always truthy.
[16:45:27] momomomomo: >> 0101 & 1010
[16:45:28] ruboto: momomomomo # => 64 (https://eval.in/409078)
[16:45:30] cyrus_mc: havenwood: thanks
[16:45:32] adaedra: mwksl: one of the many HTTP libs, like Net::HTTP (rubycore), curb, and many other I'll let my channel buddies enumerate
[16:46:07] blackmesa: has joined #ruby
[16:46:27] rflot: has joined #ruby
[16:46:30] mwksl: I was looking in to curb, are there any benefits of using a "libcurl implementation" over Net:HTTP?
[16:46:38] havenwood: mwksl: An option that would be extremely Curl-like (since it's Libcurl bindings) is Curb: https://github.com/taf2/curb#readme
[16:47:06] adaedra: mwksl: to be curl-like.
[16:47:09] jxf: has joined #ruby
[16:47:09] towski_: has joined #ruby
[16:47:19] alekst_: has joined #ruby
[16:47:19] havenwood: mwksl: Libcurl is quite fast.
[16:47:29] dmolina: has joined #ruby
[16:47:31] adaedra: also, I heard Net::HTTP is not the easiest option.
[16:47:34] mwksl: :) I'll accept that answer. Thank you! I'll see what I can muster up.
[16:47:44] momomomomo: uh the main reason is that it's also thread safe
[16:47:57] A124: has joined #ruby
[16:48:31] havenwood: mwksl: There are wrappers around Net::HTTP like RestClient, HTTParty, etc. Or pure Ruby options like HTTPClient and Excon. There are a bunch of good HTTP clients in Ruby.
[16:48:47] adaedra: thanks, channel buddy
[16:49:16] momomomomo: or use Faraday, and switch out for whatever implementation you want
[16:49:43] havenwood: mwksl: Faraday supports multiple backends. Typhoeus is another libcurl wrapper that focuses on parallel requests.
[16:50:19] pauly_oc: has joined #ruby
[16:50:56] havenwood: mwksl: And the final one I'll mention (though there are plenty more that are worth mentioning) is HTTP.rb, which has nice interface in particular.
[16:51:14] unshadow: has joined #ruby
[16:51:33] havenwood: mwksl: https://github.com/httprb/http#readme
[16:52:27] deol: has joined #ruby
[16:52:32] mrsolow: has joined #ruby
[16:53:29] adaedra: I wonder if someone already made one of these flowcharts to choose a Ruby HTTP library
[16:54:13] DexterLB: has joined #ruby
[16:54:20] j4cknewt_: has joined #ruby
[16:54:26] imperator: choose wisely
[16:54:27] havenwood: adaedra: that'd be good - there're spreadsheets to use to make one
[16:54:30] mwksl: curb seems like the easiest option. I have one (admittedly stupid) question: In their example they use "c.http_post(Curl::PostField.file('thing[file]', 'myfile.rb'))" What is the 'thing[file]' referring to? I would assume that would be the name of the form field?
[16:54:32] imperator: preferably one that doesn't use timeout
[16:54:41] Sapna: has joined #ruby
[16:55:19] Papierkorb: has joined #ruby
[16:55:22] ttilley: has joined #ruby
[16:55:24] momomomomo: so for @thing
[16:55:30] bttf: has joined #ruby
[16:55:34] momomomomo: the :file would be in thing[file] as its name on the page
[16:55:58] adaedra: time to go~
[16:55:58] serivich: has joined #ruby
[16:56:35] mwksl: Ahh, so to emulate curl -F "file=@file.txt" I could just do c.http_post(Curl::PostField.file('file', 'myfile.rb'))?
[16:56:51] mwksl: Assuming it takes care of the proper formatting?
[16:57:50] momomomomo: I don't know that gem
[16:58:35] k3asd`: has joined #ruby
[16:59:09] dudedudeman: curl baby, burl
[16:59:57] towski_: has joined #ruby
[17:00:09] ss_much: has joined #ruby
[17:00:14] michaeldeol: has joined #ruby
[17:00:16] tubuliferous: has joined #ruby
[17:00:26] g0rx_: has joined #ruby
[17:00:28] mwksl: Unfortunately the documentation seems a little poor. Or, rather, I think it assumes a lot of background knowledge that I liack.
[17:00:44] Notte: has joined #ruby
[17:01:03] cbednarski: has joined #ruby
[17:01:08] niiamon: has joined #ruby
[17:01:10] niiamon_: has joined #ruby
[17:01:37] ttilley: has joined #ruby
[17:01:47] ttilley: has joined #ruby
[17:01:57] shadoi: has joined #ruby
[17:02:42] mikecmpbll: has joined #ruby
[17:03:11] zemmihates: has joined #ruby
[17:03:16] michael_mbp: has joined #ruby
[17:03:17] kidoz: has joined #ruby
[17:03:25] gcfhvjbkn: has joined #ruby
[17:03:54] gcfhvjbkn: has joined #ruby
[17:04:25] michael_mbp: has joined #ruby
[17:05:56] niiamon: has joined #ruby
[17:06:08] heidar: has joined #ruby
[17:06:09] banister: has joined #ruby
[17:06:40] TeresaP: has joined #ruby
[17:06:42] nzst: has joined #ruby
[17:07:21] TeresaP: I'm having trouble trying to use the json gem. According to documentation, when I do JSON.parse(string version of json), I should get a hash, but I get an array instead.
[17:07:35] TeresaP: Anyone know what the cause of that might be?
[17:07:35] quimrstorres: has joined #ruby
[17:07:45] imperator: looks like it's back: https://github.com/ruby/rubyspec
[17:08:04] imperator: TeresaP, can you pastie an example?
[17:08:47] Channel6: has joined #ruby
[17:08:49] imperator: TeresaP, my guess is that it's a one-element array that has the hash you want
[17:09:57] TeresaP: imperator http://pastie.org/10320506
[17:10:03] TeresaP: That's the simple code
[17:10:10] TeresaP: It's an array with 47 elements
[17:10:36] TeresaP: Each of which are hashes
[17:10:41] busterarm: personally I like the rest-client gem
[17:10:45] niiamon: has joined #ruby
[17:11:00] quimrstorres: has joined #ruby
[17:11:01] TeresaP: Do I really have to loop through each item if I want to find something?
[17:11:03] imperator: busterarm, we use it, but the number of issues and open pr's concerns me
[17:11:08] EminenceHC: has joined #ruby
[17:11:14] tuelz: has joined #ruby
[17:11:36] imfilp: has joined #ruby
[17:11:48] Guest78802: has joined #ruby
[17:11:55] busterarm: imperator: interesting. there's also mechanize
[17:12:08] mwksl: Just an update
[17:12:16] mwksl: I ended up using the 'rest_client' gem
[17:12:19] imperator: busterarm, well, that's got a different goal
[17:12:28] mwksl: and did this "c = RestClient.post('https://url' :file => File.new('test.txt', "rb"))"
[17:12:51] imperator: i think Faraday is another popular one
[17:13:02] TeresaP: The JSON has a bunch of elements/(names?) called "entityType" and I want to find all entityTypes that match the value "foo"
[17:13:15] bricker: I'm going to ask this just to start a discussion as I benchmark in parallel: I'm using a "group by" query (mysql) to return unique records based on a specific column... Has anybody found that doing this is faster/slower than just .uniq(), over average 400 objects?
[17:13:19] lxsameer: has joined #ruby
[17:13:19] lxsameer: has joined #ruby
[17:13:24] dfockler: TeresaP: if you start with a json array, you end up with a ruby array
[17:13:33] TeresaP: thanks dfockler
[17:13:39] TeresaP: I suppose that makes sense
[17:14:01] davejlong: has joined #ruby
[17:14:02] phutchins1: has joined #ruby
[17:14:12] busterarm: httparty seems to be the only one with active development. rest-client is close though
[17:14:29] imperator: if memory serves, httparty was using timeout
[17:14:35] niiamon__: has joined #ruby
[17:14:36] imperator: which is ick
[17:14:57] dfockler: TeresaP: you can use Enumerable#select on the array to get the hashes you want
[17:15:09] bronson: has joined #ruby
[17:16:03] TeresaP: Thanks dfockler :)
[17:16:03] bricker: busterarm: httparty was proven to be very slow though
[17:16:15] bricker: busterarm: unless you use the persistent variation which keeps the connection open
[17:16:40] busterarm: ahh, that's undesirable
[17:16:48] busterarm: again, i usually use rest-client :)
[17:17:32] RobertBirnie: has joined #ruby
[17:18:12] bricker: busterarm: source of that claim btw: https://bibwild.wordpress.com/2012/04/30/ruby-http-performance-shootout-redux/
[17:18:18] bricker: httparty loses by a longshot
[17:18:23] bricker: well except curl but... it's curl
[17:18:47] busterarm: if he wants to use curl, there are wrappers for libcurl
[17:18:55] busterarm: Curb I think
[17:18:59] niiamon: has joined #ruby
[17:19:09] tkuchiki: has joined #ruby
[17:19:11] busterarm: err, dangit, pronouns again >_<
[17:20:01] havenwood: compare with excon's bench: https://github.com/httprb/http#another-ruby-http-library-why-should-i-care
[17:20:21] Jackneill: has joined #ruby
[17:20:56] havenwood: <3 HTTPClient
[17:21:02] failshell: has joined #ruby
[17:21:03] bricker: havenwood: interesting
[17:21:48] rakm: has joined #ruby
[17:22:19] sepp2k: has joined #ruby
[17:23:41] hahuang65: has joined #ruby
[17:24:04] baweaver: has joined #ruby
[17:24:10] CustosLimen: has joined #ruby
[17:24:12] FernandoBasso: has joined #ruby
[17:24:17] eGGsha: has joined #ruby
[17:24:57] stef204: has joined #ruby
[17:27:23] preyalone: has joined #ruby
[17:27:28] sarlalian: has joined #ruby
[17:28:23] niiamon: has joined #ruby
[17:29:12] fenjamin: has joined #ruby
[17:30:54] jackjackdripper: has joined #ruby
[17:31:08] Trynemjoel: has joined #ruby
[17:31:20] niiamon_: has joined #ruby
[17:31:31] carlosoliveira: has joined #ruby
[17:32:45] jackjackdripper: has joined #ruby
[17:33:05] chills42: has joined #ruby
[17:33:31] j4cknewt: has joined #ruby
[17:33:35] thisirs: has joined #ruby
[17:34:28] diegoviola: has joined #ruby
[17:34:31] Scripore: has joined #ruby
[17:34:47] CorySimmons: has joined #ruby
[17:35:06] allomov: has joined #ruby
[17:35:09] Kully3xf: has joined #ruby
[17:37:02] platzhirsch: has left #ruby: ()
[17:37:03] niiamon: has joined #ruby
[17:37:05] j4cknewt_: has joined #ruby
[17:37:32] theery: has joined #ruby
[17:37:54] lannonbr: has joined #ruby
[17:39:49] tenderlove: has joined #ruby
[17:40:19] kirun: has joined #ruby
[17:40:42] j4cknewt: has joined #ruby
[17:40:46] rickmasta: has joined #ruby
[17:40:50] jgt: has joined #ruby
[17:42:39] Trynemjoel: has joined #ruby
[17:44:43] Afterburned6387: has joined #ruby
[17:44:59] christiandsg: has joined #ruby
[17:45:06] j4cknewt: has joined #ruby
[17:46:06] lannonbr: has joined #ruby
[17:46:10] woodruffw: has joined #ruby
[17:46:10] twohlix: has joined #ruby
[17:47:15] blaines: has joined #ruby
[17:48:24] prestorium: has joined #ruby
[17:48:41] bruno-: has joined #ruby
[17:48:41] chinmay_dd: has joined #ruby
[17:48:56] jhass: havenwood: mmh, I'd like to see memory usage in that table
[17:49:16] jhass: ideally with 10, 100, 1000 parallel connections
[17:50:44] rbowlby: has joined #ruby
[17:51:01] Eiam_: has joined #ruby
[17:51:20] Sapna: has joined #ruby
[17:51:39] grios: has joined #ruby
[17:52:29] towski_: has joined #ruby
[17:53:15] djbkd: has joined #ruby
[17:54:16] cnngimenez: has joined #ruby
[17:56:07] bootstrappm: has joined #ruby
[17:56:10] dmolina: has joined #ruby
[17:56:54] tenderlove: has joined #ruby
[17:57:09] phutchins1: has joined #ruby
[17:57:30] shock_one: has joined #ruby
[17:57:42] shinnya: has joined #ruby
[17:58:40] aaeron: has joined #ruby
[17:59:07] iateadonut: has left #ruby: ()
[17:59:18] djbkd: has joined #ruby
[17:59:38] paulcsmith: has joined #ruby
[17:59:41] EminenceHC: has joined #ruby
[17:59:58] lannonbr: has joined #ruby
[18:00:15] failshell: has joined #ruby
[18:00:41] phutchins2: has joined #ruby
[18:00:43] eGGsha: has joined #ruby
[18:01:50] {756d6f}: has joined #ruby
[18:02:03] polpak: has joined #ruby
[18:02:06] shock_one: has joined #ruby
[18:03:30] Rollabunna: has joined #ruby
[18:05:36] centrx: has joined #ruby
[18:06:36] yb_drowe: has joined #ruby
[18:07:26] arup_r: has joined #ruby
[18:07:54] mtakkman: has joined #ruby
[18:08:14] tenderlove: has joined #ruby
[18:08:20] RegulationD: has joined #ruby
[18:08:50] leafybasil: has joined #ruby
[18:11:15] omegamike: has joined #ruby
[18:11:38] atomi: has joined #ruby
[18:13:15] paulcsmith: has joined #ruby
[18:13:22] niiamon_: has joined #ruby
[18:14:42] weemsledeux: has joined #ruby
[18:16:10] niiamon: has joined #ruby
[18:16:28] rideh: has joined #ruby
[18:17:37] Musashi007: has joined #ruby
[18:18:25] bodgix: has joined #ruby
[18:18:55] rickmasta: has joined #ruby
[18:19:09] tenderlove: has joined #ruby
[18:19:22] rdark: has joined #ruby
[18:20:00] Sapna: has joined #ruby
[18:20:36] tejasmanohar_: has joined #ruby
[18:22:04] Blaguvest: has joined #ruby
[18:22:40] guyvdb: has joined #ruby
[18:23:07] niiamon: has joined #ruby
[18:24:54] blue_deref: has joined #ruby
[18:25:03] jenrzzz: has joined #ruby
[18:26:17] shevy: I want ruby 3.0
[18:26:23] bootstrappm: whats coming in 3.0?
[18:27:06] avitzurel: has joined #ruby
[18:27:30] shevy: nobody knows yet
[18:27:36] shevy: but everyone hopes for the best
[18:27:58] firoxer: Sounds a bit like politics
[18:28:31] bootstrappm: i'm quitting my job in a month or so, maybe I can contribute! :D
[18:28:40] shevy: you will contribute to politics?
[18:29:03] bootstrappm: hopefully more code then politics but i'm alright at politics
[18:29:28] niiamon: has joined #ruby
[18:29:37] choppington: has joined #ruby
[18:29:47] michaeldeol: has joined #ruby
[18:30:21] hinbody_: has joined #ruby
[18:30:32] roger_rabbit: has joined #ruby
[18:30:51] jenrzzz_: has joined #ruby
[18:30:53] atmosx_: has joined #ruby
[18:31:16] kstuart: has joined #ruby
[18:31:16] curses_: has joined #ruby
[18:31:23] wprice_: has joined #ruby
[18:31:38] tenderlove: has joined #ruby
[18:32:15] watnall56_: has joined #ruby
[18:32:17] bryancp_: has joined #ruby
[18:32:21] pizzaops_: has joined #ruby
[18:32:31] niiamon_: has joined #ruby
[18:32:35] hoey__: has joined #ruby
[18:32:46] tuelz1: has joined #ruby
[18:33:08] benlakey_: has joined #ruby
[18:33:20] tkuchiki: has joined #ruby
[18:33:26] shelling___: has joined #ruby
[18:33:37] lancetw_: has joined #ruby
[18:33:39] chrisseaton_: has joined #ruby
[18:33:52] bronson: has joined #ruby
[18:33:54] CustosLimen: has joined #ruby
[18:34:10] whippythellama_: has joined #ruby
[18:34:12] shinnya_: has joined #ruby
[18:34:35] tommylom1ykins: has joined #ruby
[18:34:35] neektza_: has joined #ruby
[18:34:56] silverdust: has joined #ruby
[18:34:56] towski_: has joined #ruby
[18:34:56] Jackneill_: has joined #ruby
[18:34:57] g0rx_: has joined #ruby
[18:34:57] _whitelogger____: has joined #ruby
[18:35:43] alem0lars: has joined #ruby
[18:35:57] symm-: has joined #ruby
[18:36:06] Scripore: has joined #ruby
[18:36:17] aaeron: has joined #ruby
[18:36:42] DukeDave: has joined #ruby
[18:37:30] code1o6: has joined #ruby
[18:37:50] Kedare: has joined #ruby
[18:38:25] rsc___: has joined #ruby
[18:38:31] atmosx: has joined #ruby
[18:39:48] renanoronfle: has joined #ruby
[18:41:21] Frank13760: has joined #ruby
[18:41:25] bmurt_: has joined #ruby
[18:41:27] bttf: has joined #ruby
[18:42:11] kies^: has joined #ruby
[18:42:22] jevs: has joined #ruby
[18:42:59] knowtheory: has joined #ruby
[18:42:59] zipkid: has joined #ruby
[18:43:12] loc22: has joined #ruby
[18:43:22] mjc_: has joined #ruby
[18:43:59] Frem: has joined #ruby
[18:44:55] tenderlove: has joined #ruby
[18:45:38] yfeldblum: has joined #ruby
[18:45:41] christiandsg: has joined #ruby
[18:45:52] bodgix: has joined #ruby
[18:46:14] heyimwill: has joined #ruby
[18:46:27] vickleton: has joined #ruby
[18:47:14] rideh: has joined #ruby
[18:47:30] jeregrine: has joined #ruby
[18:48:02] guyvdb: has left #ruby: ("Leaving")
[18:48:25] tubuliferous: has joined #ruby
[18:50:13] drbrain: types are being explored for ruby 3.0
[18:51:06] nobitanobi: has joined #ruby
[18:51:17] Afterburned6387: has joined #ruby
[18:51:25] drbrain: matz' keynote from RubyConf last year has some other things
[18:53:19] jalcine: drbrain: you mind expanding on that a bit more?
[18:53:19] fantazo: has joined #ruby
[18:53:26] jalcine: like strict typing in Ruby?
[18:53:42] niiamon: has joined #ruby
[18:53:52] mdavid613: has joined #ruby
[18:53:56] drbrain: Matz had optional typing in mind in order to enable compile-time optimization
[18:54:15] wldcordeiro_: has joined #ruby
[18:55:02] jalcine: ACTION piques up in interest
[18:55:14] jenrzzz: has joined #ruby
[18:55:47] msnyon_: has joined #ruby
[18:56:28] davedev24: has joined #ruby
[18:58:12] tenderlo_: has joined #ruby
[18:58:20] niiamon: has joined #ruby
[18:58:20] shevy: perhaps it was this talk https://www.youtube.com/watch?v=85ct6jOvVPI not sure yet, listening right now, afterwards I may know
[18:58:28] decaff: has joined #ruby
[18:58:40] shevy: we need to find cuter animals than sharks though, I don't wanna be a shark
[18:58:47] blackmesa: has joined #ruby
[19:01:32] Kully3xf: anyway to install bundler from source?
[19:02:50] leesharma: has joined #ruby
[19:03:11] Kully3xf: git clone bundler-url.git
[19:03:18] Kully3xf: gem build bundler.gemspec
[19:03:19] Mendenhall: has joined #ruby
[19:03:24] Kully3xf: gem isnstall bunder-.gem
[19:03:30] [Butch]: has joined #ruby
[19:04:09] atmosx: because you'll have to update bundler manually (eventually)
[19:04:16] atmosx: other than that, no prob.
[19:04:33] shevy: don't you get the source when you grab the bundler gem? it is also on github I think https://github.com/bundler/bundler/
[19:04:55] atmosx: jalcine dbussink there's been a lot of discussion around about ruby accepting some sort of typing.
[19:04:58] jhass: Kully3xf: yup, like that, or even step 3 in https://github.com/bundler/bundler/blob/master/DEVELOPMENT.md#development-setup
[19:05:11] jalcine: shevy: narwhals? :)
[19:05:16] shevy: well what exactly do we mean with "typing"
[19:05:23] Kully3xf: it won't pull from source
[19:05:27] atmosx: shevy: typing letters
[19:05:30] Kully3xf: super locked down
[19:05:33] podman: has joined #ruby
[19:05:40] atmosx: shevy: like, you type with the fingers, with the nose, etc.
[19:05:40] davejlong: has joined #ruby
[19:05:41] shevy: I wouldn't mind optional declarations of some variables to remain and are guaranteed to be something, like "@foo is always an array"
[19:05:52] shevy: I type with my toes
[19:06:00] atmosx: shevy: see?
[19:06:04] atmosx: we should support toes officially
[19:06:14] atmosx: ACTION I feel it in my fingers, I feel it in my toeees
[19:06:36] hahuang65: has joined #ruby
[19:06:41] atmosx: snow is all around us (it's 40 C here, but anyway) and so the feeling groww
[19:06:49] omegamike: has joined #ruby
[19:07:07] linuxboytoo: has joined #ruby
[19:07:14] Trynemjoel: has joined #ruby
[19:07:30] lannonbr: has joined #ruby
[19:08:13] [Butch]: has joined #ruby
[19:08:34] jalcine: that would be nice to have in ruby
[19:08:35] nofxx: has joined #ruby
[19:08:54] jalcine: not 100% needed tbh
[19:08:55] yxhuvud: has joined #ruby
[19:08:57] jalcine: but very nice
[19:09:41] atmosx: if it would help us write less tests...
[19:09:45] atmosx: anything goes
[19:10:27] a1ph4g33k: has joined #ruby
[19:10:38] olistik: has joined #ruby
[19:10:50] yb_drowe: has joined #ruby
[19:11:10] dseitz: has joined #ruby
[19:13:20] mrmargolis: has joined #ruby
[19:13:25] nofxx: shevy, cute animal? are you a girl? can't think of anything more fun than a shark... only a hawk, and big cats
[19:13:40] DoubleMalt: has joined #ruby
[19:13:53] shevy: nofxx a shark is an evil beast in the ocean
[19:14:14] nofxx: shevy, disagree, the only evil beast in the ocean is man
[19:14:22] shevy: and he can't even swim!
[19:14:34] blahwoop: has joined #ruby
[19:14:49] nofxx: shevy, hehe, how's that?
[19:15:00] TeresaP: Anyone know what the equivalent of right-clicking individual files and compressing them is on OS X? I need a system call or some sort of ruby gem method
[19:15:08] TeresaP: Has to be exactly the same sort of compression
[19:15:33] nofxx: TeresaP, that's confuse... you want to make a .zip in ruby?
[19:15:47] shock_one: has joined #ruby
[19:15:58] niiamon: has joined #ruby
[19:16:12] TeresaP: yes nofxx, currently I do a system call to use 'ditto' (OS X) but it only takes one file or folder
[19:16:23] nofxx: shevy, discovery teatch me that sharks bite hard but are kinda dumb. The orcas have the strenght and brains =D
[19:17:14] MasterPiece: has joined #ruby
[19:17:18] TeresaP: I'd hate to have to create a temp folder and zip that
[19:17:25] nofxx: TeresaP, which zip returns something?
[19:17:38] nofxx: if not install it with homebrew
[19:17:50] TeresaP: nofxx the problem isn't being able to zip, it's finding a way to zip that exactly mirrors what OS X does
[19:17:57] RegulationD: has joined #ruby
[19:18:13] leesharma: has joined #ruby
[19:18:24] Notte: has joined #ruby
[19:18:46] TeresaP: I tried asking over on macdev too, but no luck
[19:19:12] nofxx: TeresaP, what it does differently?
[19:19:18] Notte: has left #ruby: ()
[19:19:30] TeresaP: I don't know... something about how it compresses
[19:19:56] TeresaP: I just know that's what I need. No one documents anything
[19:20:18] TeresaP: (On my team)
[19:20:28] nofxx: TeresaP, I don't believe they are using anything different, else no one would unzip the files. Zip has a bunch of options, try the -h
[19:20:39] nofxx: might ve some compression level or CR/LF thing
[19:20:55] TeresaP: It does matter, because I tried using something awhile back that seemed identical and it wasn't
[19:21:08] paulcsmith: has joined #ruby
[19:21:33] dfockler: TeresaP: you could use the zip command from a ruby program
[19:21:58] TeresaP: I tried that one before
[19:22:08] TeresaP: I'll look into the -h flag
[19:23:26] EminenceHC: has joined #ruby
[19:24:40] renanoronfle: has joined #ruby
[19:24:42] Ox0dea: > The ditto command has a few idiosyncrasies that anyone who's coming from traditional UNIX and is used to cp might find distressing.
[19:25:09] yqt: has joined #ruby
[19:25:16] TeresaP: 0x0dea I've been using ditto, but unfortunately the requirements have changed from a folder to individual files to be added to the zip
[19:25:29] TeresaP: I'm cross referencing the list of files I need to add with a .xml file
[19:25:41] swgillespie: has joined #ruby
[19:25:42] tenderlove: has joined #ruby
[19:25:44] TeresaP: Apparently ditto only takes 1 file OR 1 folder
[19:25:48] CustosLimen: has joined #ruby
[19:25:56] TeresaP: So I guess I'm stuck copying files to a temp dir and deleting it after
[19:26:18] rickmasta: has joined #ruby
[19:26:32] tmtwd: has joined #ruby
[19:27:09] bruno-: has joined #ruby
[19:27:15] Ox0dea: TeresaP: You need only figure out which parameters ditto is using to perform the DEFLATE operation.
[19:27:38] TeresaP: I'm using ditto -ck --rsrc --sequesterRsrc
[19:27:42] leesharma: has joined #ruby
[19:28:02] TeresaP: 0x0dea (forgot to tag)
[19:28:14] TeresaP: oh, you have an O and 0
[19:28:20] TeresaP: that's not confusing :)
[19:28:27] Ox0dea: TeresaP: As has been mentioned, ditto can't be doing anything terribly idiosyncratic, else the resultant archives would be useless in other environments.
[19:28:34] phrozen77: has joined #ruby
[19:28:34] drPoggs: has joined #ruby
[19:28:38] elektronaut: has joined #ruby
[19:28:41] TeresaP: I believe it has something to do with how much it's compressing the images
[19:28:43] Trieste: has joined #ruby
[19:28:45] soahccc: has joined #ruby
[19:28:47] krasnus: has joined #ruby
[19:29:16] centrx: has joined #ruby
[19:29:33] Ox0dea: > By default, ditto will use the default compression level as defined by zlib.
[19:30:06] radgeRayden: has joined #ruby
[19:30:17] TeresaP: Apparently -ck uses Info-ZIP's zip
[19:31:31] Ox0dea: Info-ZIP became zlib, more or less.
[19:31:36] mrmargol_: has joined #ruby
[19:32:36] bauruine: has joined #ruby
[19:33:35] a1ph4g33k: TeresaP: Use the rubyzip gem ? https://github.com/rubyzip/rubyzip
[19:33:36] niiamon: has joined #ruby
[19:33:49] smoaking: has joined #ruby
[19:33:55] smoaking: hi people i would like to learn how to program
[19:34:06] smoaking: hi people i would like to learn how to program
[19:34:07] smoaking: where is a good paid online resource where i can accomplish my goals?
[19:34:10] smoaking: i don't know math and i heard math is irrelevant with programming
[19:34:26] centrx: Not sure what you are talking about
[19:34:30] last_staff: has joined #ruby
[19:34:49] centrx: smoaking, tryruby.org
[19:35:06] Maletor: has joined #ruby
[19:35:28] a1ph4g33k: TeresaP: ? ( re: ???omg??? )
[19:36:13] existensil: has joined #ruby
[19:36:22] smoaking: centrx: i did that and i don't feel like a progarmmer
[19:37:15] TeresaP: Thanks for your recommendation. I've looked into that but I'll revisit
[19:37:15] smoaking: i finished that tutorial
[19:37:15] Ox0dea: a1ph4g33k: TeresaP is not having trouble creating ZIP archives; she's struggling to perfectly imitate the semantics of OS X's ditto utility.
[19:37:15] centrx: smoaking, https://rubymonk.com/
[19:37:15] a1ph4g33k: Ox0dea: gotcha.
[19:37:15] adaedra: you want to feel like a programmer, smoaking ?
[19:37:16] Ox0dea: smoaking: Do the Ruby Koans.
[19:37:16] nobitanobi: has joined #ruby
[19:37:16] Ox0dea: And then donate to the author(s), if you really want to use a paid resource.
[19:37:17] bmurt: has joined #ruby
[19:38:02] tenderlo_: has joined #ruby
[19:38:17] TeresaP: oh hey zlib has a gem
[19:38:46] tkuchiki: has joined #ruby
[19:38:48] lukas: has joined #ruby
[19:39:09] mrmargolis: has joined #ruby
[19:39:11] Ox0dea: Zlib is part of the standard library, but it's rather less featureful than rubyzip.
[19:39:11] a1ph4g33k: TeresaP: ZLib is included when you compile Ruby.
[19:39:24] smoaking: adeponte: i know 0 math ( i failed algebra in high school and gave up and dropped out of high school when i was 15) and now i want to become a programmer at 23
[19:39:53] a1ph4g33k: ^^^ what Ox0dea said.
[19:39:55] ItSANgo: has joined #ruby
[19:40:07] bricker: has joined #ruby
[19:40:08] msnyon: has joined #ruby
[19:40:49] twohlix: smoaking: so learn math now? depending on the type dev work you want to do you dont need to know crazy math, good luck.
[19:40:56] TeresaP: zlib has a Zip.default_compression = Zlib::DEFAULT_COMPRESSION
[19:41:19] shevy: is there a way to find out where a method was defined precisely? like in file foo.rb we have "def foo", so we can grep for it easily, but perhaps some dynamic methods are harder to find, such as a dynamic "define_method"; I'd kinda want to know where the method was first defined, in which case I could then open that file
[19:41:31] smoaking: twohlix: i want to program web sites using ruby and rails and other languages and frameworks
[19:41:41] fenjamin: has joined #ruby
[19:42:00] TeresaP: smoking first pick a project, then read up on the Ruby documentation that will support your ability to do that
[19:42:05] Ox0dea: shevy: #source_location, no?
[19:42:12] TeresaP: damn autocorrect
[19:42:25] twohlix: smoaking: your best bet is #rubyonrails then. If you want to learn how to get a rails project up and running there are some good things like: http://railsforzombies.org/
[19:42:37] Ox0dea: >> define_method(:foo){}; method(:foo).source_location # shevy
[19:42:40] ruboto: Ox0dea # => ["/tmp/execpad-5680ca658740/source-5680ca658740", 2] (https://eval.in/409182)
[19:42:47] smoaking: but how would i do ruby on rails without knowing a lick of ruby?
[19:43:10] shevy: Ox0dea hmm let me try
[19:43:35] diegoviola: smoaking: you don't need to know much about math at all, you know basic math though right? adding, subtraction, multiplication, division?
[19:43:43] a1ph4g33k: shevy: also, you could look into the show_method & edit_method capabilities of pry to see how they give you access back to method source.
[19:43:57] Kyuujitsu: has joined #ruby
[19:44:05] diegoviola: smoaking: focus on one thing first, spend a week learning ruby and nothing more and then try rails
[19:44:15] Ox0dea: a1ph4g33k: Pry uses the method_source gem.
[19:44:27] smoaking: diegoviola: what should i spend a week learning?
[19:44:35] diegoviola: smoaking: ruby
[19:44:46] smoaking: yeah but what
[19:44:55] smoaking: what should my daily schedule consist of?
[19:45:05] wasamasa: eat, drink, sleep
[19:45:12] diegoviola: smoaking: I'm not saying you should have a schedule, but go and learn the core ruby language
[19:45:26] Ox0dea: "Yeah, but which part first, though?"
[19:45:30] smoaking: and the core can be learned in a week?!
[19:45:35] Ox0dea: "Please don't let go of my hand!"
[19:45:35] diegoviola: there are a few good books on this
[19:45:38] diegoviola: and tutorials
[19:45:41] twohlix: programming is never finished being learned
[19:45:54] wasamasa: smoaking: http://www.norvig.com/21-days.html
[19:45:56] n_blownapart: has joined #ruby
[19:46:07] diegoviola: twohlix: I'm just suggesting him a way to start
[19:46:20] TeresaP: smoaking it might be helpful to take a class on programming, so you get the gist of how to think about programming. From there, it's easy to learn multiple languages.
[19:46:25] twohlix: i know im responding to his amazement something can be learned in a week
[19:46:35] diegoviola: smoaking: do you know other languages?
[19:46:40] grios: has joined #ruby
[19:46:40] diegoviola: smoaking: have you ever done any programming?
[19:46:40] aphprentice: has joined #ruby
[19:46:47] skyrocker1: has joined #ruby
[19:46:50] whippythellama: has joined #ruby
[19:46:58] Ox0dea: smoaking: Play with Lego much as a child?
[19:47:45] smoaking: no i am too poor to have legos
[19:47:53] Kyuujitsu: has joined #ruby
[19:47:59] smoaking: we played in the mud and shot squirrel as a kid
[19:48:03] a1ph4g33k: shevy: I expect you saw Ox0dea ???s answer ??? method_source gem ??? the original answer ( and what method_source uses ??? is Method.source_location ( when available ).
[19:48:05] Ox0dea: And yet here you are on the Internet.
[19:48:25] twohlix: Ah, trolling
[19:48:30] twohlix: i had a hunch
[19:48:33] smoaking: the government provides some money... i just want to change and better my life
[19:48:36] tear: has joined #ruby
[19:48:41] tuelz1: has joined #ruby
[19:48:43] Ox0dea: twohlix: Aye, I was going to issue a PSA that he oughtn't be fed. :/
[19:48:55] twohlix: once he said math is irrelevant
[19:48:59] twohlix: i was suspect
[19:49:06] smoaking: i reckon i am able to become whatever i want to become and turn my life around
[19:49:25] smoaking: twohlix: people have told me that programming does not require math
[19:49:50] smoaking: they said you don't need math.... these are people that are programming node.js and other website stuff that i don't know a lick of yet
[19:50:04] blahwoop: has joined #ruby
[19:50:19] tenderlove: has joined #ruby
[19:50:29] nini1294: has joined #ruby
[19:50:37] blahwoop: shevy: vim ctags
[19:50:51] twohlix: So, even if i suspect you might be trollin, The only way I guarantee you'll learn how to program, is if there is some problem you're excited to solve that can be done through programming. Then you'll learn lots of crap around that and might follow some terrible practices but that'll get you started
[19:51:04] twohlix: good luck.
[19:51:07] niiamon: has joined #ruby
[19:51:52] wasamasa: twohlix: you know, that says an awful lot about programming
[19:52:03] smoaking: i just looked up "trollin" and i ain't "trollin" i'm serious.... i reckon there ain't much folk like me out here on the internet but i do want to change my life honest
[19:52:13] Ox0dea: blahwoop: Exuberant or Universal?
[19:52:40] TeresaP: smoaking how did you end up in this chat
[19:52:58] smoaking: a guy i met at starbucks done showed me how get on this here chat
[19:53:18] TeresaP: smoaking I'm going to place you at 40-50 years old, no college experience?
[19:53:29] smoaking: he said all them programmers and internet folk are on here
[19:53:38] Ox0dea: smoaking: Your accent changed.
[19:53:42] hahuang65: has joined #ruby
[19:53:44] werelivinginthef: has joined #ruby
[19:53:45] blahwoop: well the internet folks are everywhere
[19:53:47] a1ph4g33k: Ox0dea: yeah it did.
[19:53:47] blahwoop: not just here
[19:53:52] TeresaP: definitely a troll
[19:53:57] smoaking: TeresaP: i'm 28 years old
[19:54:01] Guest70411: has joined #ruby
[19:54:15] Guest70411: who's the cheapest ruby whore around?
[19:54:26] havenwood: !mute Guest70411
[19:54:27] ruboto: +q Guest70411!*@*
[19:54:27] ruboto: -o ruboto
[19:54:28] blahwoop: lol u just said u were 23
[19:54:36] havenwood: smoaking: no trolling
[19:54:39] smoaking: i once knew a gal named ruby who worked at the local strip joint
[19:55:08] blahwoop: i have the perfect source for u
[19:55:18] wldcordeiro_: has joined #ruby
[19:55:50] blahwoop: too bad he left
[19:56:08] blahwoop: was goin to link him to why's guide
[19:56:50] willharrison: has joined #ruby
[19:57:02] charliesome: has joined #ruby
[19:57:20] postmodern: has joined #ruby
[19:58:13] twohlix: shit I had never read why's guide, this is an hilarious intro
[19:58:20] shevy: a1ph4g33k aha
[19:58:49] a1ph4g33k: Source of the gem has helpers to try and find Proc, Method, & UnboundMethod objects ???
[19:59:28] leesharma: has joined #ruby
[19:59:36] a1ph4g33k: shevy: ???lib/ruby/gems/method_source-0.8.2/lib/method_source/source_location.rb
[19:59:49] havenwood: twohlix: There's also a soundtrack that's worth checking out while you read it. :)
[20:00:31] a1ph4g33k: twohlix: yeah, that was the first material I read when I learned Ruby ??? uh ??? 11 or 12 years ago ?
[20:00:32] Klumben: has joined #ruby
[20:00:45] twohlix: ive only been on this ruby train for like 2-3 years
[20:00:47] a1ph4g33k: was very sad when _why broke down and quit.
[20:01:25] christiandsg: has joined #ruby
[20:01:36] dblessing: has joined #ruby
[20:02:02] shevy: I guess people liked his cartoons
[20:02:11] a1ph4g33k: ??? CHUNKY BACON!
[20:03:25] blahwoop: perfect for smaoking
[20:04:01] a1ph4g33k: he had a blog that was very inspiring to me ??? ???Red Handed??? I believe was the title ??? good stuff.
[20:04:08] banister: has joined #ruby
[20:04:20] bronson: has joined #ruby
[20:04:23] twohlix: so other than koans and katas and whatnot, what ways do you guys improve your ruby/programming?
[20:04:44] havenwood: twohlix: Reading code!
[20:04:50] twohlix: yea, that helps
[20:05:22] a1ph4g33k: I agree with the others, but it???s also fun to play on Project Euler to work on core language learning.
[20:05:28] robbyoconnor: has joined #ruby
[20:05:39] twohlix: Project Euler has helped a bunch for sure.
[20:05:53] a1ph4g33k: ( I???ve been doing that to strengthen my knowledge fo Scheme ( via Racket ) )
[20:06:18] casadei_: has joined #ruby
[20:07:11] dopie: has joined #ruby
[20:08:46] tejasmanohar_: has joined #ruby
[20:09:32] aaeron: has joined #ruby
[20:09:43] ItSANgo: has joined #ruby
[20:10:42] yfeldblum: has joined #ruby
[20:12:13] Vile`: has joined #ruby
[20:12:45] momomomomo: has joined #ruby
[20:13:28] imperator: huh, getting different results for doc.root from rexml vs nokogiri
[20:14:02] twohlix: isn't nokogiri a compiled dealy?
[20:14:14] twohlix: oh nevermind misread that
[20:14:27] twohlix: thought you meant filepaths, disregard all of that crap
[20:14:41] Scripore: has joined #ruby
[20:14:50] blahwoop: rubyspec is back!
[20:15:17] Trynemjoel: has joined #ruby
[20:16:09] weemsledeux: has joined #ruby
[20:17:08] sarkyniin: has joined #ruby
[20:17:11] shock_one: has joined #ruby
[20:18:43] imperator: what gives? https://gist.github.com/djberg96/8a07eb8eb1998b8ff397
[20:18:46] a1ph4g33k: shevy: nvm ??? was scrolled back in chat log.
[20:20:45] arooni: has joined #ruby
[20:22:33] dorei: has joined #ruby
[20:22:45] decaff: has joined #ruby
[20:23:14] jenrzzz: has joined #ruby
[20:24:37] theery: has joined #ruby
[20:24:42] johnhamelink: has joined #ruby
[20:24:44] a1ph4g33k: imperator: Nokogiri::XML::Document.parse( str )
[20:24:48] mleung: has joined #ruby
[20:25:31] imperator: a1ph4g33k, aha, thanks
[20:25:38] tenderlo_: has joined #ruby
[20:25:55] ips|malc: has joined #ruby
[20:26:10] nahtnam: has joined #ruby
[20:27:20] blaines: has joined #ruby
[20:27:23] yardenbar: has joined #ruby
[20:27:38] rehat: has joined #ruby
[20:27:42] tcrypt: has joined #ruby
[20:28:08] Jarboe: has joined #ruby
[20:28:16] djbkd: has joined #ruby
[20:29:29] TeresaP: Does FileUtils.touch not take a path to a file? Part of the path doesn't exist and it's choking on it, but the docs don't mention that limitation
[20:29:48] TeresaP: I'm expecting too much, I guess
[20:30:26] Rosa: has joined #ruby
[20:30:34] irctc902: has joined #ruby
[20:30:45] apfeluser: has joined #ruby
[20:30:45] jhass: otoh that an operation on a file would create a bunch of directories would be kind of unexpected too, no?
[20:30:47] shevy: you want to create a file in a path that does not exist? :)
[20:30:51] jhass: it just fits your usecase better atm
[20:31:09] TeresaP: I want it to generate any missing parts
[20:31:21] jhass: File.mkdir_p File.dirname path to the rescue
[20:31:23] shevy: yeah so a combination with FileUtils.mkdir_p
[20:31:38] guest1241234: has joined #ruby
[20:31:45] TeresaP: jhass yeah I suppose you're right
[20:31:56] irctc902: hello im trying to install this https://github.com/adelevie/parse-ruby-client for Rails. and im having some issues.
[20:32:03] TeresaP: I'm being lazy :)
[20:32:25] pdoherty: has joined #ruby
[20:32:29] loc22: has joined #ruby
[20:32:54] twohlix: irctc902: you gotta be more specific about the issues you're having
[20:33:09] Jarboe: has joined #ruby
[20:33:43] blackmesa: has joined #ruby
[20:33:44] irctc902: i created a parse.rb file containing https://gist.github.com/anonymous/2e03e77c4010e0df2f02 and i get a error back saying that when i call client in my controller its undefined
[20:33:53] ivanskie: has joined #ruby
[20:34:14] j4cknewt: has joined #ruby
[20:34:27] diego_k: has joined #ruby
[20:34:43] jackjackdripper: has joined #ruby
[20:34:49] diego_k: has joined #ruby
[20:35:05] jhass: exact error message please
[20:35:30] twohlix: irctc902: client is never going to be available to your controller that way. In fact you know how your model instance gets instantiated in your controller?
[20:35:32] blahwoop: u can't access the client variable
[20:35:49] blahwoop: yea what twohlix said
[20:35:56] twohlix: whereever you need parse. you'll need to make something like @parse_client so you can use it in your controller/views
[20:36:58] tubuliferous: has joined #ruby
[20:37:26] twohlix: Think of your parse clietn as a model. Since that is where data is coming from I bet, then treat it as a model
[20:38:30] tvw: has joined #ruby
[20:38:35] diegodap: has joined #ruby
[20:38:48] momomomomo: has joined #ruby
[20:38:55] irctc902: got it, so i call @parse_client?
[20:39:24] twohlix: In your controller, you need to instantiate your parse client wherever you need it
[20:39:47] dopie: has joined #ruby
[20:40:03] irctc902: how would i do that
[20:40:36] diegodap: has joined #ruby
[20:40:36] blahwoop: irctc902: u can use Parse directly inside your controler
[20:40:39] dorei: when I do em::stop_server, is there an event that's being fired when server is actually stopped ?
[20:41:16] dorei: EM::stop_server
[20:41:25] blahwoop: irctc902: Parse.create
[20:42:17] irctc902: so i call Parse.create? but isnt that what the Parse.rb file is for?
[20:42:20] niiamon_: has joined #ruby
[20:42:40] blahwoop: irctc902: if you're trying to create a wrapper
[20:43:10] blahwoop: irctc902: u'll have to create a new class like ParseWrapper
[20:43:37] blahwoop: irctc902: then u would still need to do ParseWrapper.new in your controller
[20:44:08] irctc902: what im trying to do is to update,write,create, read data from parse, thats really it.
[20:44:26] RobertBirnie: has joined #ruby
[20:44:30] lwu_: has joined #ruby
[20:44:49] blahwoop: irctc902: u might want to read up on some ruby first
[20:44:56] bodgix1: has joined #ruby
[20:45:51] twohlix: also irctc902: #rubyonrails is generally better for rails specific questions
[20:46:33] FernandoBasso: has joined #ruby
[20:46:49] blahwoop: irctc902: if you're just trying to get it just work. forget the parse.rb file. and just use Parse.create directly in your controller.
[20:46:50] niiamon_: has joined #ruby
[20:47:10] atmosx: irctc902: see Struct clas
[20:47:26] atmosx: http://blog.steveklabnik.com/posts/2012-09-01-random-ruby-tricks--struct-new
[20:47:51] NeverDie: has joined #ruby
[20:48:04] freerobby: has joined #ruby
[20:52:50] bronson: has joined #ruby
[20:55:28] Musashi007: has joined #ruby
[20:55:37] jgt: has joined #ruby
[20:57:07] IrishGringo: has joined #ruby
[20:58:18] shock_one: has joined #ruby
[20:59:26] theery: has joined #ruby
[20:59:59] dfockler: has joined #ruby
[21:00:06] omegamike: has joined #ruby
[21:00:16] tkuchiki: has joined #ruby
[21:01:21] blackmesa: has joined #ruby
[21:01:52] imperator: has left #ruby: ("Leaving")
[21:02:06] bruno-_: has joined #ruby
[21:02:18] Apomelasma: has joined #ruby
[21:02:31] workmad3_: has joined #ruby
[21:02:35] tAn: has joined #ruby
[21:02:52] AccordsLTN: has joined #ruby
[21:03:10] jackjackdripper1: has joined #ruby
[21:03:15] ItSAN____: has joined #ruby
[21:03:27] dopieee: has joined #ruby
[21:03:34] baroquebobcat_: has joined #ruby
[21:03:52] Rosa: has joined #ruby
[21:03:59] julieeharshaw: has joined #ruby
[21:04:44] mattp__: has joined #ruby
[21:04:46] speaking1ode: has joined #ruby
[21:05:08] hahuang61: has joined #ruby
[21:05:09] blaines_: has joined #ruby
[21:05:38] PaulePanter: has joined #ruby
[21:05:38] krokuz: has joined #ruby
[21:05:50] prestorium: has joined #ruby
[21:06:03] marsjaninzmarsa: has joined #ruby
[21:06:07] ElSif: has joined #ruby
[21:06:12] gigetoo: has joined #ruby
[21:06:17] spiceweasel: has joined #ruby
[21:06:23] loop3r: has joined #ruby
[21:06:25] [k-: has joined #ruby
[21:06:33] eregon: has joined #ruby
[21:06:42] eam: has joined #ruby
[21:06:48] pl1ght: has joined #ruby
[21:06:53] Ox0dea: has joined #ruby
[21:06:58] yosafbridge: has joined #ruby
[21:07:05] raenk: has joined #ruby
[21:07:11] c0ncealed: has joined #ruby
[21:07:29] thejoecarroll: has joined #ruby
[21:07:36] shevy: adaedra, I have an error on cr?che
[21:07:52] Vile`: has joined #ruby
[21:07:53] wallmani_: has joined #ruby
[21:08:08] shevy: strangely enough in IRB works.. hmm
[21:08:11] lukas: has joined #ruby
[21:08:11] sarkyniin: has joined #ruby
[21:09:07] kies^: has joined #ruby
[21:09:16] shevy: aha... so the "cr?che" is in UTF-8 ... and I can not convert it into ISO-8859-1
[21:09:29] wlanboy: has joined #ruby
[21:09:29] joneshf-laptop: has joined #ruby
[21:09:37] ankhers: has joined #ruby
[21:10:00] ssvss: has joined #ruby
[21:10:09] FernandoBasso: has joined #ruby
[21:10:14] matp: has joined #ruby
[21:10:27] tuelz1: has joined #ruby
[21:11:26] apeiros: shevy: "cr??che" can be converted to 8859-1
[21:11:37] leafybasil: has joined #ruby
[21:11:50] apeiros: >> "cr??che".encode("iso-8859-1")
[21:11:51] ruboto: apeiros # => "cr\xE8che" (https://eval.in/409242)
[21:12:57] Jarboe: has joined #ruby
[21:16:44] shevy: you are right
[21:16:48] shevy: it works fine in irb ...
[21:18:05] chipotle: has joined #ruby
[21:19:51] shevy: works in irb but not in the .rb file...
[21:19:54] shevy: readline.rb:126:in `encode!': "\xE8" followed by "c" on UTF-8 (Encoding::InvalidByteSequenceError)
[21:20:41] shevy: it works when I use .force_encoding
[21:21:31] adaedra: ACTION puts shevy in cr??che
[21:21:55] sometimes: has joined #ruby
[21:22:32] shevy: adaedra strangely enough, I read that word in some english book... noted it down for not knowing what it is, then it went into my english dictionary
[21:22:36] hashrocket: has joined #ruby
[21:23:10] user1138_: has joined #ruby
[21:23:11] shevy: it was the only entry out of ~almost 1000 or so that caused problems :D
[21:23:47] _blizzy_: has joined #ruby
[21:25:14] adaedra: in English, it's Kindergarten
[21:26:22] Ox0dea: adaedra: That's German.
[21:27:11] adaedra: It's in my English dictionary D:
[21:27:41] yorickpeterse: I think in English it's just called "hell"
[21:27:46] miah: its a french word
[21:27:52] miah: North American
[21:27:53] miah: a model or tableau representing the scene of Jesus Christ's birth, displayed in homes or public places at Christmas.
[21:27:56] olistik: has joined #ruby
[21:28:12] user1138: has joined #ruby
[21:28:21] miah: probably a topic better for #ruby-offtopic though =)
[21:29:04] texasmade: has joined #ruby
[21:29:25] rubynuby: has joined #ruby
[21:29:32] blackmesa: has joined #ruby
[21:31:16] j4cknewt: has joined #ruby
[21:31:52] decaff: has joined #ruby
[21:32:01] user1138_: has joined #ruby
[21:32:25] AnoHito: has joined #ruby
[21:32:46] adaedra: miah: It also means that. Note that, in both, you take care of child(ren).
[21:32:51] ruby-lang891: has joined #ruby
[21:32:57] adaedra: Thre maaaaaaaay be a link.
[21:33:20] ruby-lang891: what happened to #ruby-lang?
[21:33:24] jenrzzz_: has joined #ruby
[21:33:26] Guest6988: has joined #ruby
[21:33:55] paulcsmith: has joined #ruby
[21:34:06] yorickpeterse: ruby-lang891: merged into #ruby
[21:34:57] ruby-lang891: yorickpeterse: thanks!
[21:34:58] CodProbo3: has joined #ruby
[21:34:59] EminenceHC: has joined #ruby
[21:35:14] ruby-lang891: anyone familiar with rails here?
[21:35:39] polpak: ruby-lang891: #rubyonrails is a thing that exists
[21:36:06] CodProbo3: has left #ruby: ()
[21:36:07] ruby-lang891: polpak: thank you :D
[21:37:15] Guest70411: has left #ruby: ()
[21:38:31] shevy: hey jhass ^^^ today we had another question what happened to #ruby-lang :D
[21:39:34] tejasmanohar_: has joined #ruby
[21:41:14] unsymbol: has joined #ruby
[21:41:21] dudedudeman: so to anyone in this channel who has ever helped me, i wanted to say thank you. i've just accepted my first dev job
[21:41:24] djbkd: has joined #ruby
[21:41:35] adaedra: shevy: answer "German invasion"
[21:41:38] wprice: dudedudeman: I???ve never helped you, but congrats,bit first step
[21:41:47] wprice: dudedudeman: you should be proud and best of luck
[21:41:54] dudedudeman: wprice: psh, i bet you have. lol
[21:42:08] havenwood: dudedudeman: Congratulations!
[21:42:17] wprice: dudedudeman: doing Ruby based work?
[21:45:09] Yzguy: has joined #ruby
[21:45:13] user1138: has joined #ruby
[21:46:34] shevy: adaedra The French Connection?
[21:46:56] user1138_: has joined #ruby
[21:47:15] shevy: dudedudeman aww you are losing your dudeness slowly
[21:47:58] riscky: has joined #ruby
[21:49:36] zenguy_pc: has joined #ruby
[21:50:10] christiandsg: has joined #ruby
[21:50:34] dudedudeman: wprice: somewhat. it's a junior dev ops/sys admin role
[21:50:43] dudedudeman: puppet/chef, sys admin stuff, jenkins
[21:51:05] yfeldblum: has joined #ruby
[21:51:07] dudedudeman: well, probably more ruby than i realize
[21:51:08] shock_one: has joined #ruby
[21:53:10] sarkyniin: has joined #ruby
[21:53:59] djbkd: has joined #ruby
[21:54:11] decaff: has joined #ruby
[21:55:03] cajone: has left #ruby: ()
[21:56:13] Thomas-0725: has joined #ruby
[21:56:37] user1138: has joined #ruby
[21:58:17] curses: has joined #ruby
[21:59:23] BraddPitt: big congrats dudedudeman
[21:59:48] dudedudeman: thanks BraddPitt. I"m excited to be able to do something that I'm falling in love with for a living
[22:00:42] jgpawletko: has joined #ruby
[22:01:57] cajone: has joined #ruby
[22:02:08] mistym: has joined #ruby
[22:02:12] user1138_: has joined #ruby
[22:02:46] Mendenhall: has joined #ruby
[22:03:04] dudedudeman: beers for EVERYONE
[22:03:08] dudedudeman: or whatever you want to drink
[22:05:21] user1138__: has joined #ruby
[22:05:25] rakm: dudedudeman nnoice
[22:06:24] Papierkorb: Is there a way to access class methods from within an instance method without having to writing TheClass. or self.class. ?
[22:06:30] neoseeker: has joined #ruby
[22:07:06] Igorshp: has joined #ruby
[22:07:42] hinbody: has joined #ruby
[22:07:47] charliesome: has joined #ruby
[22:07:58] user1138: has joined #ruby
[22:09:58] ofdtrinity: has left #ruby: ("Leaving")
[22:10:15] Ox0dea: Papierkorb: What're your oppositions to `self.class`?
[22:13:20] Papierkorb: Ox0dea: it's just so verbose
[22:13:55] michael_mbp: has joined #ruby
[22:15:07] user1138_: has joined #ruby
[22:15:08] neoseeker: has joined #ruby
[22:15:11] decaff: has joined #ruby
[22:15:26] ivanskie: so my css has a few columns which are essentially boolean but represented in strings Yes/No... what would be an easy way to convert that to boolean?
[22:15:58] adaedra: col == "Yes"
[22:16:02] ivanskie: i'm trying to import it into rails.. just realized that when i seeded the db it completely ignored these columns...
[22:16:43] ivanskie: i mean the values are in yes or no..
[22:17:26] bluOxigen: has joined #ruby
[22:17:27] riotjones: has joined #ruby
[22:18:11] Ox0dea: >> require 'yaml'; %w[Yes No].map { |b| YAML.parse(b).to_ruby } # ivanskie
[22:18:12] ruboto: Ox0dea # => [true, false] (https://eval.in/409247)
[22:18:14] Ox0dea: Just sayin'.
[22:18:52] Ox0dea: You can also use "on" and "off", for whatever reason.
[22:19:30] zenguy_pc: has joined #ruby
[22:19:40] shevy: what is that
[22:19:55] Ox0dea: "Developer happiness".
[22:20:30] shevy: >> require 'yaml'; YAML.parse('yes').class
[22:20:31] ruboto: shevy # => Psych::Nodes::Document (https://eval.in/409248)
[22:20:37] shevy: psych scares me
[22:20:41] shevy: syck could not do this
[22:20:47] Kyuujitsu: has joined #ruby
[22:20:48] Zai00: has joined #ruby
[22:20:51] Ox0dea: shevy: It's part of the YAML spec.
[22:21:02] theery: has joined #ruby
[22:21:02] Ox0dea: For seriously.
[22:21:34] Ox0dea: http://yaml.org/type/bool.html
[22:21:44] user1138: has joined #ruby
[22:21:49] Kyuujitsu: has joined #ruby
[22:21:56] casadei_: has joined #ruby
[22:22:14] zenguy_pc: has joined #ruby
[22:23:36] shock_one: has joined #ruby
[22:23:36] shevy: I thought you meant the to_ruby part
[22:24:31] Igorshp: has joined #ruby
[22:25:09] tubuliferous: has joined #ruby
[22:26:18] blackmes1: has joined #ruby
[22:27:50] lannonbr: has joined #ruby
[22:29:00] omegamike: has joined #ruby
[22:29:09] zzzzzzzzzzz: has joined #ruby
[22:29:27] dimasg: has joined #ruby
[22:30:33] wookiehangover: has joined #ruby
[22:32:16] bodgix1: has joined #ruby
[22:32:41] djbkd: has joined #ruby
[22:33:01] shock_one: has joined #ruby
[22:33:56] ivanskie: was just looking at ActiveRecord::ConnectionAdapters::Column::TRUE_VALUES.. but apparently these don't include yes / no..
[22:33:57] loc22: has joined #ruby
[22:34:05] ivanskie: so much for including all obvious yes/no values.
[22:34:08] Zai00: has joined #ruby
[22:34:36] abyss: has joined #ruby
[22:35:04] mercwithamouth: has joined #ruby
[22:35:49] j4cknewt_: has joined #ruby
[22:37:19] _djbkd: has joined #ruby
[22:37:20] theery: has joined #ruby
[22:38:00] nateberkopec: has joined #ruby
[22:39:01] gcfhvjbkn: has joined #ruby
[22:39:41] gcfhvjbkn: has joined #ruby
[22:40:16] gcfhvjbkn: has joined #ruby
[22:40:56] gcfhvjbkn: has joined #ruby
[22:41:19] Kyuujitsu: has joined #ruby
[22:41:31] gcfhvjbkn: has joined #ruby
[22:42:11] gcfhvjbkn: has joined #ruby
[22:42:47] gcfhvjbkn: has joined #ruby
[22:43:27] gcfhvjbkn: has joined #ruby
[22:43:37] tmtwd: has joined #ruby
[22:43:42] craysiii: could you ever think of a situation where you need to use do..end instead of { }?
[22:44:04] gcfhvjbkn: has joined #ruby
[22:44:12] craysiii: i am writing a block for a rails app but i dont think this is rails related
[22:44:29] craysiii: if I use { } i get thrown an error, but do..end work fine.
[22:44:42] gcfhvjbkn: has joined #ruby
[22:45:20] gcfhvjbkn: has joined #ruby
[22:45:57] gcfhvjbkn: has joined #ruby
[22:46:35] gcfhvjbkn: has joined #ruby
[22:47:10] gcfhvjbkn: has joined #ruby
[22:47:14] Ox0dea: craysiii: {} does bind more tightly than do/end, and that can indeed lead to changes in behavior.
[22:47:37] craysiii: what do you mean by "bind more tightly"
[22:47:50] gcfhvjbkn: has joined #ruby
[22:48:08] Ox0dea: craysiii: https://gist.github.com/0x0dea/80418f541b04fc336d2d
[22:48:29] gcfhvjbkn: has joined #ruby
[22:48:46] Ox0dea: craysiii: Think of it like "order of operations"; {} : do/end :: * : +.
[22:49:04] gcfhvjbkn: has joined #ruby
[22:49:04] craysiii: hm. i always try to use { } istead of do..end
[22:49:13] craysiii: guess i need to think about it more.
[22:49:14] skade: has joined #ruby
[22:49:19] Ox0dea: Use Weirich's rule.
[22:49:44] gcfhvjbkn: has joined #ruby
[22:50:07] hahuang61: has joined #ruby
[22:50:19] gcfhvjbkn: has joined #ruby
[22:50:29] hal_9000: semi-offtopic: does anyone here use the (ruby-based) twitter CLI?
[22:50:36] craysiii: interesting. why would they make one of higher precedence than the other though? i thought they were supposed to be analogous?
[22:50:55] christiandsg: has joined #ruby
[22:50:59] gcfhvjbkn: has joined #ruby
[22:51:34] gcfhvjbkn: has joined #ruby
[22:52:14] gcfhvjbkn: has joined #ruby
[22:52:31] craysiii: https://gist.github.com/craysiii/39056d3a10aac9a80c88
[22:52:35] Ox0dea: It's just one of those things, I guess. `and` is different from `&&`, and they serve disparate purposes.
[22:52:49] gcfhvjbkn: has joined #ruby
[22:53:29] gcfhvjbkn: has joined #ruby
[22:53:43] hal_9000: what is weirich???s rule btw?
[22:54:09] gcfhvjbkn: has joined #ruby
[22:54:15] s00pcan: has joined #ruby
[22:54:15] craysiii: if you look at the error though, it even says "excepting 'do' or '{'
[22:54:20] Ox0dea: hal_9000: {} for "functional" blocks, wherein you're interested in the return value, and do/end for procedural ones, where you're after the side effects.
[22:54:44] gcfhvjbkn: has joined #ruby
[22:54:44] Ox0dea: craysiii: Does enclosing the argument in parentheses make the sadness go away?
[22:55:21] shevy: anyone of you using colours on the commandline? what colours would you tend to use most often; I assume red is usually for warning-message output
[22:55:24] gcfhvjbkn: has joined #ruby
[22:55:42] craysiii: no the sadness remains.
[22:56:02] gcfhvjbkn: has joined #ruby
[22:56:38] gcfhvjbkn: has joined #ruby
[22:56:39] bonhoeffer: has joined #ruby
[22:56:44] djbkd: has joined #ruby
[22:56:52] Ox0dea: shevy: I'd advise not issuing the whole message in color.
[22:57:01] bonhoeffer: [1,2,3].remove(2) => [1,3] <??? possible?
[22:57:15] Ox0dea: bonhoeffer: You want #delete.
[22:57:16] gcfhvjbkn: has joined #ruby
[22:57:22] momomomomo: has joined #ruby
[22:57:30] amclain: has joined #ruby
[22:57:31] bonhoeffer: well, delete returns the deleted value
[22:57:42] bonhoeffer: is there an option?
[22:57:54] gcfhvjbkn: has joined #ruby
[22:57:58] bonhoeffer: ah ???. reject
[22:58:26] Ox0dea: Your example wasn't particularly illustrative of the behavior you're interested in.
[22:58:31] gcfhvjbkn: has joined #ruby
[22:59:01] ixti: has joined #ruby
[22:59:07] gcfhvjbkn: has joined #ruby
[22:59:11] jhass: shevy: red is actually for errors, warnings tend to be yellow
[22:59:14] bonhoeffer: my bad ??? yep ??? [1,2,3].reject{|a| a == 2}
[22:59:22] Kalov: has joined #ruby
[22:59:41] shevy: Ox0dea even bundle install uses colours!
[22:59:47] gcfhvjbkn: has joined #ruby
[22:59:48] shevy: jhass hmm
[22:59:56] jtdoncas: has joined #ruby
[23:00:11] Ox0dea: shevy: Sure, but note that it uses color subtly in most cases.
[23:00:14] shevy: yellow...
[23:00:23] gcfhvjbkn: has joined #ruby
[23:00:23] nofxx: has joined #ruby
[23:00:26] Ox0dea: "Tag" your messages and color the tag.
[23:00:51] irctc318: has joined #ruby
[23:00:55] jtdoncas: Hey guys! How do I add a dependency to my private gem that depends on another private gem (on github)? Is the only way a private gem server?
[23:00:56] shevy: Wag the dog and colour the tail?
[23:00:59] gcfhvjbkn: has joined #ruby
[23:01:38] gcfhvjbkn: has joined #ruby
[23:01:40] jhass: jtdoncas: pretty much, or you just add it and let bundler resolve it, requires to list both as git sources explicitly though
[23:01:47] jhass: ?guys jtdoncas
[23:01:47] ruboto: jtdoncas, You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
[23:02:05] shevy: could he not add a new source to gem itself?
[23:02:16] gcfhvjbkn: has joined #ruby
[23:02:17] jhass: sources are user configuration
[23:02:51] gcfhvjbkn: has joined #ruby
[23:03:05] jtdoncas: jhass: what do you mean to just add it?
[23:03:32] gcfhvjbkn: has joined #ruby
[23:03:34] jtdoncas: in the gemspec?
[23:04:02] mistym: has joined #ruby
[23:04:07] gcfhvjbkn: has joined #ruby
[23:04:19] jtdoncas: and how do I list as it as a git source?
[23:04:26] irctc318: hello i added a gem so i can access Parse.com data on Rails, and i created a file "parse.rb" containing https://gist.github.com/anonymous/2c4d44679d62379b2f0e and im getting back this in terminal when i do rails s "syntax error, unexpected keyword_end"
[23:04:48] gcfhvjbkn: has joined #ruby
[23:05:08] jtdoncas: irctc318: maybe that extra comma?
[23:05:23] gcfhvjbkn: has joined #ruby
[23:05:26] craysiii: really bothering me that I can't use { } grrrr.
[23:06:05] user1138: has joined #ruby
[23:06:23] irctc318: im getting this now "uninitialized constant MyApp (NameError)"
[23:06:41] gcfhvjbkn: has joined #ruby
[23:07:20] devoldmx: has joined #ruby
[23:07:25] gcfhvjbkn: has joined #ruby
[23:07:28] jtdoncas: what is MyApp?
[23:07:45] jtdoncas: jhass: I still don't understand man :(
[23:07:49] arooni: has joined #ruby
[23:07:53] GarethAdams: craysiii: rescue_from(Pundit::NotAuthorizedError) { |exception|
[23:08:33] GarethAdams: craysiii: but if you get used to do/end for multi-line blocks you'll end up feeling happier
[23:08:39] gcfhvjbkn: has joined #ruby
[23:08:39] irctc318: i followed this, http://stackoverflow.com/questions/31733094/keep-getting-client-method-undefined-when-running-rails-app/31733429#comment51403034_31733429
[23:08:42] craysiii: i will on my next project
[23:08:43] GarethAdams: or your money back
[23:08:52] craysiii: i dont feel like going through all my code though in this one and changing it
[23:08:53] Ox0dea: craysiii: That's what I meant about adding parentheses around the argument.
[23:09:29] craysiii: i didn't realize the exception was the argument. noob :(
[23:09:40] craysiii: thanks everyone
[23:09:45] Igorshp: has joined #ruby
[23:09:53] gcfhvjbkn: has joined #ruby
[23:10:30] Inside: has joined #ruby
[23:10:30] Inside: has joined #ruby
[23:10:31] Ox0dea: GarethAdams: When I'm at my most functional, I have a tendency to chain #map and #select and #reduce, and `end.` bothers me. Weirich's rule > line rule.
[23:10:34] gcfhvjbkn: has joined #ruby
[23:11:07] zenguy_pc: has joined #ruby
[23:11:19] gcfhvjbkn: has joined #ruby
[23:11:33] jtdoncas: irctc318: Replace MyApp with whatever module is defined in config/application.rb
[23:11:38] TeresaP: has joined #ruby
[23:11:42] devoldmx: has joined #ruby
[23:11:54] gcfhvjbkn: has joined #ruby
[23:12:22] zenguy_pc: has joined #ruby
[23:12:33] gcfhvjbkn: has joined #ruby
[23:12:46] MatthewsFace: has joined #ruby
[23:13:08] gcfhvjbkn: has joined #ruby
[23:13:10] jtdoncas: so am I fucked in that I can't require a private gem on github as a gem's dependency?
[23:13:11] hahuang61: has joined #ruby
[23:13:12] grios: has joined #ruby
[23:13:36] Phrogz: has joined #ruby
[23:13:46] gcfhvjbkn: has joined #ruby
[23:13:51] jhass: jtdoncas: you do use bundler or not?
[23:13:54] TeresaP: I'm saving some JSON data I've got in a JSON object to a file with File.write but it's adding => where we have :. Is there a setting to change that or do I have to reprocess the file to sub => for :?
[23:13:56] Thomas-0725: has joined #ruby
[23:14:25] gcfhvjbkn: has joined #ruby
[23:14:25] jhass: jtdoncas: and you have one of your gems as git source in your Gemfile, right?
[23:14:27] irctc318: yeah sounds like it was that, but now i get this "undefined method `create' for Parse:Module (NoMethodError)"
[23:14:47] bronson: has joined #ruby
[23:14:57] jtdoncas: no. You're saying I should add the git gem to my other gem's gemfile?
[23:15:02] gcfhvjbkn: has joined #ruby
[23:15:04] Phrogz: I want to create a headless service application that communicates through HTTP. I need to be able to configure how it starts up, e.g. to use an in-memory sqlite database during testing.
[23:15:09] Zai00: has joined #ruby
[23:15:09] jhass: jtdoncas: no
[23:15:19] jhass: jtdoncas: how do you use your gem in your project?
[23:15:26] Phrogz: I was going to use Sinatra + Thin, but I can't figure out how to pass command-line params for configuring the run from thin along.
[23:15:32] user1138_: has joined #ruby
[23:15:40] gcfhvjbkn: has joined #ruby
[23:15:50] jtdoncas: jhass: in my application's I point it to github
[23:16:17] Phrogz: Should I not use Thin? Just use Webrick?
[23:16:19] gcfhvjbkn: has joined #ruby
[23:16:19] jhass: jtdoncas: gem "foo", github: "bar/foo" is what I'd call a git source
[23:16:30] Kyuujitsu: has joined #ruby
[23:16:31] jtdoncas: jhass: yes I have that in my applications
[23:16:36] paulcsmith: has joined #ruby
[23:16:40] Ox0dea: ?jsonobject TeresaP
[23:16:40] ruboto: TeresaP, there is no such thing as a JSON object. You either have a String containing serialized JSON, or you have ruby objects (usually Hashes/Arrays/Strings). Which is it?
[23:16:40] jhass: (see how it helps to not be vague but specific?)
[23:16:57] gcfhvjbkn: has joined #ruby
[23:17:35] gcfhvjbkn: has joined #ruby
[23:17:36] jhass: jtdoncas: say your other gem is called bar, you add add_dependency "bar" to foo's .gemspec, and gem "bar", github: "bar/bar" to your _projects_ Gemfile
[23:17:36] TeresaP: I parsed the JSON with JSON.parse, then grabbed one of the Hash items and saved that.
[23:17:38] juanpablo_: has joined #ruby
[23:17:47] Ox0dea: TeresaP: You'll want Hash#to_json, then.
[23:17:47] jtdoncas: irctc318: That means you don't have a create method in your Parse gem. You should define the create method using def self.create
[23:17:55] ledestin: has joined #ruby
[23:18:07] TeresaP: Thanks Ox0dea, I guess that should've been obvious
[23:18:14] Ox0dea: Happy to help.
[23:18:27] jtdoncas: jhass: so my projects need to have knowledge of my gems dependencies?
[23:18:50] sdwrage: has joined #ruby
[23:18:52] gcfhvjbkn: has joined #ruby
[23:18:59] irctc318: shouldnt it come with the gem?
[23:19:02] mrmargolis: has joined #ruby
[23:19:27] gcfhvjbkn: has joined #ruby
[23:19:33] Ox0dea: TeresaP: There's also JSON.unparse for when you need generalized conversion and/or your fancy tickled.
[23:19:36] zenguy_pc: has joined #ruby
[23:20:07] gcfhvjbkn: has joined #ruby
[23:20:37] Phrogz: Maybe I should turn my request on its head: if YOU were going to write a little headless Ruby app that communicates to other apps over the network:
[23:20:42] Phrogz: a) Would you use HTTP, or sockets?
[23:20:44] gcfhvjbkn: has joined #ruby
[23:20:49] Phrogz: b) What libraries would you use?
[23:20:51] jtdoncas: irctc318: yeah it should, sorry I thought it was your own gem.
[23:21:19] gcfhvjbkn: has joined #ruby
[23:21:19] omegamike: has joined #ruby
[23:21:35] jhass: jtdoncas: if you don't have a gem source that provides them, yes. Rubygems can't build things from git repos, that's bundler's doing
[23:21:57] gcfhvjbkn: has joined #ruby
[23:21:58] jtdoncas: jhass: ah okay. thank you
[23:21:58] jhass: the other alternative is to fetch and gem build them by hand
[23:21:58] htmldrum: has joined #ruby
[23:22:05] Kyuujitsu: has joined #ruby
[23:22:15] jhass: but that won't integrate well into --path, bundle package and such
[23:22:16] irctc318: yeah so idk why its not reading client?
[23:22:37] gcfhvjbkn: has joined #ruby
[23:23:06] dimasg: has joined #ruby
[23:23:12] gcfhvjbkn: has joined #ruby
[23:23:30] hahuang61: has joined #ruby
[23:23:52] gcfhvjbkn: has joined #ruby
[23:24:19] djbkd: has joined #ruby
[23:24:25] jtdoncas: irctc318: did you define parse somewhere else? That's weird..
[23:24:32] gcfhvjbkn: has joined #ruby
[23:25:07] gcfhvjbkn: has joined #ruby
[23:25:17] blackmes1: has joined #ruby
[23:25:24] irctc318: i didnt define it anywhere else
[23:25:39] IceyEC: has joined #ruby
[23:25:46] gcfhvjbkn: has joined #ruby
[23:26:22] gcfhvjbkn: has joined #ruby
[23:26:41] TeresaP: God JSON.pretty_generate is beautiful
[23:27:01] gcfhvjbkn: has joined #ruby
[23:27:18] bootstrappm: has joined #ruby
[23:27:40] tejasmanohar_: has joined #ruby
[23:27:40] gcfhvjbkn: has joined #ruby
[23:28:13] jhass: TeresaP: also there as to_pretty_json iirc
[23:28:14] Kyuujitsu: has joined #ruby
[23:28:17] gcfhvjbkn: has joined #ruby
[23:28:56] jhass: mmh, no that's Crystal :D
[23:29:33] gcfhvjbkn: has joined #ruby
[23:29:40] TeresaP: Ha, that's ok
[23:29:47] _seanc_: has joined #ruby
[23:30:08] gcfhvjbkn: has joined #ruby
[23:30:48] gcfhvjbkn: has joined #ruby
[23:31:19] Ox0dea: There *is* JSON.pretty_unparse, though, which is... there.
[23:31:28] gcfhvjbkn: has joined #ruby
[23:32:04] gcfhvjbkn: has joined #ruby
[23:32:30] TeresaP: I couldn't find any unparse stuff
[23:32:32] Thomas-0725: has joined #ruby
[23:32:40] gcfhvjbkn: has joined #ruby
[23:33:19] Kyuujitsu: has joined #ruby
[23:33:21] gcfhvjbkn: has joined #ruby
[23:33:28] olas: has joined #ruby
[23:33:41] jhass: Ox0dea: I don't even...
[23:33:59] gcfhvjbkn: has joined #ruby
[23:34:21] jhass: at least we don't have pretty_parse I guess
[23:34:36] gcfhvjbkn: has joined #ruby
[23:34:47] casadei_: has joined #ruby
[23:35:14] gcfhvjbkn: has joined #ruby
[23:35:32] devdazed: has joined #ruby
[23:35:36] shock_one: has joined #ruby
[23:35:51] gcfhvjbkn: has joined #ruby
[23:36:29] gcfhvjbkn: has joined #ruby
[23:36:31] blueOxigen: has joined #ruby
[23:36:41] Mendenhall: has joined #ruby
[23:37:06] gcfhvjbkn: has joined #ruby
[23:37:44] gcfhvjbkn: has joined #ruby
[23:38:18] havenwood: has joined #ruby
[23:38:20] gcfhvjbkn: has joined #ruby
[23:38:59] gcfhvjbkn: has joined #ruby
[23:39:23] Kyuujitsu: has joined #ruby
[23:39:33] gcfhvjbkn: has joined #ruby
[23:40:15] gcfhvjbkn: has joined #ruby
[23:40:52] gcfhvjbkn: has joined #ruby
[23:41:18] irctc318: <jtdoncas> so i dont have it defined anywhere else
[23:41:31] gcfhvjbkn: has joined #ruby
[23:42:06] gcfhvjbkn: has joined #ruby
[23:42:47] gcfhvjbkn: has joined #ruby
[23:43:23] gcfhvjbkn: has joined #ruby
[23:43:58] gcfhvjbkn: has joined #ruby
[23:44:35] gcfhvjbkn: has joined #ruby
[23:45:03] Kyuujitsu: has joined #ruby
[23:45:12] gcfhvjbkn: has joined #ruby
[23:45:53] gcfhvjbkn: has joined #ruby
[23:46:28] gcfhvjbkn: has joined #ruby
[23:47:08] gcfhvjbkn: has joined #ruby
[23:47:43] gcfhvjbkn: has joined #ruby
[23:48:00] irctc318: can someone help me? im getting this error: "undefined method `create' for Parse:Module" , this is my parse.rb https://gist.github.com/anonymous/2c4d44679d62379b2f0e
[23:48:22] gcfhvjbkn: has joined #ruby
[23:49:03] gcfhvjbkn: has joined #ruby
[23:49:33] Radar: irctc318: Where is the Parse module defined?
[23:49:34] zenguy_pc: has joined #ruby
[23:49:41] gcfhvjbkn: has joined #ruby
[23:50:09] Radar: Or more accurately: where is the create method defined that you're expecting that you can call?
[23:50:16] Azure: has joined #ruby
[23:50:17] gcfhvjbkn: has joined #ruby
[23:50:22] irctc318: i dont know, i have just installed the gem and created a parse.rb file
[23:50:30] Radar: https://github.com/adelevie/parse-ruby-client#-note-
[23:50:37] Radar: Perhaps you should pay attention to the note?
[23:50:43] Radar: https://github.com/adelevie/parse-ruby-client/tree/v0.3.0
[23:50:56] gcfhvjbkn: has joined #ruby
[23:51:34] gcfhvjbkn: has joined #ruby
[23:51:40] christiandsg: has joined #ruby
[23:52:11] irctc318: i saw that, but didnt understand what it meant
[23:52:12] gcfhvjbkn: has joined #ruby
[23:52:47] gcfhvjbkn: has joined #ruby
[23:53:24] ellisTAA: has joined #ruby
[23:53:25] gcfhvjbkn: has joined #ruby
[23:54:03] tjohnson: has joined #ruby
[23:54:04] gcfhvjbkn: has joined #ruby
[23:54:09] mxrguspxrt: has joined #ruby
[23:54:14] Radar: The docs for the master branch != the docs for the most recently released gem version
[23:54:42] gcfhvjbkn: has joined #ruby
[23:55:08] Kyuujitsu: has joined #ruby
[23:55:17] gcfhvjbkn: has joined #ruby
[23:55:57] gcfhvjbkn: has joined #ruby
[23:56:00] irctc318: how should i configure my https://gist.github.com/anonymous/2c4d44679d62379b2f0e for this gem then
[23:56:37] gcfhvjbkn: has joined #ruby
[23:56:48] weemsledeux: has joined #ruby
[23:57:11] gcfhvjbkn: has joined #ruby
[23:57:21] Radar: Please look at the second link I posted. It shows you right htere.
[23:57:39] irctc318: but im on Rails, thats ruby
[23:57:49] Radar: You can lead a horse to water...
[23:57:51] gcfhvjbkn: has joined #ruby
[23:57:59] Radar: https://github.com/adelevie/parse-ruby-client/tree/v0.3.0#configuration
[23:58:02] Radar: Compare that with what you have
[23:58:11] Radar: Notice that it uses Parse.init and that you are instead using Parse.create
[23:58:16] Radar: So what do you think you should do in this circumstance?
[23:58:31] gcfhvjbkn: has joined #ruby
[23:59:06] gcfhvjbkn: has joined #ruby
[23:59:11] rickmasta: has joined #ruby
[23:59:44] gcfhvjbkn: has joined #ruby
[23:59:46] irctc318: change it to init i suppose
[23:59:47] zenguy_pc: has joined #ruby