« Back to channel list

#ruby - 23 September 2015

« Back 1 day Forward 1 day »
[00:00:19] platzhirsch: If it has a state, it's not functional
[00:00:50] Ox0dea: Programming is a subset of mathematics, not strictly equal to it.
[00:00:53] riskish: has joined #ruby
[00:03:03] platzhirsch: Well, I stand on that, I really don't mind. Even Haskell can't follow with this one completely through, especially when it comes to IO and usage of Monads, even they can't avoid introducing a state
[00:03:56] Ox0dea: platzhirsch: You stand on what? That truly functional programs should just make the machine run a little hotter?
[00:04:04] platzhirsch: You can call it false and put emphasis on it by ending it with a period . ;) but these are my definitions, I learned them this way in my studies, if you can point me to some thorough definitions that say otherwise, be my guest
[00:04:41] Ox0dea: > put emphasis on it by ending it with a period
[00:05:04] platzhirsch: What's wrong now?
[00:05:32] Ox0dea: It's rather tragic how quickly that interpretation has managed to spread.
[00:06:14] Ox0dea: Proplery ending sentences is now passive-aggressive.
[00:06:17] Ox0dea: *Properly
[00:06:35] platzhirsch: so tragic, fills me with sorrow every morning
[00:07:16] RegulationD: has joined #ruby
[00:07:22] Ox0dea: >> make_adder = -> n { -> x { n + x } }; add3 = make_adder[3]; add3[2]
[00:07:23] ruboto: Ox0dea # => 5 (https://eval.in/437794)
[00:07:36] cyrus_mc: has joined #ruby
[00:07:48] Ox0dea: platzhirsch: What stops us considering `add3` to be functional here?
[00:08:22] Eddieh_: has joined #ruby
[00:08:27] baweaver: has joined #ruby
[00:08:31] Ox0dea: There exists an obvious bijection between the inputs and the outputs.
[00:08:39] Ox0dea: Is that not the mathematical definition of a function?
[00:09:12] cyrus_mc: Looking at some code: https://github.com/puppetlabs/mcollective-puppet-agent/blob/master/util/puppet_agent_mgr.rb, line 115 where it references Puppet[:resourcefile]) I don't see where Puppet hash map (assuming that is what it is) is defined. This class doesn't inherit from another so where could it be finding that
[00:09:45] Ox0dea: cyrus_mc: Try seeing what `Puppet.method(:[])` resolves to.
[00:10:47] platzhirsch: Ox0dea: That's a great example, I would say nothing would stop us considering this functional, seems to satisfy all conditions
[00:11:13] Ox0dea: platzhirsch: Excellent. :)
[00:11:21] Ox0dea: cyrus_mc: It's for querying settings.
[00:11:43] ebragaparah: has joined #ruby
[00:11:58] tcopeland: has joined #ruby
[00:12:04] Ox0dea: cyrus_mc: http://git.io/vnwar
[00:12:27] Ox0dea: (Virtually) any object can have a #[] method.
[00:13:20] cyrus_mc: Ox0dea: I figured something like this .. but in the class I posted above I don't see it referencing this library (woudln't it need to include/require it or inherit this class or create an instance of that class to access it)
[00:13:31] cyrus_mc: doh .. just saw it
[00:13:58] Ox0dea: cyrus_mc: Not your fault; it was tucked away a bit.
[00:14:54] tkuchiki: has joined #ruby
[00:15:14] platzhirsch: But I never denied that Ruby doesn't incorporate functional programming aspects, I only said if it has a state it's not functional. That's why only add3 is functional, embedded in an imperative environment which relies on objects, states and order of execution
[00:16:36] Ox0dea: platzhirsch: I'm not sure I follow. You've conceded that `add3` is both functional and that it has state, which is a contradiction of your own terms.
[00:17:24] mary5030: has joined #ruby
[00:18:59] ramfjord: has joined #ruby
[00:19:12] howdoico1: has joined #ruby
[00:20:55] platzhirsch: sigh, the definition of add3 is functional, add3 itself is still an object
[00:21:21] devoldmx: has joined #ruby
[00:21:27] evanjs: has joined #ruby
[00:21:54] Ox0dea: platzhirsch: Then my initial question stands. Why isn't `add3` itself functional?
[00:22:14] Ox0dea: How does it violate the mathematical definition?
[00:22:53] workmad3: has joined #ruby
[00:23:41] michael_mbp: has joined #ruby
[00:23:41] solocshaw: has joined #ruby
[00:23:44] Adran: has left #ruby: ()
[00:23:47] Ropeney: has joined #ruby
[00:23:56] allcentury: has joined #ruby
[00:24:36] benlovell: has joined #ruby
[00:24:44] Ox0dea: (Spoiler alert: it doesn't.)
[00:24:50] quater-nyon: has joined #ruby
[00:24:56] tkuchiki: has joined #ruby
[00:25:01] platzhirsch: Because it depends on side-effects, it's not enough to just declare it. The function exists within the scope of an object, it needs that, in order to be invoked you have to make it part of a code that is executed in a procedural way
[00:25:59] Igorshp: has joined #ruby
[00:26:06] Ox0dea: platzhirsch: You've got it backwards. It's the "scope" that exists within the "function", so to speak.
[00:26:45] j4cknewt: has joined #ruby
[00:26:45] platzhirsch: If the order of execution doesn't matter, it's functional, but here the order is crucial so we get a result
[00:27:01] giuseppesolinas: has joined #ruby
[00:27:03] giuseppesolinas_: has joined #ruby
[00:27:06] casadei_: has joined #ruby
[00:28:17] paulcsmith: has joined #ruby
[00:29:29] Ox0dea: platzhirsch: The division "function" relies on some definition of "predecessor"; does that mean division isn't functional?
[00:29:32] platzhirsch: For me it would be strictly functional, if once declared and bound to it's name, it cannot be changed, because there is no order, no change possible, it's just declared as it is and that's the only thing that matters. The example is imperative, because all it's part have a state, that depend on each other, variable assignment, invoking the objects by sending methods to them here [](3)
[00:29:41] tatsuo: has joined #ruby
[00:29:55] Ox0dea: You're using a lot of words to say almost nothing of consequence.
[00:30:55] platzhirsch: You're talking about mathematical functions, where as I am talking about the functional programming paradigm
[00:31:02] platzhirsch: I guess that's where most of the confusion comes from
[00:31:19] Ox0dea: platzhirsch: It was you who initially declared that programs can't be functional in the mathematical sense.
[00:31:21] Ox0dea: Because state.
[00:31:42] asdasdas: has joined #ruby
[00:31:47] pipework: Ooh nerd-off!
[00:31:52] pipework: ACTION grabs the popcorn
[00:32:16] blackmesa: has joined #ruby
[00:32:58] rezzack: has joined #ruby
[00:33:26] platzhirsch: Ox0dea: Listen, you're absolutely right. I think you have very well demonstrated how smart you are, I mean that was the point of this whole discussion, who can outsmart who with his definitions, pretty mindless. But I am not too put off, at least it made me go through my old uni notes and read up again about how we defined that stuff, still love it
[00:33:39] asdasdas: has left #ruby: ()
[00:33:39] Ox0dea: Ad hominem means you lose, bud.
[00:34:04] d5sx43: has joined #ruby
[00:34:35] skweek: has joined #ruby
[00:34:48] ledestin: has joined #ruby
[00:35:06] platzhirsch: This basically screams for a Hitler comparison, just to make the Internet laugh
[00:35:42] platzhirsch: Yes Ox0dea, you won the argument
[00:35:44] platzhirsch: on the Internet
[00:36:05] Ox0dea: platzhirsch: But you learned something!
[00:36:11] Ox0dea: What a foolish thing about which to be butthurt.
[00:37:13] platzhirsch: You write very inflammatory
[00:37:55] bmurt: has joined #ruby
[00:38:16] cajone: has joined #ruby
[00:38:19] Ox0dea: Offense cannot be given.
[00:38:25] baweaver: has joined #ruby
[00:39:43] zenspider: has joined #ruby
[00:39:55] atomical: has joined #ruby
[00:40:14] zenspider: can I get someone to ping envy.zenspider.com ??
[00:40:46] platzhirsch: doesn't pong much
[00:40:50] zenspider: looks down, but I'm on shitty SF wireless
[00:40:52] zenspider: much, or at all?
[00:41:31] zenspider: actually, the fact that my proxy isn't holding "zenspider" here, means it's dead. how is it that it ONLY goes out when I trevel? I how does it know?
[00:42:14] platzhirsch: Hope it's not on a Raspberry Pi ;)
[00:42:54] jhass: well, comcast
[00:43:07] jhass: not too surprised I guess :P
[00:43:10] vdamewood: has joined #ruby
[00:43:20] zenspider: that was the next plan... call in and see if it is them or me
[00:43:35] jhass: I do get pretty far into their network though
[00:43:57] jhass: up to te-0-1-0-ten14.seattle.wa.seattle.comcast.net / e-0-1-1-ten14.seattle.wa.seattle.comcast.net
[00:43:59] zenspider: yeah, but I'm only 1 hop off the neighborhood trunk, so you can get all but
[00:45:37] jhass: smells like borked home router to nonetheless (or failed to update dyndns?)
[00:45:46] j4cknewt: has joined #ruby
[00:45:48] mary5030: has joined #ruby
[00:46:05] NeverDie: has joined #ruby
[00:47:03] craysiii: have you tried turning the flux capacitor off and on again?
[00:48:22] jhack: has joined #ruby
[00:50:15] stardiviner: has joined #ruby
[00:50:29] zenspider: cable is up. host is down. comcast business support can barely understand "ping" so... *shrug*
[00:51:37] workmad3: has joined #ruby
[00:53:17] zenspider: argh. luckily my neighbors have a key
[00:54:44] zenspider: ah. neighborhood lost power... my UPS may have stayed off
[00:55:13] craysiii: not a very good UPS :P
[00:55:48] zenspider: well... it can signal to the box to shutdown cleanly because it is running out. In those cases, I don't think the server comes back up when power is restored
[00:56:00] drbrain: it's been out for an hour or two now over there
[00:56:02] zenspider: tho, maybe I should have a scheduled "on" time, so it'll always recover if I just wait it out
[00:56:20] zenspider: drbrain: about as long as I've been trying to use shitty SF cafe networks. :)
[00:56:28] zenspider: was there weather or something?
[00:56:29] evanjs: has joined #ruby
[00:56:42] zenspider: I didn't hear about any storms
[00:56:42] tatsuo: has joined #ruby
[00:57:16] drbrain: a tree fell over randomly, it seems: https://twitter.com/SEACityLight/status/646474861720682496
[00:57:24] drbrain: the map says you should have power
[00:57:26] zenspider: hah. stupid tree
[00:57:53] zenspider: yeah. it's been restored, server jsut didn't come back up
[00:58:10] zenspider: I really should move it offsite so I can switch to fiber
[00:58:36] karapetyan: has joined #ruby
[00:58:52] drewvanstone: has joined #ruby
[00:59:13] zenspider: welp... guess I'm not releasing minitest today :)
[00:59:58] dravine: has joined #ruby
[01:00:35] casadei_: has joined #ruby
[01:00:50] renancarvalho: has joined #ruby
[01:00:55] rattatmatt: has joined #ruby
[01:03:14] RobertBirnie: has joined #ruby
[01:03:19] workmad3: has joined #ruby
[01:04:48] zenspider: hrm... should be back up :/
[01:04:54] Kricir: has joined #ruby
[01:04:57] platzhirsch: Any suggestions for this code to write it either shorter or more understandable? https://gist.github.com/platzhirsch/41326d2df2dd631470ce Personally I'd just hack it in one line, but that won't help others really understand what's going on. It basically padds up a certain number with zeros if there are not enough and converts the number to a base 36
[01:05:17] tatsuo: has joined #ruby
[01:05:32] Kricir: has joined #ruby
[01:05:35] jackjackdripper1: has joined #ruby
[01:05:48] tjbiddle: has joined #ruby
[01:06:06] zenspider: platzhirsch: `ri String.rjust`
[01:06:39] zenspider: oops. ljust
[01:06:45] zenspider: >> ("12".ljust 6, "0").to_i.to_s 16
[01:06:46] ruboto: zenspider # => "1d4c0" (https://eval.in/437809)
[01:06:55] platzhirsch: oh boy, why haven't I thought of ljust, good one zenspider
[01:07:27] NeverDie: has joined #ruby
[01:07:43] platzhirsch: also handles negative values, much better
[01:08:59] zenspider: mmm... that'll pad to the wrong amount
[01:09:09] zenspider: assuming you always want 6 digits
[01:10:24] platzhirsch: oh no, just a minimum basically
[01:11:07] swgillespie: has joined #ruby
[01:11:28] mary5030: has joined #ruby
[01:12:51] RobertBirnie: has joined #ruby
[01:16:10] platzhirsch: 9% packet loss sir
[01:16:50] platzhirsch: everything is turned off on your web server
[01:17:41] zenspider: all back up it seems
[01:18:09] zenspider: has joined #ruby
[01:18:19] shum: has joined #ruby
[01:19:02] Rodya_: has joined #ruby
[01:19:37] wallerdev: has joined #ruby
[01:23:33] dopamean_: has joined #ruby
[01:24:39] Rodya_: has joined #ruby
[01:25:01] freerobby: has joined #ruby
[01:26:47] PlasmaStar: has joined #ruby
[01:26:48] Joufflu: has joined #ruby
[01:27:22] bronson: has joined #ruby
[01:29:10] Kricir: has left #ruby: ()
[01:30:44] tkuchiki: has joined #ruby
[01:30:46] ICantCook: Is there a general webdev chan on freenode?
[01:31:42] michael_mbp: has joined #ruby
[01:32:39] iamninja: has joined #ruby
[01:33:39] BraddPitt: i think #webdev ICantCook
[01:33:41] BraddPitt: not certain though
[01:34:25] renderful: has joined #ruby
[01:34:26] blackmesa: has joined #ruby
[01:36:33] bmurt: has joined #ruby
[01:37:41] mary5030: has joined #ruby
[01:37:44] Feyn: has joined #ruby
[01:38:33] mary5030: has joined #ruby
[01:39:18] beauby: When defining a block, when is the method resolution happening? When the block is ran?
[01:39:29] beauby: (for methods inside the block)
[01:41:01] opensource_ninja: has joined #ruby
[01:41:12] michael_mbp: has joined #ruby
[01:44:53] Rodya_: has joined #ruby
[01:47:33] jdawgaz: has joined #ruby
[01:48:57] meatherly: has joined #ruby
[01:49:05] ngscheurich: has joined #ruby
[01:49:12] bkulbida: has joined #ruby
[01:51:16] andybernard: has joined #ruby
[01:52:18] andybernard: does anyone know how to save "/" in mongoid?
[01:55:27] diegoviola: has joined #ruby
[01:58:15] bronson: has joined #ruby
[01:58:39] Respek: has joined #ruby
[01:59:45] freerobby1: has joined #ruby
[02:02:54] luckyme: has joined #ruby
[02:04:04] arescorpio: has joined #ruby
[02:05:59] ariedler: has joined #ruby
[02:06:33] timanema: has joined #ruby
[02:07:37] eat_multi: has joined #ruby
[02:10:03] swgillespie: has joined #ruby
[02:11:12] michael_mbp: has joined #ruby
[02:11:19] tjbiddle: has joined #ruby
[02:12:40] beauby: centrx: how about doing `def g; yield; end; def f; g do yield; end; end`, will the implicit block be resolved in f or in g?
[02:12:57] benlovell: has joined #ruby
[02:15:05] workmad3: has joined #ruby
[02:15:11] agent_white: has joined #ruby
[02:18:02] ddrmanxbxfr: has joined #ruby
[02:18:30] jimmybomb1: has joined #ruby
[02:18:43] jimmybomb1: hey guys, im developing a web api and im having a debate with my colleagues whether we should put guid in our 'GET' urls.. do you guys think this is a smell? if it is what are the alternatives to put in get urls (assuming that all our resources already have guid assigned to them as their id)?
[02:20:18] crdpink2: has joined #ruby
[02:20:24] beauby: jimmybomb1: This question is probably more suited to #rubyonrails, or a more general purpose webdev channel
[02:20:53] jimmybomb1: alright thanks
[02:20:55] wldcordeiro: has joined #ruby
[02:21:02] dopamean_: has joined #ruby
[02:21:49] crdpink: has joined #ruby
[02:22:07] devoldmx: has joined #ruby
[02:22:29] bruno-: has joined #ruby
[02:26:36] pontiki: has joined #ruby
[02:27:17] Ox0dea: >> def g; yield; end; def f; g do yield; end; end; f { caller[0, 3] } # beauby
[02:27:18] ruboto: Ox0dea # => ["/tmp/execpad-3ef329ea5a54/source-3ef329ea5a54:2:in `block in f'", "/tmp/execpad-3ef329ea5a54/sourc ...check link for more (https://eval.in/437821)
[02:27:26] Ox0dea: Dammit. I forgot that'd be so ugly.
[02:27:42] cantaberry: has joined #ruby
[02:28:14] crdpink: has joined #ruby
[02:28:29] jtoy: is "Class#method" is just a convention but no actual meaning? I notice on rails route there is this 'class#method'
[02:28:31] meatherly: has joined #ruby
[02:29:00] Ox0dea: jt__: Right, it's just notational convention for instance methods.
[02:29:23] crdpink: has joined #ruby
[02:29:39] jtoy: how about the former the one on rails route? e.g get 'link' => 'link#new'
[02:30:34] ryez: has joined #ruby
[02:31:03] aghalarp: has joined #ruby
[02:32:06] Ox0dea: jt__: Same meaning, for all intensive porpoises.
[02:32:35] scoot: has joined #ruby
[02:32:43] jtoy: ok, thanks
[02:34:04] beauby: >> class A; def self.a(&block); Class.new do block.call; end; end; class B < A; a do p self; end; # Ox0dea
[02:34:05] ruboto: beauby # => /tmp/execpad-3df07b561a1f/source-3df07b561a1f:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/437822)
[02:34:39] beauby: >> class A; def self.a(&block); Class.new do block.call; end; end; end; class B < A; a do p self; end; # Ox0dea
[02:34:41] ruboto: beauby # => /tmp/execpad-35c10e772dae/source-35c10e772dae:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/437823)
[02:34:51] Ox0dea: beauby: One more. :P
[02:34:52] beauby: Damn, sorry, I have to get better at one-lining ruby
[02:35:27] beauby: >> class A; def self.a(&block); Class.new do block.call; end; end; end; class B < A; a do p self; end; end; # Ox0dea
[02:35:28] ruboto: beauby # => B ...check link for more (https://eval.in/437824)
[02:35:40] beauby: And that's what I nailed my issue down to
[02:35:58] beauby: I want `self` to be that of `Class.new` here
[02:36:25] beauby: I had some hope it would be some implicit blocks limitation when I started with yield, but it seems to make no difference
[02:37:16] stardiviner: has joined #ruby
[02:37:23] Ox0dea: beauby: Are you sure you want to call the block and have that be the body of the class?
[02:37:33] beauby: Ox0dea: yes I am
[02:38:18] Ox0dea: beauby: I'm pretty sure #instance_eval could be finagled into doing your monstrous bidding.
[02:39:12] tejasmanohar: has joined #ruby
[02:40:03] beauby: Ox0dea: Thanks, I'll look that up. Basically what I'd like to achieve is, inside a class `B < A`, having a class method from `A`, let's say `implicit_define_class` called like `implicit_define_class do ... end`, that would actually create a class inside `A`, with body what's provided in the given block
[02:40:16] aghalarp: has joined #ruby
[02:41:34] beauby: >> class A; def self.a(&block); Class.new.instance_eval do block.call; end; end; end; class B < A; a do p self; end; end; # Ox0dea
[02:41:35] ruboto: beauby # => B ...check link for more (https://eval.in/437825)
[02:43:18] redondo: has joined #ruby
[02:44:37] beauby: Thing is, if I directly do `p self` inside the `Class.new do ... end`, it does not output `B`
[02:44:52] beauby: >> class A; def self.a(&block); Class.new.instance_eval do p self; end; end; end; class B < A; a do p self; end; end; # Ox0dea
[02:44:53] ruboto: beauby # => #<Class:0x407a3c18> ...check link for more (https://eval.in/437826)
[02:45:20] beauby: Which somehow gives me hope I can make it work, but I have to understand what's going on with the blocks a bit better
[02:46:50] meatherly: has joined #ruby
[02:49:17] mary5030: has joined #ruby
[02:49:30] yosafbridge: has joined #ruby
[02:50:45] mdih: has joined #ruby
[02:54:10] howdoico1: has joined #ruby
[02:54:22] fastAndSlow: has joined #ruby
[02:56:31] beauby: >> class A; def self.a(&block); c = Class.new; c.instance_eval &block; end; end; class B < A; a do p self; end; end; # Ox0dea
[02:56:32] ruboto: beauby # => #<Class:0x40833cc8> ...check link for more (https://eval.in/437830)
[02:57:10] beauby: Woohoo, thanks a lot for the suggestion Ox0dea! Now onto understanding why it didn't work with the block.call inside the do..end
[02:58:09] psye: has joined #ruby
[02:59:09] j4cknewt: has joined #ruby
[03:00:50] mrtomme: has joined #ruby
[03:00:57] gener1c: has joined #ruby
[03:03:39] drewvanstone: has joined #ruby
[03:04:46] nettoweb: has joined #ruby
[03:07:27] baweaver: has joined #ruby
[03:09:44] bronson: has joined #ruby
[03:10:29] braincrash: has joined #ruby
[03:10:54] swgillespie: has joined #ruby
[03:11:42] Rodya_: has joined #ruby
[03:12:17] j4cknewt: has joined #ruby
[03:13:28] darkf: has joined #ruby
[03:16:27] voltalio: has joined #ruby
[03:19:50] meatherly: has joined #ruby
[03:22:20] jackjackdripper: has joined #ruby
[03:24:23] kies^: has joined #ruby
[03:25:12] michael_mbp: has joined #ruby
[03:25:44] karapetyan: has joined #ruby
[03:27:37] llua: has joined #ruby
[03:28:36] llua: !tutorial
[03:30:42] michael_mbp: has joined #ruby
[03:31:44] Pupeno: has joined #ruby
[03:32:00] tkuchiki: has joined #ruby
[03:33:11] ckuhn: has joined #ruby
[03:33:41] iamninja: has joined #ruby
[03:33:54] gix: has joined #ruby
[03:34:43] ckuhn: is jruby ultra slow for anyone else?
[03:39:37] karapetyan: has joined #ruby
[03:41:45] djbkd: has joined #ruby
[03:42:12] scoot_: has joined #ruby
[03:42:19] zotherstupidguy: has joined #ruby
[03:45:14] vjdhama: has joined #ruby
[03:45:40] vjdhama: has joined #ruby
[03:49:37] agent_white: has joined #ruby
[03:49:39] eam: ckuhn: to start?
[03:49:50] ckuhn: To compile and run
[03:50:05] baweaver: JVM is like that regardless
[03:50:11] scoot: has joined #ruby
[03:50:15] baweaver: crap start time, but decent over distances
[03:50:15] eam: yeah you're looking at the jvm startup overhead
[03:50:26] ckuhn: I guess I didn't notice because java is already compiled
[03:50:36] eam: ckuhn: it should be faster for a server which is started once and runs long
[03:52:28] havenwood: has joined #ruby
[03:52:33] howdoi: has joined #ruby
[03:55:19] howdoico1: has joined #ruby
[03:55:33] Ox0dea: beauby: Still about?
[03:55:52] vjdhama_: has joined #ruby
[03:56:12] favadi: has joined #ruby
[03:58:11] benlovell: has joined #ruby
[03:58:56] drewvanstone: has joined #ruby
[03:59:15] bnagy: I can't find a pretty way to strip an optional string prefix :/
[03:59:33] bnagy: >> ".foo".reverse.chomp('.').reverse
[03:59:34] ruboto: bnagy # => "foo" (https://eval.in/437835)
[03:59:44] Ox0dea: bnagy: Allergic to Regexp?
[03:59:51] Ox0dea: How come?
[03:59:57] aghalarp: has joined #ruby
[03:59:59] bnagy: not pretty :)
[04:00:12] voltalio: has joined #ruby
[04:03:08] workmad3: has joined #ruby
[04:03:09] eam: pretty in terms of compute efficiency or pretty in terms of "someone with a liberal arts degree can easily read it?"
[04:04:02] bnagy: I have a liberal arts degree :`(
[04:04:21] baweaver: just use regex
[04:04:31] bnagy: but performance is not a factor at all here
[04:04:33] ckuhn: its not that hard
[04:04:39] baweaver: being concerned with how "pretty" code is is asinine
[04:04:59] diegoviola: has joined #ruby
[04:05:01] bnagy: that's kind of contentious
[04:05:18] bnagy: but I am not particularly interested in fighting about it
[04:05:18] ckuhn: ease of coding >
[04:05:34] benlieb: has joined #ruby
[04:05:36] ckuhn: then performance
[04:05:38] ckuhn: for most things
[04:07:20] Ox0dea: ckuhn: Greater than nothing?
[04:07:39] ckuhn: greater than everything lols
[04:07:53] devoldmx: has joined #ruby
[04:08:53] RegulationD: has joined #ruby
[04:09:05] polly_wog: has joined #ruby
[04:09:13] rickmasta: has joined #ruby
[04:10:49] bronson: has joined #ruby
[04:17:51] Macaveli: has joined #ruby
[04:18:57] nettoweb: has joined #ruby
[04:19:57] tejasmanohar: has joined #ruby
[04:20:08] dopie: has joined #ruby
[04:21:37] howdoico1: has joined #ruby
[04:23:10] dopieee: has joined #ruby
[04:25:57] timanema: has joined #ruby
[04:28:21] scoot: has joined #ruby
[04:30:58] devoldmx: has joined #ruby
[04:34:04] krz: has joined #ruby
[04:35:02] _blizzy_: has joined #ruby
[04:36:12] michael_mbp: has joined #ruby
[04:38:41] Technodrome: has joined #ruby
[04:40:14] eat_multi: has joined #ruby
[04:41:20] jackjackdripper: has joined #ruby
[04:41:53] j4cknewt: has joined #ruby
[04:43:28] x-light: has joined #ruby
[04:44:42] michael_mbp: has joined #ruby
[04:45:20] sunone: has joined #ruby
[04:47:32] tkuchiki: has joined #ruby
[04:56:12] karapetyan: has joined #ruby
[04:59:00] yfeldblum: has joined #ruby
[05:00:38] voltalio: has joined #ruby
[05:02:05] favadi: has joined #ruby
[05:02:18] yfeldblum: has joined #ruby
[05:03:35] vjdhama: has joined #ruby
[05:04:20] paracr4ck: has left #ruby: ("Leaving")
[05:05:35] sanjayu: has joined #ruby
[05:07:40] vjdhama: has joined #ruby
[05:09:24] bluOxigen: has joined #ruby
[05:09:55] bronson: has joined #ruby
[05:16:31] ndrei: has joined #ruby
[05:16:38] shevy: bnagy string[0,1]= '' is acceptable?
[05:16:43] karapetyan: has joined #ruby
[05:16:54] mdih: has joined #ruby
[05:17:27] mdih: has joined #ruby
[05:18:15] bnagy: no, because it's an _optional_ prefix. Basically I want lchomp to exist.
[05:20:00] baweaver: you mean like lstrip?
[05:20:40] bnagy: yes, except like chomp
[05:20:52] dhjondoh: has joined #ruby
[05:21:31] bnagy: I mean, I used sub in the end, I couldn't bring myself to actually do reverse chomp reverse
[05:23:41] vjdhama: has joined #ruby
[05:28:14] ruurd: has joined #ruby
[05:28:22] timanema: has joined #ruby
[05:29:55] Technodrome: has joined #ruby
[05:32:04] aganov: has joined #ruby
[05:33:43] michael_mbp: has joined #ruby
[05:34:24] iamninja: has joined #ruby
[05:34:26] swgillespie: has joined #ruby
[05:35:30] codenapper: has joined #ruby
[05:35:34] tagrudev: has joined #ruby
[05:36:30] renderful: has joined #ruby
[05:38:37] mdih: has joined #ruby
[05:39:15] vjdhama: has joined #ruby
[05:39:56] MyMind: has joined #ruby
[05:41:21] zapata: has joined #ruby
[05:43:33] rattatmatt: has joined #ruby
[05:47:39] vjdhama: has joined #ruby
[05:51:18] workmad3: has joined #ruby
[05:52:10] Ox0dea: has joined #ruby
[05:52:16] ttilley: has joined #ruby
[05:52:21] ttilley: has joined #ruby
[05:53:01] Ox0dea: bnagy: Some cursory benchmarking says str[//] + $' is best.
[05:54:13] Ox0dea: >> 'abcfoo'[/^abc/]; $'
[05:54:14] ruboto: Ox0dea # => "foo" (https://eval.in/437844)
[05:54:19] Ox0dea: >> 'deffoo'[/^abc/]; $'
[05:54:20] ruboto: Ox0dea # => nil (https://eval.in/437845)
[05:55:03] Fraeon: has joined #ruby
[05:55:48] Ox0dea: Whoops. I forgot I defined #lchomp in terms of #lchomp!.
[05:56:59] vjdhama: has joined #ruby
[06:00:29] DoubleMalt: has joined #ruby
[06:00:33] last_staff: has joined #ruby
[06:01:16] coffeecupp: has joined #ruby
[06:03:30] amystephen: has joined #ruby
[06:06:42] Xeago: has joined #ruby
[06:06:46] WizJin: has joined #ruby
[06:08:57] shevy: might be worth a try to suggest it for core to add, in the event that nobody suggested a .lchomp variant yet
[06:11:46] alexUaN: has joined #ruby
[06:13:06] zenspider: bnagy: regexp slice assignment?
[06:13:48] Macaveli: has joined #ruby
[06:13:49] zenspider: oops. needs to match or it raises. n/m
[06:14:00] yfeldblum: has joined #ruby
[06:15:37] yfeldblum: has joined #ruby
[06:16:16] karapetyan: has joined #ruby
[06:17:09] eGGsha: has joined #ruby
[06:19:28] pusewicz: has joined #ruby
[06:21:19] shinnya: has joined #ruby
[06:22:22] emilkarl: has joined #ruby
[06:24:05] arup_r: has joined #ruby
[06:24:07] tangentstorm: oh, hey! can we get this ruboto fellow to come hang out in #learnprogramming ?
[06:24:15] bruno-: has joined #ruby
[06:25:19] codecop: has joined #ruby
[06:25:37] baweaver: it's a bot y'know
[06:26:46] hal_9000_: has joined #ruby
[06:27:44] weemsledeux: has joined #ruby
[06:31:31] firstdayonthejob: has joined #ruby
[06:31:39] atmosx_laptop: has joined #ruby
[06:32:39] sunone: has left #ruby: ("Leaving")
[06:33:04] jenrzzz: has joined #ruby
[06:33:15] unclouded: has joined #ruby
[06:33:49] Musashi007: has joined #ruby
[06:33:54] keen____: has joined #ruby
[06:35:04] pen: has joined #ruby
[06:35:19] ramfjord: has joined #ruby
[06:36:30] ElSif: has joined #ruby
[06:37:30] tvw: has joined #ruby
[06:37:32] Gnomethrower: has joined #ruby
[06:37:32] Gnomethrower: has joined #ruby
[06:37:43] michael_mbp: has joined #ruby
[06:39:43] shevy: don't let him steal ruboto!!!
[06:40:12] vjdhama: has joined #ruby
[06:42:04] Xeago: has joined #ruby
[06:44:13] aswen: has joined #ruby
[06:45:40] opensource_ninja: has joined #ruby
[06:46:15] Apomelasma: has joined #ruby
[06:46:23] sanjayu: has joined #ruby
[06:48:11] solars: has joined #ruby
[06:48:52] ttilley: has joined #ruby
[06:48:52] ttilley: has joined #ruby
[06:49:24] marvin81: has joined #ruby
[06:49:56] voker57: has joined #ruby
[06:50:04] Biohazard: has joined #ruby
[06:50:47] Biohazard: has joined #ruby
[06:52:14] Biohazard: has joined #ruby
[06:54:10] skullcrasher: has joined #ruby
[06:54:56] prasselpikachu: has joined #ruby
[06:55:08] ta: has joined #ruby
[06:55:24] ta: has joined #ruby
[06:55:25] ICantCook: has joined #ruby
[06:55:28] Xeago: has joined #ruby
[06:55:36] scoot: has joined #ruby
[06:55:54] ICantCook: what's the ruby equivilent of python -m "some_code" ?
[06:56:03] ICantCook: to run a single line of ruby code from the shell
[06:56:47] null__: ruby -e ""
[06:56:55] null__: http://linux.die.net/man/1/ruby
[06:57:07] ICantCook: null__: thanks
[06:57:24] jas02: has joined #ruby
[06:58:15] ruurd: has joined #ruby
[07:00:57] aibot: has joined #ruby
[07:01:11] crdpink2: has joined #ruby
[07:02:09] drawesome: has joined #ruby
[07:02:51] mike___1234: has joined #ruby
[07:03:18] tomaz_b: has joined #ruby
[07:04:01] blackmesa: has joined #ruby
[07:04:51] ankr: has joined #ruby
[07:06:06] opensource_ninja: has joined #ruby
[07:06:44] Pupeno: has joined #ruby
[07:07:44] AccordLTN: has joined #ruby
[07:10:00] SylarRuby: has joined #ruby
[07:10:29] mike___1234: has joined #ruby
[07:11:20] iamninja: has joined #ruby
[07:11:35] bronson: has joined #ruby
[07:17:05] agent_meerkat: has joined #ruby
[07:17:15] TheHodge: has joined #ruby
[07:19:49] slayerjain: has joined #ruby
[07:20:11] KervyN: gosh peta.. http://motherboard.vice.com/read/peta-sues-for-copyright-on-behalf-of-selfie-taking-monkey :-/
[07:20:38] scoot: has joined #ruby
[07:21:54] jgt: has joined #ruby
[07:22:35] SCHAAP137: has joined #ruby
[07:23:05] shevy: the picture looks so fake
[07:23:43] bnagy: Ox0dea: ha. That regex is the same as using sub but I don't use crazy perl globals :)
[07:23:46] KervyN: like every selfy
[07:23:53] bnagy: the $' is cute though, I didn't know that one
[07:24:10] bnagy: ACTION saves up for golf
[07:25:20] jenrzzz: has joined #ruby
[07:27:12] michael_mbp: has joined #ruby
[07:27:49] sabrehagen: has joined #ruby
[07:28:59] sabrehagen: i've never use a ruby gem before. i just typed `gem install pdf-extract` which succeeded, now typing `pdf-extract` as per the docs yeilds "command not found". how do i use the gem? (https://github.com/CrossRef/pdfextract)
[07:29:52] youngbaks: has joined #ruby
[07:30:43] Janno: Could you run 'ruby -v' and 'gem list'
[07:30:53] Janno: gem list shows all installed gems
[07:31:05] sabrehagen: ruby -v: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
[07:31:13] sabrehagen: gem list shows pdf-extract as installed
[07:31:27] vjdhama: has joined #ruby
[07:32:19] UtkarshRay: has joined #ruby
[07:32:20] sabrehagen: another gem installed is rake. typing `rake` runs rake as expected.
[07:33:22] agent_white: sabrehagen: Not all gems are executables.
[07:33:49] agent_white: sabrehagen: http://guides.rubygems.org/rubygems-basics/#viewing-documentation
[07:34:35] Janno: You could also check if echo $PATH gives you bin folder that has 'pdf-extract' in it.
[07:34:44] nso95: has joined #ruby
[07:34:46] shevy: sabrehagen for that command to work, the file bin/pdf-extract must exist
[07:35:24] benlovell: has joined #ruby
[07:35:28] shevy: if that file exists and the command does not work then it is not in the $PATH
[07:35:30] sabrehagen: shevy: where is bin/pdf-extract likely to be located? i.e. what's the prefix to that path?
[07:36:01] shevy: normally if you have as --prefix /usr it should work as-is; have a look at "gem env" output
[07:36:31] shevy: all .gem files will also be in the cache/ subdirectory... --prefix-here/lib/ruby/gems/2.2.0/cache/
[07:36:44] rickmasta: has joined #ruby
[07:36:47] Igorshp: has joined #ruby
[07:36:53] keen_____: has joined #ruby
[07:37:24] shevy: sabrehagen I assume you use something like chruby or rbenv or rvm?
[07:37:35] shevy: I just installed pdf-extract, it works for me without having to modify $PATH
[07:38:16] sabrehagen: shevy: thanks for trying that. interestingly, directory listing of /usr/lib/ruby/gems/2.2.0/gems/ which was given by gem env shows:
[07:38:19] sabrehagen: maruku-0.7.2 power_assert-0.2.2 rdoc-4.2.0 test-unit-3.0.8
[07:38:20] sabrehagen: minitest-5.4.3 rake-10.4.2 sass-3.4.14 yard-0.8.7.6
[07:38:31] shevy: ah so you have /usr as prefix
[07:38:39] shevy: that is strange, it should work without any modifications
[07:38:49] shevy: gem env does not list it?
[07:39:04] shevy: do you have multiple different ruby versions?
[07:39:29] workmad3: has joined #ruby
[07:40:02] mdih: has joined #ruby
[07:40:46] mdih: has joined #ruby
[07:40:47] pecpec: has joined #ruby
[07:40:50] dmolina: has joined #ruby
[07:41:30] User458764: has joined #ruby
[07:42:21] shevy: agent_white, agent_meerkat is here
[07:42:55] sabrehagen: shevy: after trying to install again i received the message "You don't have /home/user/.gem/ruby/2.2.0/bin in your PATH"
[07:43:08] sabrehagen: so back to your path suggestion
[07:43:14] agent_white: agent_meerkat: Greetings, colleague!
[07:43:47] agent_white: shevy: The Main Office must be leaking. :D
[07:43:48] sabrehagen: shevy: i misunderstood the gem env output
[07:44:22] greenarrow: has joined #ruby
[07:49:55] lxsameer: has joined #ruby
[07:50:01] timonv: has joined #ruby
[07:50:13] workmad3: has joined #ruby
[07:51:07] Salehi: has joined #ruby
[07:53:13] ruurd: has joined #ruby
[07:53:14] Spami: has joined #ruby
[07:55:22] zenspider: has joined #ruby
[08:01:06] coffeecupp: has joined #ruby
[08:01:40] drptbl: has joined #ruby
[08:01:58] giuseppesolinas: has joined #ruby
[08:02:13] giuseppesolinas_: has joined #ruby
[08:02:57] c0m0: has joined #ruby
[08:04:58] ljarvis: >> {}.merge(Class.new { def to_hash; { some: "stuff" } end }.new)
[08:04:59] ruboto: ljarvis # => {:some=>"stuff"} (https://eval.in/437972)
[08:05:04] ljarvis: >> {}.merge(Class.new { def to_h; { some: "stuff" } end }.new)
[08:05:05] ruboto: ljarvis # => no implicit conversion of #<Class:0x42477fd8> into Hash (TypeError) ...check link for more (https://eval.in/437973)
[08:05:47] startupality: has joined #ruby
[08:09:14] apeiros: so to_h/to_hash is similar to to_i/to_int?
[08:09:43] Xeago: has joined #ruby
[08:10:26] RegulationD: has joined #ruby
[08:12:02] AccordLTN: has joined #ruby
[08:12:28] bronson: has joined #ruby
[08:13:11] blackmesa: has joined #ruby
[08:18:16] drewvanstone: has joined #ruby
[08:19:04] Hounddog: has joined #ruby
[08:19:57] BMW365: has joined #ruby
[08:19:57] EXID123_: has joined #ruby
[08:20:12] michael_mbp: has joined #ruby
[08:21:04] rickmasta: has joined #ruby
[08:21:26] jgt1: has joined #ruby
[08:21:26] schlubbi: has joined #ruby
[08:21:41] 1JTAACCFM: has joined #ruby
[08:21:41] giuseppesolinas: has joined #ruby
[08:23:28] ljarvis: but different from to_a/to_ary
[08:24:30] Hounddog: has joined #ruby
[08:26:07] Janno: Lol I made whole android app just to catch push notifications and now I heard that chrome has implemented push notification api...
[08:27:17] vjdhama: has joined #ruby
[08:27:39] ruurd: has joined #ruby
[08:28:12] marr: has joined #ruby
[08:28:57] UtkarshRay: has joined #ruby
[08:29:44] chthon: has joined #ruby
[08:31:36] rdark: has joined #ruby
[08:32:51] tomphp: has joined #ruby
[08:33:25] startupality: has joined #ruby
[08:34:00] krisquigley: has joined #ruby
[08:34:45] subshad: has joined #ruby
[08:35:01] j4cknewt: has joined #ruby
[08:35:16] pocketprotector: has joined #ruby
[08:37:47] einarj: has joined #ruby
[08:38:12] atmosx_laptop: has joined #ruby
[08:39:28] scoot: has joined #ruby
[08:39:59] Technodrome: has joined #ruby
[08:40:18] workmad3: has joined #ruby
[08:40:47] karapetyan: has joined #ruby
[08:41:01] giuseppesolinas: has joined #ruby
[08:41:01] 32NAAFAD3: has joined #ruby
[08:41:57] certainty: as the world turns :)
[08:42:04] burgestrand: has joined #ruby
[08:43:20] startupality: has joined #ruby
[08:47:43] michael_mbp: has joined #ruby
[08:47:45] apeiros: ljarvis: hm, interesting, yes. Array#concat e.g. does not try to use to_ary
[08:48:11] apeiros: (forgot to call .new)
[08:48:25] apeiros: >> ary=1,2,3;ary.concat(Class.new{def to_ary; [4,5,6];end}.new)
[08:48:27] ruboto: apeiros # => [1, 2, 3, 4, 5, 6] (https://eval.in/438047)
[08:48:32] apeiros: >> ary=1,2,3;ary.concat(Class.new{def to_a; [4,5,6];end}.new)
[08:48:33] ruboto: apeiros # => no implicit conversion of #<Class:0x4112fee4> into Array (TypeError) ...check link for more (https://eval.in/438048)
[08:48:43] tkuchiki: has joined #ruby
[08:49:07] apeiros: ljarvis: where did you see differences appear?
[08:49:24] davedev24: has joined #ruby
[08:50:17] beast: has joined #ruby
[08:51:42] tjbiddle: has joined #ruby
[08:52:18] tvw: has joined #ruby
[08:52:37] amystephen: has joined #ruby
[08:53:04] UtkarshRay: has joined #ruby
[08:53:12] michael_mbp: has joined #ruby
[08:53:27] Xeago: has joined #ruby
[08:53:55] rikkipitt: has joined #ruby
[08:55:23] avelldiroll: has joined #ruby
[08:57:25] leafybasil: has joined #ruby
[08:58:26] leafybas_: has joined #ruby
[08:58:41] Iskarlar: has joined #ruby
[08:59:25] sheepman: has joined #ruby
[08:59:43] platzhirsch: has joined #ruby
[09:00:09] sheepman: hi all, whats the best way of getting the pid of a running process (i.e. not the pid of the ruby script thats running) ?
[09:01:22] devoldmx: has joined #ruby
[09:01:41] Stan: has joined #ruby
[09:01:59] adaedra: A process you started? A random process on the system?
[09:02:00] benlovell: has joined #ruby
[09:02:04] Iskarlar: has left #ruby: ()
[09:02:46] sheepman: Random process
[09:03:46] blackmesa: has joined #ruby
[09:04:32] sheepman: looks like sys-proctable to me but i was hoping for something simpler as in, without pulling in an additional gem
[09:04:49] certainty: depends on what you know about the process
[09:05:09] certainty: also /proc is pretty accessible
[09:05:10] keksi_: has joined #ruby
[09:05:23] sepp2k: has joined #ruby
[09:05:25] sheepman: certainty, i guess pgrep will work for me
[09:05:38] sheepman: just wanted to stick inside ruby but meh :)
[09:05:58] keksi_: hey, im using rbenv for handling my ruby versions. rbenv says that I only have 2.2.1 installed, but ruby -v says its using 2.0. So I think I have a random v. 2.0 installed, which I want to get rid of, what do?
[09:06:11] certainty: i'm curious if there's a way without forking a shell. I'm not aware of a way (without gems)
[09:06:23] certainty: reading information from /proc is perfectly possible though
[09:06:40] sheepman: ok thanks certainty
[09:09:54] ndrei: has joined #ruby
[09:10:32] blaxter: has joined #ruby
[09:13:24] bronson: has joined #ruby
[09:14:54] pocketprotector: has joined #ruby
[09:15:14] iamninja_: has joined #ruby
[09:15:34] karapetyan: has joined #ruby
[09:15:38] tjbiddle: has joined #ruby
[09:15:42] benlovell: has joined #ruby
[09:16:11] solocshaw: has joined #ruby
[09:16:12] Kendos-Kenlen: has joined #ruby
[09:16:38] solocshaw: has joined #ruby
[09:17:17] dravine: has joined #ruby
[09:18:00] ndrei: has joined #ruby
[09:18:45] pecpec: has joined #ruby
[09:18:57] startupality: has joined #ruby
[09:25:40] ruurd: has joined #ruby
[09:26:08] charliesome: has joined #ruby
[09:26:46] phatypus: has joined #ruby
[09:27:11] leafybasil: has joined #ruby
[09:27:44] arup_r: has joined #ruby
[09:30:18] lolmaus: has joined #ruby
[09:30:22] ljarvis: apeiros: I'm not sure now actually, moved on. Maybe there wasn't a difference, I found it odd that to_h didn't work like to_hash in that situation but actually it seems quite consistent
[09:30:45] jenrzzz: has joined #ruby
[09:31:43] startupality: has joined #ruby
[09:36:35] yorickpeterse: ljarvis: wow, you're back
[09:36:35] BackEndCoder: has joined #ruby
[09:37:46] Timba-as: has joined #ruby
[09:37:55] renderful: has joined #ruby
[09:38:27] arup_r: has joined #ruby
[09:38:38] hs366: has joined #ruby
[09:42:08] arup_r1: has joined #ruby
[09:43:22] workmad3: has joined #ruby
[09:43:34] j4cknewt: has joined #ruby
[09:45:54] davedev24: has joined #ruby
[09:47:31] rickmasta: has joined #ruby
[09:49:15] Technodrome: has joined #ruby
[09:50:43] patientj: has joined #ruby
[09:56:02] ishahnaz: has joined #ruby
[09:59:18] vjdhama: has joined #ruby
[09:59:20] terlar: has joined #ruby
[10:00:50] startupality: has joined #ruby
[10:01:06] unop: has joined #ruby
[10:02:07] devoldmx: has joined #ruby
[10:02:12] michael_mbp: has joined #ruby
[10:03:50] beagles: has joined #ruby
[10:03:53] shredding: has joined #ruby
[10:10:43] michael_mbp: has joined #ruby
[10:14:18] bronson: has joined #ruby
[10:17:10] tuor: hi, what is the difference between Hash.key?() and Hash.has_key?() ?
[10:18:12] adaedra: one is longer to type
[10:18:19] adaedra: other than that I think they're aliases
[10:18:23] adaedra: &ri Hash#key?
[10:18:23] `derpy: http://www.rubydoc.info/stdlib/core/Hash#key%3F-instance_method
[10:18:36] adaedra: Here, all aliases
[10:19:26] giuseppesolinas: has joined #ruby
[10:19:48] giuseppesolinas_: has joined #ruby
[10:20:39] tuor: ah ok. thx.
[10:23:17] leat: has joined #ruby
[10:23:20] apt-get: has joined #ruby
[10:23:42] Phil-Work: has joined #ruby
[10:24:29] Phil-Work: can someone tell me what this code does? Struggling to Google as I have no idea what kind of programming structure it is...
[10:24:33] Phil-Work: b1.use Call, UploadIsoFile do |env2, b2|
[10:24:37] Phil-Work: ... some code ...
[10:25:21] mattprelude: has joined #ruby
[10:25:49] j4cknewt: has joined #ruby
[10:26:21] canton7: execute the method 'b1.use', passing in the parameters Call and UploadIsoFile (which looks like they're classes). Also pass in an anonymous function, which takes the parameters env2 and b2, and may or may not return something...
[10:30:29] emilkarl: has joined #ruby
[10:31:23] Phil-Work: canton7, so... what relevance does it have as a control structure?
[10:31:32] Phil-Work: in what instance will the "some code" execute?
[10:31:40] Siyfion: has joined #ruby
[10:31:49] Phil-Work: if b1.use returns something trueish?
[10:32:05] canton7: 'some code' is an anonymous function, which is passed to 'b1.use'. It will execute if and when the code in 'b1.use' executes it
[10:32:14] jhass: Phil-Work: it's passed to b1.use, which can call it or store it for calling it later
[10:33:05] Phil-Work: b1 is presumably an object?
[10:33:23] Phil-Work: how do I see what it is an instance of so I can find "use"?
[10:33:28] canton7: probably. it may be a local method which returns an object, but it's probably an object :P
[10:33:35] vivcheri: has joined #ruby
[10:33:49] canton7: or 'puts b1.class'
[10:34:19] Phil-Work: "Vagrant::Action::Builder"
[10:34:23] Phil-Work: excellent - thanks
[10:34:26] Phil-Work: gives me something to go on
[10:34:38] rodfersou: has joined #ruby
[10:34:46] dhjondoh: has joined #ruby
[10:35:00] vivcheri: Hi, I am trying a vagrant installation of bosh-lite and I am getting the following error http://paste.ubuntu.com/12530122/
[10:35:08] vivcheri: How do I resolve this ?
[10:35:54] Kariel: has joined #ruby
[10:36:01] Kariel: Hi everyone.
[10:36:26] moeabdol: has joined #ruby
[10:36:59] jhass: vivcheri: do you see a Gemfile?
[10:38:12] michael_mbp: has joined #ruby
[10:38:13] dionysus69: has joined #ruby
[10:38:38] allomov: has joined #ruby
[10:40:07] vivcheri: jhass: Iam new to ruby
[10:40:22] vivcheri: jhass: Do you mean to_specs ?
[10:40:35] jhass: no I mean whether you see a file called "Gemfile"
[10:40:43] suchness: has joined #ruby
[10:41:14] vivcheri: jhass: Where is the Gemfile located ?
[10:41:24] jhass: usually at the root of a project
[10:41:27] bruno-: has joined #ruby
[10:42:18] nhhagen: has joined #ruby
[10:42:40] vivcheri: jhass: http://paste.ubuntu.com/12530139/
[10:42:50] Kariel: Are we talking Rails here?
[10:43:02] vivcheri: That is the root of the bosh-lite project
[10:43:02] jhass: ?rails Kariel
[10:43:02] ruboto: Kariel, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[10:43:19] jhass: vivcheri: okay, where does /usr/local/bin/bosh come from? how did you install it?
[10:43:41] Kariel: I meant vivcheri 's question, if it's about Rails, since I just joined.
[10:43:55] cajone: has joined #ruby
[10:44:01] ruboto: You can find a log of this channel at http://irclog.whitequark.org/ruby/
[10:44:04] vivcheri: jhass: https://github.com/cloudfoundry/bosh-lite
[10:45:13] vivcheri: I followed the steps there.
[10:45:15] drewvanstone: has joined #ruby
[10:45:31] Kariel: Thanks. Well, I had similar problems with some other software, installing gems manually will probably work, even though it's not optimal.
[10:46:05] vivcheri: jhass: It was gem install bosh_cli
[10:46:06] jhass: vivcheri: do you have multiple rubies installed? chruby, rvm, rbenv, anything like that?
[10:46:12] michael_mbp: has joined #ruby
[10:46:20] tomphp: has joined #ruby
[10:46:22] vivcheri: jhass: How do I check that ?
[10:46:34] jhass: usually you would know if so ;)
[10:46:35] vivcheri: jhass: I am using Ubuntu 14.04
[10:46:46] vivcheri: No I did not install anything extra
[10:47:06] jhass: idk, maybe just retry the gem install step in your current context
[10:47:29] vivcheri: gem install bosh_lite ?
[10:48:10] jhass: ell, _cli
[10:48:38] vivcheri: http://paste.ubuntu.com/12530164/
[10:49:30] vivcheri: jhass: I am re-installing: gem install bosh_cli
[10:50:00] tkuchiki: has joined #ruby
[10:50:21] vivcheri: jhass: It's re-installed.
[10:50:29] vivcheri: jhass: Now what do I do ?
[10:50:54] vivcheri: jhass: bosh target 192.168.50.4 lite ?
[10:51:06] jhass: that's the command that we're trying to fix
[10:51:24] vivcheri: Do I need to re-try that command ?
[10:51:27] jhass: btw no need to highlight me with every message, especially if nobody else was talking in between ;)
[10:51:50] jhass: you know, most people learn this stuff by trial and error
[10:52:14] jhass: I too am just proxying some educated trial and error through you now
[10:52:29] vivcheri: I am re-ran the command and I am getting the same error.
[10:52:36] jhass: no need to act like a shell and ask for every single thing ;)
[10:52:43] SylarRuby: has joined #ruby
[10:52:58] jhass: well, gem install mini_portile then? perhaps its deps are off
[10:53:17] jhass: or maybe the gem install bosh_cli command actually failed and you ignored some error output?
[10:53:26] vivcheri: http://paste.ubuntu.com/12530210/
[10:54:03] vivcheri: http://paste.ubuntu.com/12530214/
[10:54:11] banister: has joined #ruby
[10:54:14] timanema: has joined #ruby
[10:54:19] jhass: so what about gem install mini_portile?
[10:55:02] tatsuo: has joined #ruby
[10:55:22] vivcheri: Will try that command
[10:56:16] vivcheri: http://paste.ubuntu.com/12530236/
[10:56:21] blackmesa: has joined #ruby
[10:56:26] SylarRuby: has joined #ruby
[10:56:43] jhass: looks successful
[10:56:54] vivcheri: jhass: Tried re-running the bosh target 192.168.50.4 lite
[10:57:02] vivcheri: I am getting the same error.
[10:57:13] vivcheri: It was failing there earlier also.
[10:57:24] jhass: ah, try gem install mini_portile -v ~> 0.5.0 actually
[10:58:17] jhass: or gem install mini_portile -v 0.5.3 if that doesn't work
[10:59:45] vivcheri: http://paste.ubuntu.com/12530258/
[11:00:04] vivcheri: re-running the bosh target 192.168.50.4 lite
[11:00:15] Cysioland: has joined #ruby
[11:00:27] vivcheri: jhass: It works now
[11:00:29] Cysioland: Is there a gem that converts something like '1h10m30s' to seconds?
[11:00:43] jhass: Cysioland: chronic_duration or so
[11:01:31] vivcheri: jhass: Thanks a lot
[11:01:40] vivcheri: I am logged into the bosh director.
[11:02:08] jhass: no idea what went wrong there
[11:02:30] jhass: probably fixed in a less ancient rubygems version than what Ruby 1.9/Ubuntu ships
[11:03:54] tomphp: has joined #ruby
[11:08:29] burgestrand: has joined #ruby
[11:08:40] Cysioland: thank mr jhass
[11:09:13] Cysioland: has left #ruby: ("thank mr jhass")
[11:09:47] blackmesa: has joined #ruby
[11:10:08] sdothum: has joined #ruby
[11:10:39] phutchins2: has joined #ruby
[11:11:00] diegoviola: has joined #ruby
[11:11:10] ndrei: has joined #ruby
[11:12:28] bruno-: has joined #ruby
[11:13:50] FernandoBasso: has joined #ruby
[11:13:57] workmad3: has joined #ruby
[11:15:15] bronson: has joined #ruby
[11:16:07] eGGsha: has joined #ruby
[11:16:12] [k-: has joined #ruby
[11:16:43] patientj: has left #ruby: ("WeeChat 1.0.1")
[11:21:22] krz: has joined #ruby
[11:21:25] r00ster: has joined #ruby
[11:22:45] vivcheri: jhass: Are you still there ?
[11:22:52] tvw: has joined #ruby
[11:23:23] yorickpeterse: jhass: oooh, I see you've been promoted to Mr now
[11:24:22] matti: yorickpeterse: ;]
[11:24:31] yorickpeterse: (??????????)???
[11:24:53] vivcheri: jhass: I am asked to add a route on step 4 in the bosh lite documentation.
[11:25:05] vivcheri: Wondering what route is he meaning ?
[11:25:27] jhass: doesn't the readme or other docs explain?
[11:25:34] jhass: I never even saw that stuff before either
[11:26:03] matti: Souds very official.
[11:26:27] yorickpeterse: but so who will be the other Mr or Mrs jhass? :>
[11:26:39] matti: Hey apeiros
[11:26:45] matti: Oh pardon me. Mr apeiros :)
[11:26:48] vivcheri: There is a add-route binary in the bin folder under the bosh-lite binary
[11:26:56] apeiros: matti: I prefer deity
[11:27:07] matti: apeiros-sama?
[11:27:15] apeiros: or actually??? proto-deity
[11:27:27] yorickpeterse: apeiros-senpai
[11:27:32] jhass: vivcheri: so run it?
[11:27:46] ruboto: apeiros is nobody. They're one of the four people with founders access in the #ruby channel, owner of ruboto the channel bot and ruby-community.com the companion website for the #ruby channel
[11:28:00] jhass: nobody doesn't need any titles
[11:28:31] Ryzokuken: has joined #ruby
[11:28:50] vivcheri: jhass: done.
[11:29:19] Ryzokuken: I had a little problem
[11:29:25] Ryzokuken: Could you help?
[11:29:45] ruboto: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[11:30:09] Ryzokuken: I wanted to serialize an array of objects
[11:30:19] Ryzokuken: How could I achieve that?
[11:30:24] yorickpeterse: Serialize to what?
[11:30:26] allcentury: has joined #ruby
[11:30:42] Ryzokuken: Then save to disk
[11:30:48] vivcheri: jhass: Works like a charm.
[11:30:50] `derpy: http://www.rubydoc.info/stdlib/core/Marshal
[11:31:03] yorickpeterse: Not the best in town, but it comes with the stdlib
[11:31:04] Ryzokuken: But it aint working
[11:31:08] vivcheri: jhass: Moving to the CloudFoundry Installation.
[11:31:16] Ryzokuken: For complete array
[11:31:18] yorickpeterse: Ryzokuken: you're going to have to provide more info than just "it doesn't work"
[11:31:30] yorickpeterse: a code sample along with output on gist.github.com helps a lot
[11:31:33] Ryzokuken: I defined 2 fncs
[11:31:47] Ryzokuken: I have the source on gist
[11:32:41] Ryzokuken: https://gist.github.com/ryzokuken/1fdc6c30c354a1e57228
[11:32:42] but3k4: has joined #ruby
[11:32:49] Ryzokuken: Check this please?
[11:33:26] syath: has joined #ruby
[11:33:27] yorickpeterse: and what exactly doesn't work?
[11:33:44] Ryzokuken: It isn't saving
[11:33:50] Ryzokuken: The file is created
[11:34:01] Ryzokuken: But text isn't saved
[11:34:28] Ryzokuken: The function isn't being called completely
[11:34:37] Ryzokuken: The alert does not show up
[11:34:46] jhass: https://gist.github.com/ryzokuken/1fdc6c30c354a1e57228#file-save-rb-L52-L55 you should build a single array instead and dump it to the file
[11:34:59] greenarrow: has joined #ruby
[11:35:03] jhass: Probably just Marshal.dump(notes) instead of the each
[11:35:05] jgt1: has joined #ruby
[11:35:11] Ryzokuken: I did actually
[11:35:21] Ryzokuken: But does not work
[11:35:26] Ryzokuken: So I tried things
[11:35:29] jhass: so the code you showed doesn't produce your problem?
[11:35:54] Ryzokuken: None of the two workk
[11:36:03] Ryzokuken: I've tried many things
[11:36:05] blackmesa: has joined #ruby
[11:36:15] yorickpeterse: my only guess is that at https://gist.github.com/ryzokuken/1fdc6c30c354a1e57228#file-save-rb-L53 `notes` returns an empty array
[11:36:28] apeiros: jhass: "nobody doesn't need any titles" -> "nobody needs titles"
[11:36:28] certainty: makes sense
[11:36:32] apeiros: therefore I need titles!
[11:36:50] certainty: i need turtles
[11:37:54] Ryzokuken: Shall I try marshal.dump(notes) once again?
[11:38:01] Ryzokuken: + notes is global
[11:38:09] yorickpeterse: add a `p notes` before writing to the file
[11:38:12] jhass: also add a p notes to look at it
[11:38:17] yorickpeterse: jhass: 2fast4u
[11:39:08] Ryzokuken: Notes is global. Do I need @ or $ ?
[11:39:20] Ryzokuken: Or is it alright?
[11:39:29] ragingcake: has joined #ruby
[11:40:08] jhass: it's all right since all your blocks closure over it
[11:40:19] r00ster: has left #ruby: ()
[11:40:22] dhjondoh: has joined #ruby
[11:40:23] benlovell: has joined #ruby
[11:40:51] Ryzokuken: If a block ends
[11:40:58] certainty: it has blocked
[11:41:07] ruboto: Badum-Tshh! https://www.youtube.com/watch?v=oShTJ90fC34
[11:41:07] Ryzokuken: But I still want to retain variables
[11:41:33] certainty: jhass: come on. It wasn't that bad, was it? xD
[11:41:52] jhass: Ryzokuken: your toplevel has a reference to it, it won't be garbage collected as long as your program runs
[11:41:53] r00ster: has joined #ruby
[11:42:16] jhass: certainty: don't ask if you don't want to know the answer
[11:42:30] certainty: jhass: ok point taken :)
[11:42:31] yorickpeterse: Ryzokuken: just use `p notes`
[11:42:58] Ryzokuken: I didn't get it
[11:43:49] jhass: no, p notes
[11:44:04] jhass: like puts notes just p instead of puts
[11:44:16] workmad3: has joined #ruby
[11:44:22] Ryzokuken: What would that achieve?
[11:44:46] jhass: print it to stdout so you can check its value is what you think it is
[11:45:05] Ryzokuken: Or maybe alert for my desktop app
[11:45:22] Tempesta: has joined #ruby
[11:45:27] ljarvis: yorickpeterse: back?
[11:45:47] ndrei: has joined #ruby
[11:45:50] ljarvis: I never went anywhere :)
[11:45:55] Ryzokuken: BTW according to you guys, what is the best solution for developing desktop apps?
[11:46:04] pwnd_nfsw: the one that works
[11:46:15] tkuchiki: has joined #ruby
[11:46:36] shevy: is it worth to distribute documentation in the form of .pdf files?
[11:46:45] Ryzokuken: Tkinter? Electron? Kivy? Qt?
[11:46:47] shevy: these are autogenerated for one gem, but it's quite huge... about 200k
[11:46:52] shevy: (as part of a .gem)
[11:46:57] ljarvis: shevy: wat, no
[11:47:06] apeiros: shevy: as part of a gem: no
[11:47:15] apeiros: shevy: but available for download from the gem homepage? sure
[11:47:25] apeiros: that is - if you can automate its generation
[11:47:33] BackEndCoder: has joined #ruby
[11:47:53] devoldmx: has joined #ruby
[11:48:36] gener1c_: has joined #ruby
[11:49:23] elperdut: has joined #ruby
[11:50:28] slayerja_: has joined #ruby
[11:50:49] elperdut: has joined #ruby
[11:50:50] keksi_: has left #ruby: ()
[11:51:20] Xeago_: has joined #ruby
[11:52:08] elperdut: has joined #ruby
[11:53:08] r00ster: has left #ruby: ()
[11:54:22] amystephen: has joined #ruby
[11:56:57] suchness: has left #ruby: ()
[11:56:58] suchness: has joined #ruby
[11:57:02] ericjphillips: has joined #ruby
[11:58:14] j4cknewt: has joined #ruby
[11:58:28] yorickpeterse: ljarvis: you were MIA for a while
[11:58:39] matti: Good not KIA.
[11:59:26] startupality: has joined #ruby
[12:00:10] matti: Killed in Action
[12:00:21] apeiros: and MIA is missing
[12:00:42] apeiros: but I think ljarvis rather went AWOL than MIA :)
[12:00:54] Igorshp: has joined #ruby
[12:01:04] cornerma1: has joined #ruby
[12:01:22] andyrs: has joined #ruby
[12:02:19] jenrzzz: has joined #ruby
[12:08:17] linduxed: has joined #ruby
[12:08:27] shevy: away from duty!
[12:09:21] blackmesa: has joined #ruby
[12:09:30] tomphp_: has joined #ruby
[12:10:36] Jardayn: has joined #ruby
[12:11:11] nateberkopec: has joined #ruby
[12:11:55] RegulationD: has joined #ruby
[12:12:30] shredding: has joined #ruby
[12:13:13] sarovin: has joined #ruby
[12:14:10] einarj: has joined #ruby
[12:14:50] shevy: atmosx_laptop is this with laptop-at-home?
[12:14:52] phutchins: has joined #ruby
[12:15:56] Ropeney: has joined #ruby
[12:15:57] drptbl_: has joined #ruby
[12:16:08] bronson: has joined #ruby
[12:17:11] Ryzokuken: Anyone here has had experience with shoes??
[12:17:39] vjdhama: has joined #ruby
[12:17:56] certainty: yeah. they're comfortable
[12:18:08] shevy: I wear them often
[12:18:11] certainty: also protect feet. good to wear them
[12:18:36] shevy: people took over the project, it's now different
[12:18:47] nzst: has joined #ruby
[12:18:57] Ryzokuken: But you got it, right?
[12:19:09] Ryzokuken: So, anyone familiar?
[12:19:36] Ryzokuken: + I had a doubt
[12:19:58] jmignault: has joined #ruby
[12:20:15] atmosx_laptop: shevy: I moved the iMac at the office and now I"m home almost all day every day
[12:20:18] Ryzokuken: Shouldn't my marshal_dump and marshal_load use strings instead of an array?
[12:20:19] s00pcan: has joined #ruby
[12:20:23] dhjondoh: has joined #ruby
[12:20:35] Keltia: has joined #ruby
[12:20:59] shevy: Ryzokuken I settled for ruby-gnome rather than shoes, the main shoes requires jruby
[12:21:12] Tempesta: has joined #ruby
[12:21:33] Ryzokuken: So, is there a better GUI toolkit?
[12:22:41] shevy: there are not many GUI toolkits in ruby
[12:23:11] Tempesta: has joined #ruby
[12:23:17] Ryzokuken: Shoes works with functions?
[12:23:20] Ryzokuken: https://gist.github.com/ryzokuken/1fdc6c30c354a1e57228
[12:23:31] Ryzokuken: No functions
[12:23:51] Ryzokuken: Destroys the perfectionist in me
[12:24:08] absklb: has joined #ruby
[12:24:51] absklb: i installed bundler 1.10.6 and my canvas lms script cant fint it. it complains that i have old version of bundler. but gem list b shows it at 1.10.6 which is needed by canvas
[12:25:11] andyrs: has joined #ruby
[12:25:30] karapetyan: has joined #ruby
[12:26:39] Tempesta: has joined #ruby
[12:26:53] dstarh: has joined #ruby
[12:27:23] apt-get: has joined #ruby
[12:27:37] shevy: Ryzokuken you use lots of methods there
[12:27:40] terlar: has joined #ruby
[12:28:13] vjdhama: has joined #ruby
[12:28:23] Tempesta: has joined #ruby
[12:28:26] Ryzokuken: I used p notes
[12:28:35] Ryzokuken: Or whatever
[12:28:40] nhhagen: has joined #ruby
[12:28:57] shevy: that is Kernel.p
[12:29:15] Ryzokuken: Actually I used alert
[12:29:21] Ryzokuken: But whatever
[12:29:27] yorickpeterse: Ryzokuken: and?
[12:29:31] Ryzokuken: It out putted
[12:29:52] yorickpeterse: outputted what?
[12:30:12] Ryzokuken: Note @text = "" @title="" @color =rgb()
[12:30:19] yalue: has joined #ruby
[12:30:20] Feyn: has joined #ruby
[12:30:22] yorickpeterse: That's not what `p` outputs
[12:30:25] Ryzokuken: I had no time to type the values
[12:30:54] tobiasvl: copy/paste? :P
[12:30:55] benlovell: has joined #ruby
[12:31:08] yorickpeterse: Ryzokuken: add `p notes` before writing to the file and launch the script from a terminal
[12:31:32] evanjs: has joined #ruby
[12:31:33] yorickpeterse: you should either see just [] or something like [#<Note:0xa0dasdjkasdjasd......>, ....]
[12:31:39] eGGsha_: has joined #ruby
[12:31:42] yorickpeterse: Don't use "alert" or whatever there is, use `p`
[12:31:47] yorickpeterse: (minus the backticks)
[12:31:50] IceyEC: has joined #ruby
[12:33:04] emilkarl: has joined #ruby
[12:33:22] Tempesta: has joined #ruby
[12:34:33] s2013: has joined #ruby
[12:35:41] Ryzokuken: Kernel.p doesn't work :(
[12:36:00] apeiros: "doesn't work" doesn't work
[12:36:14] tobiasvl: although both should work
[12:36:19] yorickpeterse: Ryzokuken: I didn't say Kernel.p
[12:36:24] yorickpeterse: here's what you literally need to add:
[12:36:24] workmad3: has joined #ruby
[12:36:33] yorickpeterse: Before writing the marshal stuff to the file
[12:36:44] apeiros: >> Kernel.p ["this", "certainly", "works", "hurray", "module_function"]
[12:36:45] ruboto: apeiros # => ["this", "certainly", "works", "hurray", "module_function"] ...check link for more (https://eval.in/438214)
[12:36:58] yorickpeterse: apeiros: wasn't p private?
[12:37:00] apeiros: but unless you're in a BasicObject, just `p`
[12:37:01] yorickpeterse: or am I mistaking it for pp?
[12:37:08] apeiros: yorickpeterse: yes, it is private - as an instance method
[12:37:20] apeiros: that's what module_function does. it makes the instance method private and the class method public.
[12:37:23] yorickpeterse: >> require 'pp'; Kernel.pp 'butts'
[12:37:24] ruboto: yorickpeterse # => "butts" ...check link for more (https://eval.in/438215)
[12:37:30] yorickpeterse: oooh I think I know
[12:37:38] yorickpeterse: >> STDOUT.p 'butts'
[12:37:39] ruboto: yorickpeterse # => private method `p' called for #<IO:<STDOUT>> (NoMethodError) ...check link for more (https://eval.in/438216)
[12:37:41] apeiros: >> self.p "p is private"
[12:37:41] yorickpeterse: Yeah that was the one
[12:37:42] ruboto: apeiros # => private method `p' called for main:Object (NoMethodError) ...check link for more (https://eval.in/438217)
[12:37:54] yorickpeterse: hehe, check link for more
[12:38:27] yorickpeterse: "Sorry, this gem currently does nothing. Team Shoes is working on Gemifying Shoes, and this is just a placeholder until then."
[12:38:31] devoldmx: has joined #ruby
[12:38:32] yorickpeterse: oh for fucks sake, how do I install Shoes?
[12:38:37] yorickpeterse: don't tell me I need to Git clone things...
[12:38:50] bougyman: is someone taking care of shoes again?
[12:38:57] Ryzokuken: Don't use gem
[12:39:12] yorickpeterse: wait what, I have to download binaries? Ughhhh
[12:39:24] yorickpeterse: not in AUR either, great
[12:39:36] cmisenas: has joined #ruby
[12:39:43] yorickpeterse: a .install file, the fuck is this
[12:40:14] yorickpeterse: ok whatever, too much effort
[12:40:22] yorickpeterse: I'm pretty sure the issues is the list of notes being empty
[12:40:58] voltalio: has joined #ruby
[12:42:12] p0wn3d_: has joined #ruby
[12:42:46] Ryzokuken: Shows up all notes
[12:42:53] Ryzokuken: With color :3
[12:43:01] yorickpeterse: That doesn't mean `notes` can't be empty when the file is written
[12:43:09] yorickpeterse: hence the need for dumping whatever it contains at that point
[12:43:36] Ryzokuken: Buy certainly file.write is failing
[12:43:42] Ryzokuken: Or marshal.dump
[12:43:56] Ryzokuken: Cuz anything afterwards never happens
[12:45:13] Ryzokuken: Do I need to require Marshal?
[12:45:24] atomical: has joined #ruby
[12:45:28] yorickpeterse: No, Marshal is available by default
[12:45:28] Ryzokuken: Don't tell me it was that stupid a mistake
[12:45:37] ruboto: yorickpeterse # => Marshal (https://eval.in/438219)
[12:46:04] Ryzokuken: >> puts "hello"
[12:46:05] ruboto: Ryzokuken # => hello ...check link for more (https://eval.in/438220)
[12:47:10] Ryzokuken: yorickpeterse: Ubuntu?
[12:48:06] sgambino: has joined #ruby
[12:48:18] yorickpeterse: I don't use Ubuntu
[12:48:18] ruboto: Ryzokuken # => "hi" ...check link for more (https://eval.in/438221)
[12:48:43] Ryzokuken: Which distro?
[12:49:05] Ryzokuken: Is it awesome?
[12:49:16] Ryzokuken: I'm using Ubuntu 14.something
[12:49:32] yorickpeterse: It's a total pain if you're not familiar with Linux
[12:49:41] yorickpeterse: because it's just the kernel + package manager + systemd
[12:49:42] shevy: arch was awesome when judd was in charge
[12:49:43] dravine: has joined #ruby
[12:49:52] yorickpeterse: Everything else you have to set up yourself
[12:50:22] Ryzokuken: Ubuntu uses lightdm
[12:50:35] shevy: my sympathy is with you
[12:50:41] st1gma: has joined #ruby
[12:51:10] yorickpeterse: No, I'm using xfce
[12:51:19] yorickpeterse: I want as little UI to get in the way of getting things done
[12:51:27] yorickpeterse: and I can't stand GNOME's massive buttons, title bars, etc
[12:52:12] Ryzokuken: Forget Marshal
[12:52:24] Ryzokuken: I just wanna get this crap done
[12:52:34] Ryzokuken: How do I achieve this?
[12:52:38] vondruch: has joined #ruby
[12:53:33] InternetFriend: has joined #ruby
[12:53:37] shevy: u progress
[12:53:37] yorickpeterse: did you add the `p notes`?
[12:53:46] yorickpeterse: and if so, what was the output in the terminal?
[12:53:51] Ryzokuken: Not on gist
[12:54:04] Ryzokuken: I used p notes
[12:54:10] Ryzokuken: Nothing happened
[12:54:15] yorickpeterse: Then it never reaches that code
[12:54:16] Ryzokuken: Lemme try again
[12:55:36] blackmesa: has joined #ruby
[12:55:46] timanema: has joined #ruby
[12:56:18] Ryzokuken: I used alert before and after
[12:56:27] Ryzokuken: Its running
[12:56:36] Ryzokuken: But does not show up?
[12:56:36] krz: has joined #ruby
[12:57:29] sross07: has joined #ruby
[12:58:01] Ryzokuken: Figured out
[12:58:16] Ryzokuken: Alert notes
[12:58:35] decoponio: has joined #ruby
[12:58:40] atomical: has joined #ruby
[12:58:44] shevy: this fail is too painful to see
[12:58:55] Ryzokuken: Alert Marshal. Dump(notes) did not work
[12:58:57] crunk_bear: has joined #ruby
[12:59:18] Ryzokuken: shevy: help me pls :(
[12:59:30] Ryzokuken: Marshal is having probs
[13:00:03] iateadonut: has joined #ruby
[13:00:29] yorickpeterse: Marshal is not the problem
[13:00:34] yorickpeterse: >> Marshal.dump(42)
[13:00:35] ruboto: yorickpeterse # => "\x04\bi/" (https://eval.in/438224)
[13:00:39] yorickpeterse: there's no require needed
[13:00:40] Ryzokuken: Does it need gem?
[13:00:53] yorickpeterse: No, as I said already it comes with Ruby's standard library
[13:01:12] Ryzokuken: Marshal(notes) is not evaluating
[13:01:34] yorickpeterse: Use Marshal.dump
[13:01:38] yorickpeterse: Not Marshal(notes)
[13:02:12] Ryzokuken: Marshal.dump(notes)
[13:03:00] Ryzokuken: See the code again?
[13:03:01] shevy: Ryzokuken you need to read the docs
[13:03:03] Ryzokuken: https://gist.github.com/ryzokuken/1fdc6c30c354a1e57228
[13:03:15] Ryzokuken: Marshal dump and load alright?
[13:03:18] shevy: ruby-doc.org/core/Marshal.html
[13:03:31] Ryzokuken: Do I need to use dump and load as well?
[13:03:40] lagrangi-wan: has joined #ruby
[13:03:45] yorickpeterse: Marshal.load is used to turn marshalled data back into Ruby
[13:03:52] yorickpeterse: >> Marshal.load(Marshal.dump(42))
[13:03:53] ruboto: yorickpeterse # => 42 (https://eval.in/438226)
[13:03:57] p0wn3d__: has joined #ruby
[13:04:27] timanema: has joined #ruby
[13:05:10] Ryzokuken: I declared marshal_dump and marshal_load
[13:05:23] krisquigley: has joined #ruby
[13:05:33] Ryzokuken: Do I need _dump and _load as well?
[13:05:34] r0x0rZ: has joined #ruby
[13:05:47] pecpec: has joined #ruby
[13:06:30] workmad3: has joined #ruby
[13:06:31] r0x0rZ: I'm going through LRTHW (http://learnrubythehardway.org/book/ex46.html) and when I try to run command `rake test` I get the following output in terminal -> https://gist.github.com/comatory/298bce215d3cde9d79b4
[13:06:56] shevy: require': cannot load such file -- test/unit (LoadError)
[13:07:02] yorickpeterse: Ryzokuken: you need to figure out what `notes` is before writing the file
[13:07:08] jhass: Ryzokuken: how do you verify your claim "x is not evaluating"? What do you expect, what do you observe?
[13:07:14] jdawgaz: has joined #ruby
[13:07:30] ChoiKyuSang: has joined #ruby
[13:07:47] shevy: I think this is part of the testunit gem ?
[13:07:53] ljarvis: yorickpeterse: ah, just super busy at the moment with work and house move
[13:07:54] r0x0rZ: shevy: sorry I'm still pretty new to Ruby
[13:07:58] yorickpeterse: r0x0rZ: test-unit is a Gem starting with 2.something
[13:07:58] jhass: 15:01 <Ryzokuken> Marshal(notes) is not evaluating
[13:08:03] yorickpeterse: robbyoconnor: gem install test-unit
[13:08:07] r0x0rZ: shevy: oh I see
[13:08:24] shevy: r0x0rZ yeah that error message usually means that some gem is not installed, sometimes it is not easy to find out the name
[13:08:29] yorickpeterse: ljarvis: didn't you already move into the new house?
[13:08:31] r0x0rZ: yorickpeterse: yes I did not have that gem installed
[13:08:35] yorickpeterse: I recall something about you buying it a few months ago
[13:08:43] Ryzokuken: Its not evaluating
[13:08:53] shevy: yorickpeterse said that it should be this one https://rubygems.org/gems/test-unit
[13:08:53] r0x0rZ: yorickpeterse: works like a charm now. thank you!
[13:09:00] ljarvis: yorickpeterse: no, had lots of trouble the last few weeks. We exchange contracts a few months ago but it was still being built. We move in this weekend
[13:09:03] Ryzokuken: Because wherever it is, its not called
[13:09:11] Ryzokuken: Anything afterwards is skipped
[13:09:32] mondayrain: has joined #ruby
[13:09:39] nhhagen: has joined #ruby
[13:09:42] yorickpeterse: robbyoconnor: what exercise was this?
[13:09:54] yorickpeterse: ljarvis: you bought a new house too?
[13:10:08] ljarvis: yeah we bought off-plan
[13:10:19] Kallis: has joined #ruby
[13:10:27] ljarvis: it's generally cheaper, and it meant we got to design lots of stuff
[13:10:29] tobiasvl: #ruby-offtopic ;)
[13:10:37] maloik: wow congrats dude!
[13:10:47] yorickpeterse: tobiasvl: he's a mod, police give no fucks
[13:11:09] ljarvis: thanks! looking forward to the damn weekend and then not having internet for a month
[13:11:12] maloik: so I broke my irssi
[13:11:14] tobiasvl: yeah, hence my cheeky wink, so I'm clear of being banned ;)
[13:11:24] imperator: has joined #ruby
[13:11:28] tobiasvl: Ryzokuken: maybe you should gist your output
[13:11:34] Yzguy: has joined #ruby
[13:11:45] burgestrand: has joined #ruby
[13:12:00] tobiasvl: you're not communicating very well what you expect to happen, and what's actually happening
[13:12:00] Ryzokuken: What irc client you guys use for Ubuntu?
[13:12:15] patientj: has joined #ruby
[13:12:15] drewvanstone: has joined #ruby
[13:13:01] Ryzokuken: How can I install xchat?
[13:13:08] Ryzokuken: Its for fedora
[13:13:31] freerobby: has joined #ruby
[13:13:32] diegoviola: Ryzokuken: weechat, I run Arch Linux though
[13:13:36] yorickpeterse: ljarvis: didn't order it before moving in?
[13:13:47] Ryzokuken: https://gist.github.com/ryzokuken/1fdc6c30c354a1e57228
[13:13:48] diegoviola: but it's available for any distro
[13:13:55] tobiasvl: Ryzokuken: just install it like you install any program???
[13:14:04] certainty: Ryzokuken: sudo dnf install ....
[13:14:04] tobiasvl: it's in yum/dnf
[13:14:15] Ryzokuken: Marshal.dump ain't even working
[13:14:22] ljarvis: yorickpeterse: yeah but basically they suck
[13:14:24] yorickpeterse: Ryzokuken: OK I'm going to repeat this one more time
[13:14:27] Ryzokuken: Sudo apt-get install
[13:14:30] yorickpeterse: Ryzokuken: your problem is not Marshap.dump
[13:14:32] RegulationD: has joined #ruby
[13:14:35] yorickpeterse: because the code apparently never reaches it
[13:14:39] tobiasvl: Ryzokuken: apt-get? in fedora?
[13:14:48] yorickpeterse: So again, figure out if `notes` is empty or not
[13:14:56] certainty: ACTION is confused
[13:14:58] yorickpeterse: instead of trying to work around having to do that
[13:15:03] krisquigley: has joined #ruby
[13:15:06] yorickpeterse: "oh but I used alert" No, use `p`
[13:15:21] yorickpeterse: Dumping the same gist in here is not going to get you an answer quicker
[13:15:31] havenwood: has joined #ruby
[13:15:32] yorickpeterse: ljarvis: 100/100 fiber all the way
[13:15:39] auzty: has joined #ruby
[13:15:46] InternetFriend: has joined #ruby
[13:15:55] yorickpeterse: ljarvis: http://www.speedtest.net/my-result/4672360012 :haters
[13:15:59] ljarvis: yorickpeterse: to be fair, when I finally get it I have FTTP so should get up to 350 down
[13:16:03] ericjphillips: I'm working on https://projecteuler.net/problem=3 and I have https://jsfiddle.net/ericjphillips/s9g9m866/3/ but I think I'm doing something illegal with the for loop on line 9
[13:16:21] ljarvis: ericjphillips: this is #ruby
[13:16:25] ljarvis: that is not ruby
[13:16:28] Ryzokuken: Its not empty
[13:16:36] Ryzokuken: I used alert notes
[13:16:40] yorickpeterse: Ryzokuken: ........
[13:16:54] yorickpeterse: "I used alert"
[13:17:00] ljarvis: yorickpeterse: jesus that upload.. glorious
[13:17:00] yorickpeterse: You're on your own
[13:17:00] certainty: ACTION admires yorickpeterse for his patience
[13:17:02] tobiasvl: Ryzokuken: and when you used p, what did it output?
[13:17:05] bronson: has joined #ruby
[13:17:09] sabrehagen: using jquery's html function as a setter (http://api.jquery.com/html/) with html that contains the string '\text' converts the \t to a tab. how do i make it not interpret escaped characters?
[13:17:16] pyoor: has joined #ruby
[13:17:17] gurix: has joined #ruby
[13:17:18] ljarvis: sabrehagen: this is #ruby
[13:17:21] yorickpeterse: ljarvis: it really helps uploading cat pictures
[13:17:21] ljarvis: that is not Ruby
[13:17:25] Kallis: has joined #ruby
[13:17:28] Ryzokuken: P is not outputting anything
[13:17:35] sabrehagen: ljarvis: wow sorry, new irc client and confused the channel :)
[13:17:36] Ryzokuken: Nothing shootsup
[13:17:45] Ryzokuken: No kernel.p
[13:17:52] Ryzokuken: + I'm sorry
[13:17:54] elperdut: has joined #ruby
[13:17:54] s2013: has joined #ruby
[13:17:55] ljarvis: sabrehagen: no worries :)
[13:18:02] pyoor: what is the safest way to include a variable in a string? I'm currently using "foo #{bar}" but special characters in bar is causing the string to be truncated.
[13:18:07] Ryzokuken: Help me figure out
[13:18:26] ljarvis: pyoor: what kind of special characters?
[13:18:29] Ryzokuken: yorickpeterse: pls?
[13:18:40] ljarvis: Ryzokuken: please stop hitting return so often. You can type many things on a single line
[13:18:47] pyoor: ljarvis \' - I'm calling a string as part of a regex
[13:19:06] pyoor: My regex is - data = data.sub(/<head.*?>/im, "\\0\n<script type='text/javascript'>\n#{foo}\n</script>")
[13:19:10] ljarvis: pyoor: I don't understand what you want exactly, but if it's a regexp maybe you want Regexp.escape
[13:19:14] yorickpeterse: Ryzokuken: No, I have work to get done
[13:19:33] pyoor: ljarvis: this is part of the replace string
[13:20:02] ljarvis: pyoor: then I don't understand the problem
[13:20:09] slayerjain: has joined #ruby
[13:20:10] yorickpeterse: haha, somebody is trying to parse JS with regex it seems
[13:20:13] shevy: pyoor you mean \ character ?
[13:20:37] yorickpeterse: allow me to share http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454
[13:20:45] pyoor: well I'm not entirely sure - the string is truncated where #{foo} contains \'
[13:20:46] ryze: has joined #ruby
[13:21:29] MTGeni: has joined #ruby
[13:21:30] gurix: has joined #ruby
[13:21:34] shevy: yorickpeterse they locked that post :(
[13:21:42] ryze: whatever
[13:22:02] yorickpeterse: shevy: for good reasons
[13:23:21] Kallis: has joined #ruby
[13:23:43] vjdhama: has joined #ruby
[13:25:16] allcentury: has joined #ruby
[13:25:41] gurix: has joined #ruby
[13:25:59] centrx: has joined #ruby
[13:26:26] asxbr: has joined #ruby
[13:27:28] Igorshp: has joined #ruby
[13:28:41] chouhoulis: has joined #ruby
[13:28:51] bkulbida: has joined #ruby
[13:29:05] vjdhama: has joined #ruby
[13:29:08] victortyau: has joined #ruby
[13:29:36] malconis: has joined #ruby
[13:29:41] Luming: has joined #ruby
[13:29:42] gusTester: has joined #ruby
[13:30:04] Igorshp: has joined #ruby
[13:31:32] wpp: has joined #ruby
[13:33:42] sarovin: has left #ruby: ()
[13:34:06] Dacky: has joined #ruby
[13:35:30] Dacky: strane when did #rails become invite only
[13:35:50] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[13:35:52] havenwood: Dacky: #RubyOnRails
[13:36:17] gurix: has left #ruby: ()
[13:36:23] Dacky: tks u guys are swell
[13:37:45] unop: has joined #ruby
[13:38:11] hinbody: has joined #ruby
[13:38:47] teclator: has joined #ruby
[13:39:04] Ox0dea: has left #ruby: ("WeeChat 1.3")
[13:39:13] Dacky: has joined #ruby
[13:39:24] whippythellama: has joined #ruby
[13:40:14] absklb: has joined #ruby
[13:41:25] startupality: has joined #ruby
[13:41:36] nettoweb: has joined #ruby
[13:43:56] marvin81: has joined #ruby
[13:45:40] Sou|cutter: has joined #ruby
[13:46:25] duggiefresh: has joined #ruby
[13:47:45] thejoecarroll: has joined #ruby
[13:48:53] ruurd: has joined #ruby
[13:48:54] momomomomo: has joined #ruby
[13:49:34] chouhoulis: has joined #ruby
[13:49:39] malconis: has joined #ruby
[13:50:40] podman: has joined #ruby
[13:50:40] lsmola: has joined #ruby
[13:54:00] benlovell: has joined #ruby
[13:54:57] sanguisdex: has joined #ruby
[13:55:09] freerobby: has joined #ruby
[13:55:16] sanguisdex: has left #ruby: ()
[13:55:33] voltalio: has joined #ruby
[13:56:40] chthon: has joined #ruby
[13:56:41] YankNYC: haha this really sucks. i don't remember my nicknames and can't recover by email only
[13:57:16] JoshL: has joined #ruby
[13:58:48] ryze: has joined #ruby
[13:59:24] burgestrand: has joined #ruby
[14:01:16] davedev24: has joined #ruby
[14:02:08] havenwood: http://researcher.watson.ibm.com/researcher/files/jp-ODAIRA/PPoPP2014_RubyGILHTM.pdf
[14:02:10] ryzokuken_: has joined #ruby
[14:02:35] ngscheurich: has joined #ruby
[14:02:44] hectortrope: has joined #ruby
[14:05:08] nhhagen: has joined #ruby
[14:06:23] bigmac: has joined #ruby
[14:08:14] havenwood: gusTester: Good mornin
[14:09:30] beauby: has joined #ruby
[14:10:21] Kricir: has joined #ruby
[14:11:19] Kricir: has left #ruby: ()
[14:12:02] pontiki: has joined #ruby
[14:12:14] tjohnson: has joined #ruby
[14:12:20] imperator: uri question. if I have "http://myaccount.blob.core.windows.net", and I call URI.parse on it to get a uri object, is there a method to just get "myaccount"? Or am I just supposed to split the host manually?
[14:12:33] thejoecarroll: has joined #ruby
[14:13:24] imperator: ACTION is dealing with "canonical urls"
[14:15:14] absklb: anyone using canvas lms here?
[14:15:45] bigbadbear: has joined #ruby
[14:15:52] jhass: imperator: URI doesn't specify a decomposition for authority I think
[14:15:58] jhass: so yeah, split
[14:16:18] alveric: has joined #ruby
[14:16:39] imperator: jhass, thanks
[14:16:44] imperator: wonder if Addressable does
[14:16:45] hinbody: has joined #ruby
[14:16:47] Evanescence: has joined #ruby
[14:16:55] jhass: highly doubt it
[14:17:05] RegulationD: has joined #ruby
[14:17:30] Kendos-Kenlen: has joined #ruby
[14:17:41] nhhagen: has joined #ruby
[14:17:43] polly_wog: has joined #ruby
[14:17:58] bronson: has joined #ruby
[14:18:04] jhass: http://tools.ietf.org/html/rfc3986#section-3.2.2
[14:18:21] jhass: reg-name = *( unreserved / pct-encoded / sub-delims )
[14:18:33] jhass: an URI doesn't care too much about the structure of it
[14:19:29] imperator: ok, thanks, figured that but thought I'd ask
[14:20:58] Coraline: absklb: what do you need to know about Canvas?
[14:22:07] rbennacer: has joined #ruby
[14:22:26] imperator: ACTION grumbles about the Hash.new constructor
[14:22:33] kies^: has joined #ruby
[14:22:55] weemsledeux: has joined #ruby
[14:23:07] absklb: Coraline, it was giving me error regarding one mocha.git repo on git hub. it said me to do bundle install to check it out. i did. still same error. but now i after many tries i diid bundle update and now finally it is getting that repo!
[14:23:27] absklb: Coraline, still not solved though. can use your help if you are free.
[14:24:11] jhass: ?anyone absklb
[14:24:11] ruboto: absklb, Just ask your question, if anyone has or can, they will respond.
[14:24:20] absklb: ACTION knows.
[14:24:33] Coraline: What's not solved? It sounds like it works now?
[14:24:46] absklb: he repilied and my next reply is going to take time due to bundle update in progress hence....
[14:24:53] absklb: Coraline, i will know once this bundle update fiinishes
[14:25:26] spcmastertim: has joined #ruby
[14:25:35] Xeago: has joined #ruby
[14:25:46] shevy: he reptilied?
[14:26:04] jhass: don't you know we're ruled by reptiloids?
[14:26:21] shevy: I was an eye witness when dinosaurs were programming!
[14:26:27] startupality: has joined #ruby
[14:26:51] burgestrand: And then the great refactor, now no more dinosaurs.
[14:26:56] imperator: and then.....someone used a goto statement
[14:27:06] imperator: adios programming dinosaurs
[14:27:28] workmad3: has joined #ruby
[14:27:52] tenderlove: has joined #ruby
[14:28:05] youngbaks: has joined #ruby
[14:28:16] tenderlove: has joined #ruby
[14:28:17] leafybasil: has joined #ruby
[14:28:50] nolic: has joined #ruby
[14:28:50] NeverDie: has joined #ruby
[14:29:30] voltalio: has joined #ruby
[14:29:39] leafybas_: has joined #ruby
[14:30:06] krz: has joined #ruby
[14:31:00] Polysics: has joined #ruby
[14:32:11] absklb: libxml2 is missing. is that to be installed by gem or os?
[14:33:32] absklb: I did sudo apt-get install ruby-libxml libxml2 libxml2-dev and still get error for libxml in canvas bundle update?
[14:33:36] absklb: whats wrong?
[14:35:05] absklb: so it says nokogiri needs its own libxml not random by os.
[14:35:15] absklb: but i can make it use os one. shall i?
[14:35:19] bluOxigen: has joined #ruby
[14:35:29] apt-get: absklb: the easiest way might be to "gem install nokogiri"
[14:35:44] absklb: i think its already installed. its now trying to update
[14:35:50] absklb: let me try though
[14:35:57] yorickpeterse: hihi, nokogiri
[14:36:33] havenwood: yorickpeterse: I was just thinking of Oga.
[14:36:45] yorickpeterse: havenwood: how romantic
[14:36:52] yorickpeterse: havenwood: Oga also thinks a lot about you
[14:36:55] havenwood: ACTION cries a single tear
[14:36:57] yorickpeterse: (???? ???? ????)
[14:37:53] ruurd: has joined #ruby
[14:39:20] devoldmx: has joined #ruby
[14:39:48] axl_: has joined #ruby
[14:41:12] Evanescence: has joined #ruby
[14:42:53] slayerja_: has joined #ruby
[14:44:00] Technodrome: has joined #ruby
[14:44:12] ellisTAA: has joined #ruby
[14:44:53] InternetFriend: has joined #ruby
[14:45:07] rbennacer: has joined #ruby
[14:46:14] gurix: has joined #ruby
[14:46:21] tkuchiki: has joined #ruby
[14:47:19] ragingcake: has joined #ruby
[14:47:31] dopamean_: has joined #ruby
[14:48:19] shevy: you nerds!
[14:48:26] banister: has joined #ruby
[14:48:57] rbennacer: has joined #ruby
[14:49:12] dopie: has joined #ruby
[14:49:46] shevy: you french!
[14:50:14] adaedra: Plait-il ?
[14:50:43] RegulationD: has joined #ruby
[14:50:52] workmad3: has joined #ruby
[14:51:46] mary5030: has joined #ruby
[14:51:52] shevy: oui baguette
[14:51:55] pyoor: Can anyone explain this behavior to me? http://pastebin.com/HW01VREq
[14:51:55] ruboto: pyoor, as I told you already, please use https://gist.github.com
[14:52:22] shevy: god is this ugly
[14:52:36] pyoor: https://gist.github.com/anonymous/5f7936819b0c83aaaf78
[14:53:06] shevy: slightly better, now what is the behaviour that is confusing?
[14:53:14] mary5030: has joined #ruby
[14:53:22] pyoor: I'm trying to make a replacement in a string but the replacement string contains \\'. For some reason, the replacement string is split into two parts
[14:53:24] Kendos-Kenlen: C'est bon la baguette !
[14:53:34] pyoor: The second occuring at the end of the source string
[14:53:41] Kendos-Kenlen: Vive la baguette, le pain et les b??r??ts ! :D
[14:54:46] shevy: I can't even get the example to work
[14:55:05] shevy: syntax error, unexpected $undefined, expecting end-of-input
[14:56:02] shevy: you truncate there right?
[14:57:13] rodfersou: has joined #ruby
[14:57:27] shevy: "123\\'asdasd"
[14:57:54] drptbl: has joined #ruby
[14:58:19] pyoor: shevy: yessir
[14:58:39] wookiehangover: has joined #ruby
[14:58:42] karapetyan: has joined #ruby
[14:58:53] drewvanstone: has joined #ruby
[15:00:20] chthon: has joined #ruby
[15:00:20] pyoor: that's just an example. I'm getting this issue when reading a file containing \\'
[15:00:23] rippa: has joined #ruby
[15:00:28] j4cknewt: has joined #ruby
[15:00:40] pyoor: is there a way to sanitize the file or string prior to performing the replacement or is it some other issue?
[15:00:59] einarj: has joined #ruby
[15:01:51] shevy: you mean these three characters are in a file? "\\'"
[15:02:01] hashrocket: has joined #ruby
[15:02:13] drptbl: has joined #ruby
[15:02:19] ReK2: has joined #ruby
[15:02:52] shevy: in your example you actually add \\'
[15:03:19] pyoor: yes, those characters - I used 123\\'asdasd rather than pasting the entire file
[15:03:21] ruurd: has joined #ruby
[15:04:01] Jardayn_two: has joined #ruby
[15:05:00] iamninja: has joined #ruby
[15:06:28] [Butch]: has joined #ruby
[15:06:47] shevy: yeah, typically \\ means literal \ whenever you have a string
[15:07:03] dorei: has joined #ruby
[15:07:07] burgestrand: It becomes a bit weird in String#sub and String#gsub.
[15:07:19] burgestrand: >> "Hello".sub(/e/, "\\'")
[15:07:20] ruboto: Burgestrand # => "Hllollo" (https://eval.in/438323)
[15:07:21] alveric: has joined #ruby
[15:07:29] BTRE: has joined #ruby
[15:07:45] vondruch: has joined #ruby
[15:07:55] burgestrand: You have to double-escape backslashes if you're using a string as replacement in String#sub.
[15:08:03] burgestrand: >> "Hello".sub(/e/, "\\\\'")
[15:08:05] ruboto: Burgestrand # => "H\\'llo" (https://eval.in/438324)
[15:08:06] Tuxero: has joined #ruby
[15:08:14] burgestrand: (it prints doubly because of #inspect)
[15:08:17] shevy: pyoor you can test with a test file... have one line be: \\'
[15:08:25] shevy: pyoor then read this in via: File.readlines()
[15:08:27] drewvanstone: has joined #ruby
[15:08:40] canton7: has joined #ruby
[15:08:40] canton7: has joined #ruby
[15:08:41] shevy: This will return an Array that may look like this: ["abc\n", "def\n", "ghi\n", "\\\\'\n"]
[15:08:49] pyoor: Here is a better example - https://gist.github.com/anonymous/21fbd9127158a2c79e94
[15:08:57] shevy: there you can see that ruby represents it differently, the last entry of that array
[15:09:19] hobodave: has joined #ruby
[15:09:22] pyoor: so I thought about that but when I do bar.kind_of?(Array) it returns false
[15:09:42] pyoor: is there a safer way to read the file?
[15:09:44] burgestrand: pyoor: pass your replacement string as a block instead.
[15:10:02] pyoor: Burgestrand: how do I do that? I'm relatively new to ruby
[15:10:22] burgestrand: >> "Hello".sub(/e/) { "some string containing backslash \\'" }
[15:10:23] hobodave: has joined #ruby
[15:10:23] ruboto: Burgestrand # => "Hsome string containing backslash \\'llo" (https://eval.in/438329)
[15:10:28] shevy: pyoor yeah, File.read() will give you a string, File.readlines() an array. for .gsub you can use a {} variant
[15:10:29] fedexo: has joined #ruby
[15:11:01] burgestrand: pyoor: when you pass "bar" as a second argument to #sub, it will be interpreted by Ruby in a special way, replacing things prefixed by \\.
[15:11:10] prestorium: has joined #ruby
[15:11:29] burgestrand: pyoor: if instead you pass it as a block, e.g. "Your string".sub(/regex/) { "replacement" }, it won't be interpreted in this special way.
[15:11:49] benlieb: has joined #ruby
[15:11:50] pyoor: interesting - thanks for that Burgestrand
[15:11:57] blueOxigen: has joined #ruby
[15:12:13] burgestrand: >> "aabaa".sub(/a/, "\\'")
[15:12:14] ruboto: Burgestrand # => "abaaabaa" (https://eval.in/438333)
[15:12:33] burgestrand: Actually, bad example, should have been /b/.
[15:12:42] pyoor: Burgestrand: do I wrap the entire replace string in curly braces?
[15:12:43] burgestrand: >> "aabaa".sub(/b/, "\\'")
[15:12:44] ruboto: Burgestrand # => "aaaaaa" (https://eval.in/438335)
[15:12:48] pyoor: or just the data itself
[15:12:57] burgestrand: pyoor: Yes. Skip the second argument.
[15:13:01] dopamean_: has joined #ruby
[15:13:11] burgestrand: pyoor: foo.sub(/<head>/) { bar }
[15:13:37] pyoor: awesome - thanks again for that
[15:13:38] bmurt: has joined #ruby
[15:13:49] burgestrand: pyoor: Ruby will use the return value of the block (code inside curly braces), which is "bar", and will *not* interpret it in the special way that String#sub interprets its second argument.
[15:13:52] pyoor: I completely missed that in the documentation
[15:14:01] burgestrand: pyoor: Most people do, including me, I've been bitten by it before. :)
[15:14:47] burgestrand: String#sub and String#gsub be crazy when it comes to backslashes in the replacement string.
[15:15:13] cschneid_: has joined #ruby
[15:16:00] pyoor: well thanks again - I've been stuck on this for a few hours this morning
[15:16:11] pyoor: trying different string concatenation, etc - thinking that was the issue
[15:16:23] burgestrand: pyoor: Nope, it's just String#sub being incredibly weird.
[15:16:48] burgestrand: Most of the time the stdlib does useful things, String#sub is a rare occurrence.
[15:16:54] burgestrand: stdlib/core, I should say.
[15:18:34] mwlang: has joined #ruby
[15:18:54] bronson: has joined #ruby
[15:21:12] workmad3: has joined #ruby
[15:21:34] slackbotgz: has joined #ruby
[15:22:44] dfockler: has joined #ruby
[15:24:19] shevy: off-topic, perhaps someone knows, I just want to know if it is possible - if you have a rails site, can you easily generate a .pdf from this, by just using ruby code? (I currently use wkhtmltopdf)
[15:24:58] lagweezle: shevy: Generate a PDF of/from .. what, exactly?
[15:25:55] shevy: hmm let's say you just have a single page in rails, let's say ... hmm... just a page with lots of pictures
[15:26:19] shevy: or perhaps a pay-stuff formular :)
[15:26:22] pietr0: has joined #ruby
[15:27:39] blackmesa: has joined #ruby
[15:28:15] Xeago: has joined #ruby
[15:28:16] freerobby: has joined #ruby
[15:28:32] rwyoung: has joined #ruby
[15:28:41] shevy: wkhtmltopdf works quite ok so far, the only minor issue I see so far is with the inner-page padding being too large in the .pdf file
[15:29:44] jdawgaz: has joined #ruby
[15:32:07] beauby: has joined #ruby
[15:33:23] pyoor: Burgestrand: is it possible to still use backreferences in block code?
[15:34:23] burgestrand: pyoor: yes, but not by doing it how you did before. The first parameter to the block is the matched text.
[15:34:46] burgestrand: >> "aabyaa".sub(/b./) { |x| "<#{x}>" }
[15:34:48] ruboto: Burgestrand # => "aa<by>aa" (https://eval.in/438352)
[15:34:50] circ-user-dLt7c: has joined #ruby
[15:35:07] pyoor: ahh I see
[15:35:14] pyoor: sub is so weird
[15:35:33] burgestrand: pyoor: inside the block, the magic global variable "current match" is also properly set, $~, which is a MatchData object containing information about the current match.
[15:35:59] burgestrand: >> "aabyaa".sub(/b(.)/) { |x| "<#{$~[1]}>" }
[15:36:00] ruboto: Burgestrand # => "aa<y>aa" (https://eval.in/438353)
[15:36:14] burgestrand: It looks an awful lot like perl soon. :)
[15:39:59] rbennacer: has joined #ruby
[15:42:24] scoot: has joined #ruby
[15:43:47] rickmasta: has joined #ruby
[15:44:04] MVPhelp: has joined #ruby
[15:44:26] p0wn3d__: has joined #ruby
[15:45:38] jas02: has joined #ruby
[15:46:26] vjdhama: has joined #ruby
[15:47:56] towski_: has joined #ruby
[15:48:54] dionysus69: has joined #ruby
[15:49:06] Iniesta8: has joined #ruby
[15:50:18] tejasmanohar: has joined #ruby
[15:52:35] bigmac: has joined #ruby
[15:53:31] dopamean_: has joined #ruby
[15:54:03] scoot: has joined #ruby
[15:54:51] Vae_DuckZ: has joined #ruby
[15:54:52] yqt: has joined #ruby
[15:54:59] blackmesa: has joined #ruby
[15:56:02] Vae_DuckZ: hello, I'm wondering if there's a negated version of =~ in ruby? I'm in a "if cond1 && !(str =~ r) then" scenario
[15:56:09] Vae_DuckZ: is that the correct way of doing it?
[15:56:10] lagweezle: shevy: Not experienced in this realm, sadly.
[15:56:36] lagweezle: ... or maybe, 'luckily'
[15:56:59] burgestrand: Vae_DuckZ: !~
[15:57:00] shevy: I seem to remember something in rails like link_to: :pdf or something like that. no idea what it did
[15:57:06] Vae_DuckZ: Burgestrand: thanks
[15:57:25] cyrus_mc: has joined #ruby
[15:57:25] shevy: perhaps my imagination is cooler than the reality
[15:57:32] jhass: ACTION prefers !x.match
[15:57:34] parduse: has joined #ruby
[15:58:10] siaW: has joined #ruby
[15:58:43] siaW: how do i write a regex that satisfies something like this: ???06-25 14:58:04.258953???
[15:59:09] jhass: siaw: looks like a borked time, maybe your want strptime?
[15:59:09] yfeldblum: has joined #ruby
[15:59:22] havenwood: siaw: Where's that coming from?
[15:59:33] siaW: havenwood: it???s a db timestamp
[15:59:37] ruurd: has joined #ruby
[15:59:40] jhass: get a better DB
[15:59:47] burgestrand: Without a year attached?
[15:59:56] siaW: havenwood: seriously?
[16:00:14] jhass: yeah, havenwood, seriously!
[16:00:23] rgb-one: has joined #ruby
[16:00:29] siaW: it looks like this actually ???2015-07-11 15:17:45.957181???
[16:01:11] siaW: so questions again how do i write a regex that satisfies ???2015-07-11 15:17:45.957181??? :D
[16:01:17] burgestrand: siaw: use String#strptime like jhass said, it's meant for these things.
[16:01:31] burgestrand: Oh, sorry, it's on DateTime, not String.
[16:02:20] amclain: has joined #ruby
[16:02:26] jhass: >> require "time"; Time.strptime("%F %T.%N")
[16:02:27] ruboto: jhass # => wrong number of arguments (1 for 2..3) (ArgumentError) ...check link for more (https://eval.in/438367)
[16:02:54] malconis: has joined #ruby
[16:03:00] jhass: >> require "time"; Time.strptime("2015-07-11 15:17:45.957181", "%F %T.%N")
[16:03:01] ruboto: jhass # => 2015-07-11 15:17:45 +0000 (https://eval.in/438368)
[16:03:05] yfeldblum: has joined #ruby
[16:03:11] jhass: >> require "time"; Time.strptime("garbage", "%F %T.%N")
[16:03:12] ruboto: jhass # => invalid strptime format - `%F %T.%N' (ArgumentError) ...check link for more (https://eval.in/438369)
[16:03:23] siaW: i figured it out. thanks guys ;)
[16:03:25] burgestrand: >> require "datetime"; DateTime.strptime
[16:03:26] ruboto: Burgestrand # => cannot load such file -- datetime (LoadError) ...check link for more (https://eval.in/438370)
[16:03:36] havenwood: siaw: /\A\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\.\d{6}\z/
[16:03:37] burgestrand: >> DateTime.strptime
[16:03:39] ruboto: Burgestrand # => uninitialized constant DateTime (NameError) ...check link for more (https://eval.in/438371)
[16:03:46] burgestrand: >> require "time"; DateTime.strptime
[16:03:47] ruboto: Burgestrand # => #<DateTime: -4712-01-01T00:00:00+00:00 ((0j,0s,0n),+0s,2299161j)> (https://eval.in/438372)
[16:03:54] malconis: has joined #ruby
[16:03:59] Aswebb_: has joined #ruby
[16:04:03] jhass: require "date" works too :D
[16:04:12] burgestrand: But that's because require date requires time, no? :p
[16:04:14] rcvalle: has joined #ruby
[16:04:21] jhass: or vice versa? idk
[16:04:25] jenrzzz: has joined #ruby
[16:04:36] apeiros: iirc time requires date
[16:04:46] burgestrand: Yeah, looks like both require each other.
[16:04:47] apeiros: because Time.strptime uses Date._strptime
[16:05:02] siaW: havenwood: thanks :). but doesn???t work btw ;)
[16:05:07] apeiros: hasn't always been like that
[16:05:14] havenwood: >> '2015-07-11 15:17:45.957181' =~ /\A\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\.\d{6}\z/
[16:05:15] ruboto: havenwood # => 0 (https://eval.in/438373)
[16:05:22] havenwood: siaw: Works for the one arbitrary example you gave.
[16:05:46] elperdut: has joined #ruby
[16:05:57] siaW: havenwood: haha ok :)
[16:06:36] havenwood: siaw: Or are you wanting to match the smartquotes too? If you do a gist with a bunch of examples I'm sure there's someone here who can't resist matching all of them.
[16:07:00] burgestrand: Like with Time.strptime!
[16:07:11] havenwood: ACTION likes the idea that the DB's timestamp has smartquotes
[16:07:27] Soda: has joined #ruby
[16:07:31] siaW: i found a solution anyway thank you :)
[16:07:43] havenwood: siaw: Hopefully not Regexp-based!
[16:07:51] burgestrand: Hopefully using strptime!
[16:07:51] havenwood: siaw: What did you go with?
[16:08:35] mghaig: has joined #ruby
[16:09:52] spcmastertim: has joined #ruby
[16:10:32] Alina-malina: has joined #ruby
[16:10:49] mghaig: In an initialize method i'm trying to set an instance var to an argument only if it's a float and raise an argument error if it's anything else, is this valid ruby, when i run it in irb it always raises the error...
[16:10:50] mghaig: @distance = distance if distance.is_a? Float else raise ArgumentError, "Distance must be a Float."
[16:11:31] mghaig: can it not be a one-liner?
[16:11:39] jhass: better not
[16:11:49] vjdhama: has joined #ruby
[16:11:49] burgestrand: It's not more concise because it's on one line.
[16:12:04] jhass: raise ArgumentError unless distance.is_a? Float; @distance = distance
[16:12:11] burgestrand: More lines is not always worse code! Your code is beautiful, let it fly in all its glory.
[16:12:11] apeiros: mghaig: I prefer: raise TypeError, "Distance must be a Float" unless distance.is_a?(Float); @distance = distance
[16:12:12] jhass: replace the ; with a newline
[16:12:24] apeiros: mghaig: but I'd question why you have that requirement
[16:12:44] apeiros: ^5 jhass (despite different err classes)
[16:13:28] shevy: the whole world is written on one line!
[16:13:39] mghaig: ok thanks so much. i didn't consider the unless. and the type error is probably better for this case
[16:14:15] Kendos-Kenlen: has joined #ruby
[16:14:19] parduse: has joined #ruby
[16:15:11] jhass: shevy: World.new ?
[16:15:50] burgestrand: I built a thing, https://github.com/elabs/serial, and I've been looking at some alternatives that solve the same problem, e.g. ActiveModel::Serializers, JBuilder, RABL. Are there any other popular alternatives that I've missed to have a look at?
[16:15:59] casadei: has joined #ruby
[16:16:29] burgestrand: (aside from building a hash and sprinkling if-statements)
[16:17:03] burgestrand: (I asked the same question in #RoR last week I believe, which gave me RABL, hadn't seen that one before.)
[16:17:35] soc42: has joined #ruby
[16:18:21] bricker: has joined #ruby
[16:18:22] eosinx: has joined #ruby
[16:18:55] TomyLobo: has joined #ruby
[16:19:14] nolic: has joined #ruby
[16:19:49] bronson: has joined #ruby
[16:19:49] symm-: has joined #ruby
[16:20:06] jamesaxl: has joined #ruby
[16:20:27] djbkd: has joined #ruby
[16:20:43] ebragaparah: has joined #ruby
[16:20:57] workmad3: has joined #ruby
[16:23:51] SylarRuby: has joined #ruby
[16:24:13] rickmasta: has joined #ruby
[16:25:41] weaksauce: has joined #ruby
[16:26:15] iamninja: has joined #ruby
[16:26:42] malconis_: has joined #ruby
[16:26:45] Sou|cutter: Burgestrand: Possibly https://github.com/apotonick/representable
[16:27:04] burgestrand: has joined #ruby
[16:27:25] malconis_: has joined #ruby
[16:27:36] SylarRuby: has joined #ruby
[16:28:01] burgestrand: Sou|cutter: Thanks! I'm just on my way home now, so I'll have a thorough look tomorrow. :)
[16:28:03] shevy: say you have such a logo http://shevegen.square7.ch/COOKBOOKS_LOGO.png ... does anyone of you know of a simple way to randomly alternate all colours, via ruby? (can use imagemagick/rmagick of course) I want to do so programmatically rather than manually
[16:29:00] skade: has joined #ruby
[16:30:58] davedev24: has joined #ruby
[16:31:22] speakingcode: has joined #ruby
[16:33:17] workmad3: has joined #ruby
[16:33:17] p0wn3d__: has joined #ruby
[16:33:43] ebragapa_: has joined #ruby
[16:33:53] baweaver: has joined #ruby
[16:34:37] ellisTAA: has joined #ruby
[16:34:39] rezzack: has joined #ruby
[16:35:03] rbennacer: has joined #ruby
[16:35:30] startupality: has joined #ruby
[16:35:50] brendan-: has joined #ruby
[16:36:33] baweaver: has joined #ruby
[16:37:25] vjdhama: has joined #ruby
[16:38:31] j4cknewt: has joined #ruby
[16:38:45] greenarrow: has joined #ruby
[16:39:24] startupality: has joined #ruby
[16:40:05] devoldmx: has joined #ruby
[16:41:03] pengin: has joined #ruby
[16:41:09] Technodrome: has joined #ruby
[16:41:35] Macaveli: has joined #ruby
[16:43:13] Musashi007: has joined #ruby
[16:43:46] rbennacer: has joined #ruby
[16:44:51] tkuchiki: has joined #ruby
[16:44:52] voltalio: has joined #ruby
[16:45:10] psye: has joined #ruby
[16:45:23] gurix: has joined #ruby
[16:46:36] psye: has joined #ruby
[16:46:45] marahin: has joined #ruby
[16:48:08] RobertBirnie: has joined #ruby
[16:48:28] giuseppesolinas: has left #ruby: ("Leaving")
[16:49:06] giuseppesolinas: has joined #ruby
[16:50:11] wpp: has joined #ruby
[16:50:55] Oka: has joined #ruby
[16:51:02] jdawgaz: has joined #ruby
[16:51:11] wpp: has joined #ruby
[16:51:27] armyriad: has joined #ruby
[16:53:21] nzst: has joined #ruby
[16:54:21] karapetyan: has joined #ruby
[16:54:25] rnga: has joined #ruby
[16:55:01] pontiki: has joined #ruby
[16:55:16] andyrs: has joined #ruby
[16:55:55] last_staff: has joined #ruby
[16:56:08] ericjphillips: has joined #ruby
[16:57:40] jas02: has joined #ruby
[16:58:20] bronson: has joined #ruby
[16:58:59] drptbl: has joined #ruby
[17:00:26] scoot: has joined #ruby
[17:00:41] chipotle: has joined #ruby
[17:02:52] platzhirsch: has left #ruby: ()
[17:05:22] wallerdev: has joined #ruby
[17:05:22] jenrzzz: has joined #ruby
[17:05:39] djbkd: has joined #ruby
[17:05:55] mjuszczak: has joined #ruby
[17:06:16] workmad3: has joined #ruby
[17:06:42] rehat: has joined #ruby
[17:06:52] blackmes1: has joined #ruby
[17:09:03] tomphp: has joined #ruby
[17:09:23] yfeldblum: has joined #ruby
[17:09:50] eat_multi: has joined #ruby
[17:10:30] Pupeno: has joined #ruby
[17:11:26] banjara: has joined #ruby
[17:11:29] blackmesa: has joined #ruby
[17:12:08] yfeldblum: has joined #ruby
[17:12:24] towski_: has joined #ruby
[17:13:13] pengin: has joined #ruby
[17:14:36] joast: has joined #ruby
[17:17:05] blackmes1: has joined #ruby
[17:17:22] wryfi: has joined #ruby
[17:17:41] wryfi: i'm seeing some confusing behavior between bundler and chruby
[17:17:59] wryfi: i am using chruby with a ruby-installed ruby in opt
[17:18:37] wryfi: chruby sets my $GEM_HOME to $HOME/.gem/ruby/2.2.3
[17:19:08] wryfi: and puts $HOME/.gem/ruby/2.2.3/bin on my $PATH
[17:19:31] wryfi: when i install gems with gem, they get installed in $GEM_HOME
[17:19:56] wryfi: but when i install them with bundler, they end up in a path based on ABI version, $HOME/.gem/ruby/2.2.0
[17:20:04] ruboto: I don't know anything about ABI
[17:20:04] wryfi: which is not put on my path by chruby
[17:20:22] wryfi: can anybody help me figure out what to do to make these things play nice together?
[17:20:37] adaedra: Are you sure it's using the right bundler?
[17:21:17] parduse: has joined #ruby
[17:21:24] wryfi: adaedra: yes, my first step is gem install bundler, which goes into $GEM_HOME, and is what shows up when i do `which bundle`
[17:21:33] Hanmac: has joined #ruby
[17:21:49] adaedra: Does `gem env` looks correct?
[17:21:52] asxbr: has joined #ruby
[17:21:59] wryfi: yes, gem env looks exactly correct
[17:22:05] Pupeno: has joined #ruby
[17:22:22] wryfi: and, in fact, things installed via gem go exactly where they're supposed to
[17:22:38] wryfi: it's just the bundler gems that go in the ABI-versioned directory instead
[17:22:43] asxbr: has joined #ruby
[17:22:44] Aswebb__: has joined #ruby
[17:23:04] benlieb: has joined #ruby
[17:23:36] krisquigley: has joined #ruby
[17:23:39] wryfi: (and i've done this twice now in clean environments, so i'm probably not completely crazy)
[17:23:57] jenrzzz: has joined #ruby
[17:24:22] dfockler: do the gems not work when they are installed in the ABI directory?
[17:25:25] blackmes1: has joined #ruby
[17:25:56] allcentury: has joined #ruby
[17:26:38] wpp: has joined #ruby
[17:27:41] slayerjain: has joined #ruby
[17:28:21] rbennacer: has joined #ruby
[17:28:38] jamesaxl: has joined #ruby
[17:28:40] imperator: has left #ruby: ("Leaving")
[17:28:58] voltalio: has joined #ruby
[17:29:51] ragingcake: has joined #ruby
[17:30:06] renderful: has joined #ruby
[17:30:14] weemsledeux: has joined #ruby
[17:31:57] momomomomo: has joined #ruby
[17:31:59] nateberkopec: has joined #ruby
[17:32:27] tomphp: has joined #ruby
[17:32:57] wryfi: dfockler: not without manually manipulating my PATH and GEM_PATH
[17:33:02] shadoi: has joined #ruby
[17:33:14] havenwood: has joined #ruby
[17:33:20] jhass: wryfi: https://github.com/postmodern/chruby/issues/235
[17:33:43] jhass: ah you commented there ;P
[17:34:07] wryfi: jhass: yeah, and the maintainer pointed his finger at bundler
[17:34:31] jhass: I agree that bundler should respect GEM_HOME unless --path is given
[17:34:34] andyrs: has joined #ruby
[17:34:38] jhass: if it doesn't, it's a bug
[17:34:58] wryfi: even passing it --path, it adds the version component itself
[17:35:19] ht__: has joined #ruby
[17:35:20] jhass: that's intended there
[17:35:36] jhass: so stuff gets reinstalled when you switch ruby versions
[17:35:37] rbennacer: has joined #ruby
[17:36:32] malconis: has joined #ruby
[17:36:56] musl_: has joined #ruby
[17:39:11] Swappticon: has joined #ruby
[17:39:47] momomomomo_: has joined #ruby
[17:40:30] codecop: has joined #ruby
[17:42:44] bmurt: has joined #ruby
[17:42:58] krz: has joined #ruby
[17:43:07] Kittr: has joined #ruby
[17:43:27] SCHAAP137: has joined #ruby
[17:44:44] ericjphillips: has joined #ruby
[17:44:48] scoot: has joined #ruby
[17:45:05] Igorshp: has joined #ruby
[17:45:47] andyrs: has joined #ruby
[17:46:00] ruurd: has joined #ruby
[17:47:49] jenrzzz: has joined #ruby
[17:48:11] ramfjord: has joined #ruby
[17:48:13] aldodelgado: has joined #ruby
[17:48:37] webopsx: has joined #ruby
[17:48:53] Technodrome: has joined #ruby
[17:49:50] spcmastertim: has joined #ruby
[17:51:11] RegulationD: has joined #ruby
[17:51:26] chrisja: has joined #ruby
[17:52:04] wldcordeiro: has joined #ruby
[17:52:09] PlasmaStar: has joined #ruby
[17:53:44] willywos: has joined #ruby
[17:54:14] gregf: has joined #ruby
[17:54:30] aghalarp: has joined #ruby
[17:55:34] Pupeno: has joined #ruby
[17:57:42] jenrzzz: has joined #ruby
[17:57:54] youngbaks: has joined #ruby
[17:59:46] casadei: has joined #ruby
[18:00:02] Azure|dc: has joined #ruby
[18:00:15] firstdayonthejob: has joined #ruby
[18:00:58] wallerdev: has joined #ruby
[18:01:20] benlieb: has joined #ruby
[18:02:25] crdpink: has joined #ruby
[18:03:06] pengin: has joined #ruby
[18:03:20] saddad: has joined #ruby
[18:03:32] petricore: has joined #ruby
[18:03:44] barhum2013: has joined #ruby
[18:03:57] siaW: has left #ruby: ()
[18:03:58] bigmac: has joined #ruby
[18:05:15] wildlander: has joined #ruby
[18:05:35] chipotle: has joined #ruby
[18:06:04] ericjphillips: has left #ruby: ()
[18:07:31] allomov: has joined #ruby
[18:08:30] ericjphillips: has joined #ruby
[18:08:46] EmeraldExplorer: has joined #ruby
[18:09:05] EmeraldExplorer: What looks nicer? do end or {} ?
[18:09:34] centrx: Generally use do end for multi-line blocks and {} for one-line blocks
[18:09:44] centrx: *same line
[18:10:08] treehug88: has joined #ruby
[18:12:22] lemur: has joined #ruby
[18:12:29] spcmastertim: has joined #ruby
[18:13:16] EmeraldExplorer: is "self" automatically assumed ruby when defining methods?
[18:13:40] workmad3: has joined #ruby
[18:13:42] Luming: has joined #ruby
[18:13:46] shevy: self will always be something
[18:13:55] deject3d: has joined #ruby
[18:14:58] scoot: has joined #ruby
[18:15:20] barhum2013: has joined #ruby
[18:15:20] EmeraldExplorer: shevy: Is it assumed though? I mean if I did def hi ... it would be the same thing as def self.hi , correct?
[18:15:59] wallerdev: def self.hi defines it on the class
[18:16:13] wallerdev: >> class Cool; def self.hi; puts 'hi'; end end; Cool.hi
[18:16:14] ruboto: wallerdev # => hi ...check link for more (https://eval.in/438479)
[18:16:41] wallerdev: def hi puts it on the object instantiated by that class
[18:18:00] andyrs: has joined #ruby
[18:18:21] lemur: has joined #ruby
[18:19:22] wallerdev2: has joined #ruby
[18:20:18] workmad3: has joined #ruby
[18:20:28] bruno-: has joined #ruby
[18:20:49] EmeraldExplorer: wallerdev: Oh, I think I see. So is self like static in anyway?
[18:20:58] EmeraldExplorer: BTW im referring to Java
[18:21:10] EmeraldExplorer: ... if you know about that language
[18:21:25] iamvery: has joined #ruby
[18:21:28] deject3d: no self is not like static
[18:21:49] EmeraldExplorer: deject3d: what is the difference?
[18:21:49] deject3d: what is your understanding of static?
[18:22:19] baweaver: ACTION grabs popcorn
[18:22:27] EmeraldExplorer: deject3d: static is a method of a class, not an object, and can be used from any other class ex: ClassName.method
[18:23:20] deject3d: and what about the context of variables?
[18:23:33] meatherly: has joined #ruby
[18:23:40] deject3d: yes you can use ClassName.method() on a static method named 'method' in your example.. but you know why, right?
[18:23:48] polly_wog: has joined #ruby
[18:24:02] EmeraldExplorer: deject3d: because it is part of the class...
[18:24:21] nateberkopec: has joined #ruby
[18:24:27] EmeraldExplorer: deject3d: not an object
[18:24:34] siaW: has joined #ruby
[18:25:43] pragmatism: has joined #ruby
[18:26:29] based_pdev_: has joined #ruby
[18:26:41] EmeraldExplorer: Also one last question, how do I quickly do many def objectName.methodName s without repeating objectName? I know I have it in my notes somewhere but I can't seem to find it :,(
[18:27:05] Jackneill: has joined #ruby
[18:27:25] siaW: what???s bad about this? https://gist.github.com/siaw23/658b97f9e9b6886e9a62
[18:27:27] pipework: EmeraldExplorer: You don't *need* the object name if you're in the context of the object, the object's class, or the object's eigenclass.
[18:27:36] pipework: Depending on where the method should go and what kind of object it is.
[18:28:10] ngscheur1: has joined #ruby
[18:28:23] barhum2013: has joined #ruby
[18:28:26] Xeago: has joined #ruby
[18:28:28] ruurd: has joined #ruby
[18:29:41] deject3d: EmeraldExplorer yeah i wasn't paying attention to the convo, a "def self.whatever" is a lot like a static method in java
[18:30:41] spcmastertim: has joined #ruby
[18:31:10] shevy: what does the name "static" method actually imply?
[18:31:42] shevy: EmeraldExplorer ruby core tends to use module_function()
[18:32:03] deject3d: only one instance exists
[18:32:14] shevy: EmeraldExplorer look at the first example, run it in a .rb file, then you understand it: http://ruby-doc.org/core-2.2.0/Module.html#method-i-module_function
[18:32:33] shevy: for some strange reason, I prefer doing "def self." myself
[18:32:53] rehat: has joined #ruby
[18:34:02] sanguisdex: has joined #ruby
[18:34:35] meatherly: has joined #ruby
[18:34:42] voltalio_: has joined #ruby
[18:34:49] skweek: has joined #ruby
[18:36:22] agent_meerkat: has joined #ruby
[18:36:43] EmeraldExplorer: In ruby is it OK to use semicolons?
[18:37:01] pipework: sure, but most people don't unless they're doing a one-liner that requires it.
[18:37:33] apeiros: pipework: ; for one-liners is cheat :(
[18:37:34] EmeraldExplorer: But it's not like a good practice to include them, right?
[18:37:38] apeiros: EmeraldExplorer: no
[18:37:45] apeiros: not good practice. leave them away.
[18:37:49] pipework: apeiros: is true
[18:37:51] apeiros: and don't write code which uses ;
[18:37:58] shevy: EmeraldExplorer use them when you need them, which means 98% of the time you don't need them so you don't use them
[18:38:11] pipework: And even when you need them, consider writing better code.
[18:38:22] apeiros: shevy: if it's 2% of the time where you need them you have to revisit your coding style :-p
[18:38:24] ngscheur1: has joined #ruby
[18:38:31] apeiros: should be more in the range of 0.002%
[18:38:33] shevy: nah, I use it for short methods like
[18:38:37] shevy: p; x; f; n
[18:39:10] pipework: I use semicolons in irb, pry, and ruby -e
[18:39:11] apeiros: I think the only time I use them is for exception subclasses
[18:39:12] EmeraldExplorer: shevy: obfuscation :,(
[18:39:22] apeiros: ah well, pry is a different matter. there I use ; extensively.
[18:39:40] shevy: EmeraldExplorer hey... we have Kernel#p ... and http://apidock.com/ruby/Kernel/y
[18:39:45] blackmesa: has joined #ruby
[18:39:54] shevy: hmm the latter probably changed
[18:40:01] shevy: from syck to psych
[18:40:15] pipework: I've also rarely used them in procs for default_proc in hashes that were super short.
[18:40:23] pipework: But that's not a good reason
[18:40:33] lulzmachine: has joined #ruby
[18:40:41] shevy: EmeraldExplorer I actually don't use such short methods :)
[18:40:41] HAL2328: has joined #ruby
[18:40:52] HAL2328_: has joined #ruby
[18:41:04] shevy: except for p object
[18:42:00] pipework: s/object/method/
[18:42:12] pipework: Which is an object, a method object!
[18:42:41] broconne: has joined #ruby
[18:42:55] jas02: has joined #ruby
[18:43:01] andyrs: has joined #ruby
[18:44:24] skade: has joined #ruby
[18:44:55] shevy: pipemethod
[18:44:58] dfockler: the classic ruby Method object
[18:45:35] eat_multi: has joined #ruby
[18:45:39] apeiros: ACTION still sad that UnboundMethod#bind does not accept just any obj as argument
[18:46:11] Igorshp: has joined #ruby
[18:46:15] tkuchiki: has joined #ruby
[18:46:56] Tuxero: has joined #ruby
[18:47:05] dfockler: has to be on the same class huh?
[18:47:14] apeiros: or subclass, yes
[18:47:43] dfockler: Can't just slap methods onto classes willy nilly
[18:47:58] pipework: Neither willy nor nilly should involved in the decision making process here.
[18:48:06] arup_r: has joined #ruby
[18:48:08] ndrei: has joined #ruby
[18:48:08] broconne: I have been trying to solve an issue for a while now.. Googled high and low.. Looked at a lot of different alternatives (including omnibusing a gem w/ ruby just to get around it). But I feel like I must be missing something obvious.. I have a gem I made.. every time I run it.. I get a warning about unresolved specs because multiple versions of gems exist on a system (I think). Is there a way to get around the warning? if I bundle exec, it works fine.. But
[18:48:40] dfockler: broconne: that's what bundler is for
[18:48:55] spider-mario: has joined #ruby
[18:49:20] broconne: dfockler.. I get that.. I guess. but is there really know way to create a gem and have it just be something people can execute? Or is that why chef has appbundler, omnibus, etc?
[18:49:30] nym: has joined #ruby
[18:49:39] pipework: broconne: Sure! You just have to use bundler's ruby interface.
[18:49:48] pipework: As early as possible in the invocation.
[18:49:50] broconne: I mean, it does execute.. it just spits out a bunch of warnings that more than one gem exists.. kind of just want to shutup the warnings and have it pick one that matches my specs.
[18:50:20] broconne: pipework. what do you mean, just setting it to an exact version like appbundler does?
[18:50:31] pipework: I don't know what appbundler is
[18:50:56] broconne: https://github.com/chef/appbundler
[18:51:01] broconne: its how I guess chef gets around this problem.
[18:51:12] broconne: but it generates an executable with a locked down list of gems.
[18:52:08] dfockler: That's what your Gemfile.lock is for, so you have a set of dependent gems
[18:52:24] broconne: but the Gemfile.lock doesn't get installed w/ a gem right?
[18:52:36] bmurt: has joined #ruby
[18:52:59] broconne: like gem install doesn't generate a Gemfile.lock, right?
[18:53:08] pipework: broconne: You'd make your gem have dependencies in the gemspec.
[18:53:28] broconne: pipework: I do..
[18:53:31] broconne: then I build a gem
[18:53:59] pipework: broconne: If the gem is the app, the gem needs all the dependencies in the gemspec.
[18:53:59] broconne: then someone else runs the gem that happens to have two versions of a dependency isntalled (I don't care which one gets used). and they get a warning message.
[18:54:15] shevy: broconne normally a gem will just have a .gemspec, Gemfile* variants were introduced by bundler
[18:54:30] broconne: yep.. i have a gemspec
[18:54:35] pipework: broconne: When you say 'run the gem' do you mean that they call an executable that the gem ships with?
[18:54:43] broconne: pipeowrk: yes call the executable
[18:54:57] pipework: broconne: You can tab-complete nicks if your IRC client isn't terrible.
[18:54:58] broconne: and when I do.. I get this:
[18:55:04] broconne: WARN: Unresolved specs during Gem::Specification.reset:
[18:55:04] broconne: ohai (~> 8.0)
[18:55:11] broconne: but about 10 other gems listed
[18:55:13] shevy: how do you get that
[18:55:21] broconne: I run my gem executable
[18:55:35] Macaveli: has joined #ruby
[18:55:36] broconne: which is generated by rubygems (according to the comment)
[18:55:47] pipework: broconne: 'I run', as in direct invocation that looks like what?
[18:55:48] shevy: not sure that pipework meant that
[18:55:56] pipework: `my_gem_executable`?
[18:56:04] pipework: `bundle exec my_gem_executable`?
[18:56:11] broconne: my_gem_executable
[18:56:14] broconne: without bundle
[18:56:25] broconne: after the gem is insalled with "gem install my_gem"
[18:56:38] dionysus69: has joined #ruby
[18:56:45] shevy: this should require a bin/my_gem_executable file
[18:56:56] RegulationD: has joined #ruby
[18:57:02] broconne: yes. I have my executable in there
[18:57:17] broconne: and rubygems then seems to generate another one for me.
[18:57:27] shevy: one with the shebang line changed I guess
[18:57:28] broconne: that does the load, etc.
[18:57:45] broconne: mine doesn't have a shebang
[18:57:45] shevy: as far as I know, only the top line is changed, are you sure that this will do the load instead?
[18:57:46] jackjackdripper: has joined #ruby
[18:57:50] broconne: that is rubygems job I thought.
[18:57:58] broconne: no, it generated a whole new thing
[18:58:06] broconne: then does a load Gem.bin_path at hte bottom
[18:58:07] shevy: it does not know what it should load, that is what the lib/ files should do, not the bin/ files
[18:58:22] cnm: has joined #ruby
[18:58:29] shevy: huh... who added the Gem.bin_path thing
[18:58:38] broconne: gem install I am pretty sure does
[18:58:46] broconne: that is why you specify your bin files in the gemspec
[18:58:48] ta: has joined #ruby
[18:58:49] shevy: I am pretty sure it does not
[18:59:04] shevy: yes, in the .gemspec file you specify what is to be part of your .gem
[18:59:04] jackjackdripper: has joined #ruby
[18:59:29] shevy: but the bin/* files are or should just be commandline invocation variants
[18:59:37] jenrzzz: has joined #ruby
[19:00:20] broconne: ok.. so I lied.. I have a shebang in mine.. I do #!/usr/bin/env ruby
[19:00:23] broconne: then some requires
[19:00:30] broconne: then I start (it uses thor)
[19:00:35] broconne: the one that gets installed on the ssytem
[19:00:51] broconne: in the path.. is purely generated by rubygems and just references mine.
[19:01:06] shevy: what does it actually "reference" and how?
[19:01:23] broconne: http://help.rubygems.org/discussions/problems/832-rubygems-executables-dont-seem-to-work
[19:01:27] broconne: not mine.. but look at that example
[19:01:38] bodgix: has joined #ruby
[19:01:41] broconne: where its ays 'this file was geneated by rubygems'
[19:01:49] broconne: that is exactly what I have (but the actual gem is different
[19:02:04] `based_pdev`: has joined #ruby
[19:02:25] shevy: hmm what is your gem and ruby version by the way?
[19:02:42] broconne: its not in the ruby gem repo.
[19:02:47] broconne: its in a a private repo
[19:03:05] shevy: ruby -v; gem -v
[19:03:09] MeMoc: has joined #ruby
[19:03:30] broconne: ruby -v; gem -v
[19:03:30] broconne: ruby 2.1.6p336 (2015-04-13 revision 50298) [x86_64-linux]
[19:04:00] codex: has joined #ruby
[19:04:07] aldodelgado: has joined #ruby
[19:04:40] shevy: very strange... I know that rubygem changes the shebang line, but that it also changes the content of a file....
[19:05:08] broconne: yeah, it generates its own thing.. I think to manage dependent gems, etc?
[19:05:39] shevy: don't think so, I have dependencies listed in .gemspec for my own gems and that has never happened to me (save for the shebang change)
[19:05:51] Kitsunitchi: has joined #ruby
[19:06:27] broconne: http://2ndscale.com/rtomayko/2009/require-rubygems-antipattern
[19:06:40] broconne: that link seems to indicate that: RubyGems installs special wrapper versions of executables included with gems.
[19:06:44] pipework: broconne: gem cleanup your_gem
[19:07:14] pipework: broconne: Also, that's many years old.
[19:07:27] broconne: chef gem cleanup does not resolve the issue
[19:07:50] jamesaxl|2: has joined #ruby
[19:07:53] broconne: gem cleanup
[19:07:54] pipework: bundle clean --force
[19:08:02] pipework: Inside your gem then rebuild
[19:08:36] symm-: has joined #ruby
[19:08:51] jamesaxl: has joined #ruby
[19:08:52] andyrs: has joined #ruby
[19:08:59] Coldblackice: has joined #ruby
[19:10:00] jas02: has joined #ruby
[19:10:22] Kitsunitchi: has left #ruby: ()
[19:10:27] karapetyan: has joined #ruby
[19:10:49] sepp2k: has joined #ruby
[19:10:57] platzhirsch: has joined #ruby
[19:11:32] shevy: broconne the entry at http://2ndscale.com/rtomayko/2009/require-rubygems-antipattern is very old :)
[19:11:42] shevy: "When I use your library, deploy your app, or run your tests I may not want to use rubygems."
[19:11:46] shevy: "When you require 'rubygems' in your code, you remove my ability to make that decision."
[19:11:48] shevy: "I cannot unrequire rubygems, but you can not require it in the first place."
[19:12:23] stryek: has joined #ruby
[19:12:26] nateberkopec: has joined #ruby
[19:12:39] wharr__: has joined #ruby
[19:12:49] wharr__: have yall used the ruby debugger on sublime with vagrant before?
[19:12:56] JDiPierro: has joined #ruby
[19:12:59] apeiros: shevy: well, you still don't require 'rubygems' in your code :-p
[19:13:03] arian0n: has joined #ruby
[19:13:13] broconne: shevy: Wasn't suggesting that the content in the blog was good advice.. was just posting to an example of the executable that ruby gems generates.
[19:13:41] hobodave: has joined #ruby
[19:14:47] shevy: apeiros I can!!!
[19:14:58] apeiros: sure. but you shouldn't
[19:15:04] shevy: I don't :-)
[19:15:08] msb_: has joined #ruby
[19:15:21] shevy: I am always trying to get rid of lines
[19:15:45] renderful: has joined #ruby
[19:16:05] scoot: has joined #ruby
[19:16:40] matthew0: has joined #ruby
[19:16:41] yqt: has joined #ruby
[19:19:21] swgillespie: has joined #ruby
[19:19:44] momomomomo: has joined #ruby
[19:21:22] bruno-: has joined #ruby
[19:21:55] iamvery: has joined #ruby
[19:23:17] jas02: has joined #ruby
[19:24:33] krisquigley: has joined #ruby
[19:24:44] baweaver: has joined #ruby
[19:24:56] Torrieri: has joined #ruby
[19:24:56] Torrieri: has joined #ruby
[19:25:20] leafybasil: has joined #ruby
[19:26:44] last_staff: has joined #ruby
[19:28:40] danoo_: has joined #ruby
[19:28:54] zenspider: shevy: Gem.bin_path is really old.
[19:28:57] zenspider: what's the actual problem?
[19:31:11] symm-: has joined #ruby
[19:31:12] elperdut: has joined #ruby
[19:31:18] shevy: broconne had some problem
[19:31:31] shevy: Not sure whether he did manage to resolve it
[19:31:47] startupality: has joined #ruby
[19:31:59] sship_: has joined #ruby
[19:32:11] parduse: has joined #ruby
[19:32:26] kirun: has joined #ruby
[19:32:43] sship_: I'm on Ubuntu. When installing gems, should I use 'gem install xyz' or 'sudo gem install xyz'? I have Ruby installed system-wide. I am not using RVM or anything.
[19:32:56] iamvery: has joined #ruby
[19:33:16] tubbo: sship_: does `gem install xyz` work?
[19:33:26] SumoBoy: has joined #ruby
[19:33:35] zenspider: if you're installing the gem to be used system-wide, use sudo. If not, flip a coin
[19:33:38] havenwood: sship_: The default setup with the Ubuntu package manager Ruby is system-wide gems, so sudo.
[19:33:41] sship_: tubbo: I didn't try it in case something goes wrong. Wanted to ask here first.
[19:34:18] petricore: has joined #ruby
[19:34:46] dfockler: Is there a way to call a specific method in a ruby script from the command line?
[19:35:24] dfockler: oh yeah adaedra thanks
[19:35:27] fantazo: has joined #ruby
[19:35:32] sship_: When I install a gem to be used system-wide...will it conflict with other gems if I decide to use RVM in the future?
[19:35:51] havenwood: dfockler: ruby -ryour_gem_here -e "YourGemHere.method_here"
[19:35:56] nfk: has joined #ruby
[19:36:05] adaedra: sship_: rvm will have its own gem directory.
[19:36:28] havenwood: sship_: Whether you use RVM or chruby or whatnot they don't care about your system Ruby.
[19:36:32] MTGeni: has joined #ruby
[19:37:40] sship_: So I could have a gem system-wide and I could have the same gem in rvm's gem directory with no confliction, correct?
[19:37:46] mary5030: has joined #ruby
[19:37:46] hobodave: has joined #ruby
[19:38:11] havenwood: sship_: With your system Ruby you can also install gems in the user home directory instead of the system GEM_HOME like `gem install example --user-install` or more set it permanently for the user in a gemrc file.
[19:38:39] havenwood: sship_: Yeah, sure, that's no problem.
[19:40:19] momomomomo_: has joined #ruby
[19:40:20] karapetyan: has joined #ruby
[19:40:23] sship_: havenwood: Alright. Thanks!
[19:42:00] wallerdev: has joined #ruby
[19:42:59] Mattick: has joined #ruby
[19:46:25] hal_9000__: has joined #ruby
[19:46:35] chipotle: has joined #ruby
[19:46:45] tkuchiki: has joined #ruby
[19:46:54] zenspider: drbrain: oi. my gem cert expired? does that mean I need to re-publish everything ever published with it? or?
[19:47:48] drbrain: this is the shitty unimplemented part of gem certs, "yes"
[19:47:57] Igorshp: has joined #ruby
[19:47:57] drbrain: but you can't because rubygems doesn't allow re-upload
[19:48:12] pen: has joined #ruby
[19:48:13] drbrain: alternate solution, make your cert lifetime something ridiculous like 10 years
[19:48:51] drbrain: or make a CA cert that has a ridiculous lifetime, then a child cert with a short lifetime you use for signing
[19:48:58] drbrain: then publish the CA cert
[19:49:02] v0n: has joined #ruby
[19:50:18] freerobby: has joined #ruby
[19:51:33] evanjs: has joined #ruby
[19:51:38] zenspider: mmmm... you think I understand that shit. :P
[19:51:44] drbrain: nobody does
[19:52:20] zenspider: well fuck. republishing 90+ gems because of certs pretty much means: stop signing gems
[19:52:29] zenspider: because that isn't worth it
[19:53:13] einarj: has joined #ruby
[19:53:24] drbrain: convince people that want signed gems to pick up the TUF work since that's secure over the transport instead of inside the gem
[19:54:15] Mattick: has joined #ruby
[19:54:46] zenspider: gem cert --help doesn't mention anything about expiry
[19:55:05] dfockler: write a gem to help publish the gems
[19:55:57] Pupeno: has joined #ruby
[19:55:59] zenspider: already did that. still have to do 90 revs
[19:56:01] zenspider: for nothing
[19:57:29] drbrain: if you don't use the strictest install setting rubygems won't check timestamps
[19:58:12] benlieb: has joined #ruby
[19:58:28] s2013: has joined #ruby
[19:59:09] hamilto-nyan: has joined #ruby
[19:59:11] x-light: has joined #ruby
[19:59:19] zenspider: how do I test a cert file?
[19:59:38] zenspider: looks like it moved the expired one to the side and generated a new one
[19:59:50] troyready: has joined #ruby
[19:59:58] zenspider: also looks like I dealt with cert shit in june. this is getting stupid
[20:00:19] frmendes: has joined #ruby
[20:00:33] blackmes1: has joined #ruby
[20:01:31] VeryBewitching: has joined #ruby
[20:01:38] wallerdev: has joined #ruby
[20:02:15] dfockler: to be fair, most of us don't have 90+ gems :P
[20:02:20] bruno-: has joined #ruby
[20:02:30] momomomomo: has joined #ruby
[20:03:49] zenspider: dfockler: and? what's your point?
[20:04:02] dfockler: I don't know
[20:04:15] parduse: has joined #ruby
[20:04:59] platzhirsch: has left #ruby: ()
[20:07:27] zenspider: dfockler: then... good job contributing to the signal
[20:07:32] pen: has joined #ruby
[20:08:08] skade: has joined #ruby
[20:08:12] startupality: has joined #ruby
[20:08:23] workmad3: has joined #ruby
[20:09:35] Gustavo: has joined #ruby
[20:09:43] baweaver: ACTION counts his gems
[20:10:32] baweaver: 20, need more gems...
[20:10:37] shevy: push it, push it real good
[20:10:44] allomov: has joined #ruby
[20:10:57] Gustavo: Does anyone know of a place on the web to discuss and get input on implementation tactics?
[20:10:58] swgillespie: has joined #ruby
[20:11:07] Gustavo: For more open-ended questions than stack overflow allows..
[20:11:36] devoldmx: has joined #ruby
[20:12:48] naftilos76: has joined #ruby
[20:12:53] zapata: has joined #ruby
[20:13:41] krisquigley: has joined #ruby
[20:15:25] jdawgaz: has joined #ruby
[20:15:51] havenwood: has joined #ruby
[20:16:01] duggiefresh: has joined #ruby
[20:16:41] wallerdev: has joined #ruby
[20:17:33] pen: has joined #ruby
[20:18:58] hobodave: has joined #ruby
[20:19:01] tomphp: has joined #ruby
[20:19:27] zenspider: gustav_: some sort of realtime chat forum, perhaps?
[20:20:00] Gustavo: zenspider: sure ;). but web would be nice - more visible etc
[20:20:38] zenspider: gustav_: https://webchat.freenode.net
[20:20:57] baweaver: ACTION rolls laughing
[20:21:36] m8: has joined #ruby
[20:21:49] vdamewood: has joined #ruby
[20:22:11] baweaver: There are over 1000 users here y'know
[20:22:19] baweaver: we just don't talk all the time.
[20:22:41] pragmatism: has joined #ruby
[20:23:18] pengin: has joined #ruby
[20:23:40] dfockler: So what's the point of a self-signed cert?
[20:24:27] nettoweb: has joined #ruby
[20:24:35] shevy: see, I have not even reached that point, I don't even know why I need a cert
[20:25:23] baweaver: You'd be fine getting a band-aid from a random person claiming medical experience, but probably not with surgery without a validated doctor.
[20:25:51] cmisenas: has joined #ruby
[20:26:18] shevy: I don't trust any doctors anyway!
[20:26:19] baweaver: in some more important cases (Devise, CanCanCan, Pundit) you want to verify the integrity of the gem to a stricter level than you would with basic functionality helpers
[20:26:28] einarj: has joined #ruby
[20:27:33] dfockler: It just says the gem code was written by the who the cert says it was written by
[20:27:54] dfockler: s/the who/the person who
[20:28:18] dfockler: or who ever the private key belongs to
[20:28:27] Torrieri: has joined #ruby
[20:30:30] Torrieri: has joined #ruby
[20:30:30] Torrieri: has joined #ruby
[20:32:59] Torrieri: has joined #ruby
[20:34:44] jimster: has joined #ruby
[20:35:50] jimster: will --disable-install-rdoc omit the rdoc gem from rubycore?
[20:35:58] n_blownapart: has joined #ruby
[20:36:10] zenspider: mmm... don't think so, but not actually sure what you're referring to
[20:36:26] jimster: it's a configure option when building ruby
[20:36:28] bazbing80: has joined #ruby
[20:36:47] mary5030: has joined #ruby
[20:36:58] adaedra: jimster: apparently not
[20:37:24] jimster: the description reads like it results in skipping rdoc creation, and rdoc gem is included. but I hoped to confirm here.
[20:37:56] michaeldeol: has joined #ruby
[20:38:01] zenspider: jimster: "do not install neither rdoc indexes nor C API documents during install"
[20:38:05] baweaver: has joined #ruby
[20:38:21] zenspider: I'm guessing it has no effect on the installation of the gem
[20:38:31] jimster: yea, that's what I was thinking as well
[20:38:44] zenspider: I'll go a step further... I don't think rdoc IS installed as a gem
[20:38:54] zenspider: not a real one, at least
[20:39:11] adaedra: jimster: my ruby is installed with that option, and I have rdoc.
[20:39:18] jimster: that makes sense. I can't remove it
[20:39:23] axl_: has left #ruby: ()
[20:39:40] drewvanstone: has joined #ruby
[20:39:52] hobodave: has joined #ruby
[20:40:04] bigmac: has joined #ruby
[20:40:19] jimster: thanks guys
[20:42:51] otacon-: has joined #ruby
[20:44:07] workmad3: has joined #ruby
[20:46:35] skade: has joined #ruby
[20:47:44] benlovell: has joined #ruby
[20:48:04] jobewan: has joined #ruby
[20:50:30] nofxx: has joined #ruby
[20:50:43] michael_mbp: has joined #ruby
[20:51:17] momomomomo: has joined #ruby
[20:51:38] nofxx: Some change in load path or something in gem 2.4.8? Can't find my engines anymore...
[20:51:50] nofxx: don't even remeber updating rubygems =/
[20:52:11] wallerdev: has joined #ruby
[20:53:55] allomov: has joined #ruby
[20:55:12] meatherly: has joined #ruby
[20:55:21] wallerdev: has joined #ruby
[20:57:54] jacksonmills: has joined #ruby
[20:58:11] jordanm: has joined #ruby
[20:58:16] pusewicz: has joined #ruby
[20:59:03] Xeago: has joined #ruby
[20:59:05] havenwood: nofxx: If you update your Ruby you get the RubyGems it ships with.
[20:59:19] CrazyEddy: has joined #ruby
[20:59:31] CrazyEddy: has joined #ruby
[20:59:52] zenspider: anyone running Fedora 23? https://github.com/seattlerb/hoe/issues/69
[21:00:04] zenspider: I can't repro this. tenderlove can't repro this... no clue
[21:00:25] Musashi007: has joined #ruby
[21:00:43] michael_mbp: has joined #ruby
[21:01:59] mondayrain: has joined #ruby
[21:03:46] nzst: has joined #ruby
[21:05:42] diegoviola: has joined #ruby
[21:06:05] Pupeno_: has joined #ruby
[21:06:20] yfeldblum: has joined #ruby
[21:06:37] momomomomo: has joined #ruby
[21:06:49] renderful: has joined #ruby
[21:07:15] spcmastertim: has joined #ruby
[21:10:43] zenguy_pc: has joined #ruby
[21:11:05] einarj: has joined #ruby
[21:13:59] havenn: has joined #ruby
[21:15:04] swgillespie: has joined #ruby
[21:15:51] opensource_ninja: has joined #ruby
[21:16:04] wallerdev: has joined #ruby
[21:17:43] michael_mbp: has joined #ruby
[21:18:21] mwlang: Trying to learn a little Ruby here??? https://gist.github.com/mwlang/29e7899e5e971985b39d#file-foo-rb-L37-L39 How do I get ???foobar??? to be accessible to the &block?
[21:18:32] darix: zenspider: maybe ask for filesystem (as it was suspected)
[21:19:29] mwlang: my goal is to have foo X do |Y| where both X and Y are optionally supplied by the developer.
[21:19:53] FernandoBasso: has joined #ruby
[21:20:29] shevy: mwlang does your code work?
[21:20:32] bricker: zenspider: have him run it with $DEBUG
[21:20:48] bricker: maybe the clean plugin is failing
[21:20:50] mwlang: shevy: breaks on the highlighted lines.
[21:21:04] mwlang: the output.txt is the result of running the code.
[21:21:15] apeiros: mwlang: by dropping |foobar|
[21:21:23] apeiros: you're shadowing the outer variable
[21:21:35] skweek: has joined #ruby
[21:21:41] apeiros: and your foo method doesn't yield anything, which is why it's nil
[21:21:57] solocshaw: has joined #ruby
[21:22:10] mwlang: apeiros: well, I was messing around at that point. It???s my intent that when |foobar| is not supplied, I will supply a default.
[21:22:22] havenn: zenspider: Fedora 23 all green for me: ................................
[21:22:29] solocshaw: has joined #ruby
[21:22:35] apeiros: mwlang: that doesn't make much sense to me.
[21:22:39] borodin: has joined #ruby
[21:22:46] apeiros: mwlang: your foo method is responsible for yielding values
[21:22:53] apeiros: unless foo knows about foobar, it can't supply it
[21:22:59] apeiros: and right now it does not know about foobar.
[21:23:12] rodferso1: has joined #ruby
[21:23:29] mwlang: apeiros: let???s assume lines 1 - 6 don???t exist.
[21:23:32] zenspider: havenn: can you comment?
[21:23:38] platzhirsch: has joined #ruby
[21:23:41] havenn: zenspider: will do
[21:23:43] mwlang: I just want to know how I can detect I called foo with |foobar|
[21:23:52] mwlang: vs. just calling ???foo???
[21:24:07] apeiros: mwlang: block_given? tells you whether a block was supplied
[21:24:24] apeiros: number of params the block takes would be block.arity. but using that is brittle at best.
[21:24:56] apeiros: (and block.arity of course assumes &block in your method def)
[21:24:57] mwlang: apeiros: hmmm???what makes that brittle?
[21:24:58] zenspider: I'm... not sure what mwlang is asking still
[21:25:09] apeiros: mwlang: thousand and one way you'll go wrong with it
[21:27:12] but3k4: has joined #ruby
[21:27:29] shevy: mwlang think of {} blocks are extra argument; you can use instance_eval and class_eval to do fancy stuff until you no longer understand what is going on (add method_missing for the extra-win... ok you already are not sure what is going on there :D)
[21:27:30] apeiros: mwlang: also such kind of behavior is rather unexpected and will almost certainly confuse people using your code.
[21:28:05] shevy: Ruby tries to lure you with its wicked good looks but the cake is a lie.
[21:28:37] zenspider: mwlang: do you understand what |foobar| is in your code sample?
[21:28:40] mwlang: heh???I confess I???m just trying to understand AA???s DSL better and how the heck they implemented it.
[21:28:54] zenspider: I'm still not sure these ppl are answering your actual problem
[21:29:18] mwlang: zenspider: that???s precisely what I???m trying to understand.
[21:29:35] zenspider: mwlang: you're not asking good questions. do you understand the exception that was raised?
[21:29:54] zenspider: bring up irb/pry and try: nil.blah
[21:30:05] mwlang: zenspider: I understand why, yes.
[21:30:13] michael_mbp: has joined #ruby
[21:30:35] zenspider: I'm asking more what, then why, at this point
[21:30:49] zenspider: you got a NoMethodError
[21:30:54] nettoweb: has joined #ruby
[21:30:56] zenspider: that's important to pay attention to
[21:31:18] mwlang: zenspider: hold on. Let me come back with better questions.
[21:31:33] mwlang: googling block and arity is getting me documentation I was seeking.
[21:31:50] zenspider: I'm not sure it is what you should be looking at at this point
[21:32:02] nhhagen: has joined #ruby
[21:32:27] mwlang: zenspider: here???s what I???m trying to understand: Active Admin lets you define a column three ways:
[21:32:30] mwlang: column :foo
[21:33:05] mwlang: column :foo do |obj|; obj.do_something; end
[21:33:17] mwlang: column do |obj|; obj.do_something; end
[21:33:23] zenspider: ie don't try to tune an engine until you understand wheels and know how to inflate them
[21:33:31] mwlang: all I want to understand is how that DSL was implemented.
[21:34:00] mwlang: zenspider: ie. take an engine apart in order to understand how it works.
[21:34:44] zenspider: my point: understand the basics before you get to advanced shit.
[21:34:50] shevy: the method must exist
[21:35:00] zenspider: I don't think you understand the absolute basics of blocks yet
[21:35:14] ekinoxx: has joined #ruby
[21:35:52] jgt1: has joined #ruby
[21:36:32] iamvery: has joined #ruby
[21:36:53] Polysics: has joined #ruby
[21:36:54] baweaver: has joined #ruby
[21:37:52] apeiros: mwlang: that one involves zero magic and even less so block arity checking.
[21:38:27] radgeRayden: has joined #ruby
[21:38:29] kobain: has joined #ruby
[21:42:25] Xiti: has joined #ruby
[21:42:38] freerobby: has joined #ruby
[21:45:23] dcalan: has joined #ruby
[21:48:00] minimalism: has joined #ruby
[21:48:26] JDiPierro: has joined #ruby
[21:54:11] gusTester: has left #ruby: ()
[21:55:10] DoubleMalt: has joined #ruby
[21:57:27] beauby: has joined #ruby
[21:58:38] deol: has joined #ruby
[21:58:59] rodfersou: has joined #ruby
[21:59:14] rickmasta: has joined #ruby
[21:59:51] opensource_ninj1: has joined #ruby
[22:00:03] workmad3: has joined #ruby
[22:00:14] mwlang: apeiros and zenspider This is all I was trying to learn: https://gist.github.com/mwlang/29e7899e5e971985b39d
[22:00:15] zenguy_pc: has joined #ruby
[22:00:42] mwlang: sorry my gist took everyone down the wrong track and confusing everyone.
[22:00:46] apeiros: I don't think that's what your AA example does. at all.
[22:00:52] mwlang: the block.arity comment was all I needed to know about.
[22:01:01] djbkd: has joined #ruby
[22:01:18] mwlang: apeiros: AA is using defaults when they???re not supplied.
[22:01:29] mwlang: I just wondered, how the heck?
[22:01:39] apeiros: your example doesn't show anything defaulty
[22:01:41] zenspider: yeah. I suspect you're missing the point
[22:01:45] Xeago: has joined #ruby
[22:01:47] apeiros: it shows a method yielding a value to a block.
[22:01:47] jgt2: has joined #ruby
[22:01:56] zenspider: your code sample is confused how you're dealing with arity
[22:02:09] apeiros: that AA thingy seems to be mostly just: `def column(name=nil); yield(noideawhat) if block_given?; end`
[22:02:12] mondayrain: has joined #ruby
[22:02:34] apeiros: that is: it allows a first arg to be passed or omitted (arg with default value)
[22:02:36] seitensei: has joined #ruby
[22:02:44] zenspider: def column name = :default; yield some_obj if block_given?; end
[22:02:44] apeiros: and it allows a block to be passed or omitted (yield if block_given?)
[22:03:17] mwlang: but it also allows variables to be passed into the block to be used.
[22:03:18] bigmac: has joined #ruby
[22:03:42] mwlang: and that???s optionally supplied.
[22:03:46] apeiros: then your example missed the point of exemplifying your point
[22:03:53] jenrzzz_: has joined #ruby
[22:04:02] ishahnaz: has joined #ruby
[22:04:06] mwlang: apeiros: yes, I realize that in hindsight
[22:04:16] apeiros: your AA example
[22:04:19] apeiros: not your code
[22:04:20] lupine: has left #ruby: ()
[22:04:43] apeiros: and I'm still not convinced block arity is what you want or need.
[22:04:51] lolmaus: has joined #ruby
[22:05:02] apeiros: and *even if*, it's horrible code. don't do that. seriously.
[22:05:17] yfeldblum: has joined #ruby
[22:06:01] mwlang: apeiros: point taken
[22:06:12] KervyN: has joined #ruby
[22:06:31] xMopxShell: has joined #ruby
[22:06:41] zenspider: mwlang: it passes args in both cases, regardless of arity
[22:08:07] yfeldblum: has joined #ruby
[22:08:40] mwlang: for me, this was a thought experiment. My goal was to see if I could make both the arguments and the block arguments (or whatever you call the X and Y of ???foo X do |Y|???) optional.
[22:09:30] mwlang: it???s not really something I want to put into production code, but it was a good learning exercise, at least for me.
[22:09:33] gix: has joined #ruby
[22:12:01] mwlang: zenspider: I see now what you???re saying! d-oh
[22:12:21] devoldmx: has joined #ruby
[22:12:42] siaW: has joined #ruby
[22:15:37] baweaver: has joined #ruby
[22:16:37] znz_jp: has joined #ruby
[22:17:54] benlieb: has joined #ruby
[22:18:12] tkuchiki: has joined #ruby
[22:18:18] zenspider: Are there any 1.8 folks left? Like, with actual numbers?
[22:18:23] zenspider: drbrain: ^^ ?
[22:18:51] ekinoxx: has joined #ruby
[22:20:13] drewvanstone: has joined #ruby
[22:23:48] MTGeni: has joined #ruby
[22:26:33] pontiki: has joined #ruby
[22:32:18] darix: zenspider: many of the enterprise distros still support 1.8
[22:32:26] darix: and actually will have to for a few more years
[22:32:31] allcentury: has joined #ruby
[22:33:28] darix: that reminds me i have to writeup the bug report for rubygems and stdlib
[22:34:10] scoot: has joined #ruby
[22:36:03] benlovell: has joined #ruby
[22:36:29] shevy: the land of the evil
[22:37:08] drbrain: zenspider: I stopped bugging Evan for numbers
[22:37:17] miah: enterprise distros are stuck with backporting those fixes to ruby sadly. they made their bed, now they have to sleep in it.
[22:37:40] banjara1: has joined #ruby
[22:37:41] darix: miah: we would happily upgrade if any newer ruby would have been a drop in replacement :)
[22:38:11] siaW: has left #ruby: ()
[22:39:21] miah: upgrade the distro =)
[22:39:28] darix: miah: sure done that.
[22:39:41] dasher00: has joined #ruby
[22:39:43] darix: but you know ... rhel/sles have like 10+year lifecycle now
[22:39:53] miah: ya, but the versions with 1.8 are almost EOL
[22:40:07] darix: in 4-5years they are ;)
[22:40:17] miah: redhats fault
[22:40:39] darix: miah: for sles12 we set up the packaging to easily allow multiple ruby versions
[22:40:41] miah: we've just stopped using the system ruby entirely
[22:41:39] darix: miah: if you keep maintaining the non system ruby it is all fine.
[22:41:44] miah: during our packer/ami build we put chruby and our compiled rubies in place. now we're stuck supporting the versions of ruby on our systems, but at least we're not stuck with 1.8.7.
[22:42:00] miah: infrastructure as code to the rescue =)
[22:42:17] params: has joined #ruby
[22:42:20] params: hello everyone :)
[22:42:36] params: can you help me with a quick question?
[22:42:41] miah: ask the question
[22:42:49] params: I have a method like: .permit(:city, :country, :zip_code, :apt_number)
[22:42:55] params: I want to pass the args as an array
[22:43:00] params: what's the best way to do that?
[22:43:08] shevy: no you don't have a method like this
[22:43:20] darix: params: why?
[22:43:27] params: i.e. I want something like args = %i(city country zip_code apt_number)
[22:43:32] params: and be able to call .permit(args)
[22:43:49] darix: .permit(*args)
[22:43:51] params: ah, does that unzip the array?
[22:43:53] params: that's perfect
[22:43:57] params: that's a lot!
[22:44:02] params: thanks a lot*
[22:44:33] mleung: has joined #ruby
[22:45:13] jenrzzz: has joined #ruby
[22:45:38] siaw_: has joined #ruby
[22:45:42] tmtwd: has joined #ruby
[22:46:38] zenspider: darix: I can always say that linux distros stuck on ruby 1.8 are stuck with older versions of minitest (or whatever). they stuck themselves. They don't get to stop upgrading some things and upgrade all the gems and expect it to work forever
[22:47:19] zenspider: *%w[thanks a lot]
[22:47:34] darix: zenspider: latest minitest doesnt work on 1.8 anymore?:p
[22:47:50] zenspider: but I have a PR I like that'll require me to drop 1.8
[22:48:09] darix: all that discrimination against 1.8!
[22:48:34] darix: zenspider: if it makes you feel better many projects broke compat before you :)
[22:48:58] shevy: 1.8 was cool but it is on life support!
[22:49:26] miah: 1.8.7 has been EOL for more than a year at this point, its suprising anything still works with it
[22:49:36] havenwood: shevy: Life support is for the living.
[22:49:38] Igorshp: has joined #ruby
[22:51:15] minimalism: has joined #ruby
[22:53:57] shevy: we can keep it alive!!!
[22:54:50] havenwood: shevy: We shan't!
[22:55:15] beauby: 1.9.3 has been EOL for almost a year
[22:55:44] shevy: we can keep that one alive as well
[22:55:58] miah: https://www.ruby-lang.org/en/news/2014/07/01/eol-for-1-8-7-and-1-9-2/
[22:56:47] havenwood: https://www.ruby-lang.org/en/news/2015/08/18/ruby-2-0-0-p647-released/
[22:56:59] havenwood: Feb 24 isn't too far away now.
[22:57:16] eam: can someone help me with an issue in 1.6
[22:57:19] havenwood: Then we'll be in the era of "semantically versioned" Ruby.
[22:57:53] havenwood: 155 days to go.
[22:58:07] CloCkWeRX: has joined #ruby
[22:58:15] miah: eam: trolololol
[22:58:23] shevy: wheee mruby matz style: https://github.com/mruby/mruby/commit/798ec3aff48167b46a912587ef72361514b9133c#diff-0f46f3698d5001790076a5178b2a82acR275
[22:58:38] shevy: he likes to align from top to bottom at the "cp >>" :>
[22:58:59] shevy: eam I wanna try 1.6 to see how it was
[22:59:46] nettoweb: has joined #ruby
[23:01:42] CpuID: has joined #ruby
[23:02:00] eam: it wasn't great
[23:02:10] darix: try 1.4 for the real kick
[23:02:41] wldcordeiro: has joined #ruby
[23:02:56] havenwood: I'm curious about this JIT that IBM is promising for Ruby. :O
[23:03:01] polly_wog: has joined #ruby
[23:03:17] chrisseaton: did you see the performance results though? 2-3x
[23:03:45] dfockler: Is it built in C?
[23:03:47] havenwood: Aha, interesting.
[23:03:53] devgiant: has joined #ruby
[23:03:59] darix: havenwood: that one? https://www.reddit.com/r/programming/comments/3gpybh/jvmls_2015_ibm_fuses_mri_ruby_and_cpython_with/
[23:04:02] chrisseaton: it's in C++ i presume
[23:04:20] rodferso1: has joined #ruby
[23:04:28] havenwood: darix: Ah, I hadn't seen that. Thanks for the link.
[23:04:39] platzhirsch: has left #ruby: ()
[23:04:49] chrisseaton: in my humble opinion they are making the same mistake as every other implementation of Ruby - they are optimising control flow and basic operations like ivars, instead of the core library where Ruby programs really spend their time
[23:05:06] nofxx: has joined #ruby
[23:05:15] dfockler: what kinds of things make ruby 'slow'?
[23:05:18] darix: chrisseaton: but if you optimize the basics everything will be faster!
[23:05:50] darix: i liked Aaron's talks on optimizing rails, rubygems and bundler^^
[23:06:17] drewvanstone: has joined #ruby
[23:06:25] dfockler: but it doesn't make things that much faster
[23:06:31] shevy: dfockler mutable strings!
[23:06:33] havenwood: darix: Here's a very interesting one if you haven't seen it yet: http://confreaks.tv/videos/rubyconf2014-deoptimizing-ruby
[23:06:46] havenwood: http://chrisseaton.com/rubytruffle/deoptimizing/
[23:06:59] dasher00: has joined #ruby
[23:07:06] dfockler: I'd imagine speeding up object allocation would be more important than 'if' branching or something
[23:07:54] snockerton: has joined #ruby
[23:08:10] sanjayu: has joined #ruby
[23:08:57] agent_meerkat: has joined #ruby
[23:09:01] chrisseaton: darix: unfortunately in my experience that just isn't true - it's like Amdahl's law - even if you make method calls, ifs, local variables etc infinitely fast, an MRI based implementation would be slow as their statically compiled C core library implementation is slow
[23:09:23] chrisseaton: dfockler: *removing* object allocation is what's key
[23:09:30] darix: chrisseaton: my reply to you was sarcasm. sorry :)
[23:09:56] dfockler: chrisseaton: reading through your article now :)
[23:10:08] darix: https://www.youtube.com/watch?v=B3gYklsN9uc
[23:10:12] EasyCo: has joined #ruby
[23:10:17] darix: https://www.youtube.com/watch?v=_bDRR_zfmSk
[23:10:30] mwlang: not allocating objects that are ultimately not used speeds up things considerably. https://github.com/rails/rails/pull/21057
[23:10:59] chrisseaton: mwlang: right, and if the VM can not allocate them for you, even if they look like they're allocated in the source code, that's the silver bullet
[23:11:20] ponga: has joined #ruby
[23:13:06] devoldmx: has joined #ruby
[23:14:06] WillAmes: has joined #ruby
[23:14:45] Asher: has joined #ruby
[23:15:27] CloCkWeRX: has left #ruby: ()
[23:16:21] scoot: has joined #ruby
[23:17:06] mwlang: chrisseaton: good point. yet another perk of using interpreted languages over compiled ones. You don???t think about garbage collection and you don???t think about heap allocation, either.
[23:17:31] pipework: But it's fun to be able to when it matters!
[23:17:51] mattprelude: has joined #ruby
[23:17:58] pipework: Though I haven't really gotten as intimately familiar with chrisseaton's awesome work as I've been trying to.
[23:17:59] devgiant: has joined #ruby
[23:18:02] nofxx: has joined #ruby
[23:18:52] petricore: has joined #ruby
[23:20:25] fersur3: has joined #ruby
[23:20:42] fersur3: Is there a way to set up a "full ruby environment" in $HOME/ ?
[23:21:26] Maletor: has joined #ruby
[23:21:48] finisherr: has joined #ruby
[23:21:55] shevy: fersur3 just compile ruby there
[23:22:09] finisherr: Does anyone know where I can get a list of all of the options for rvmrc off hand?
[23:23:00] pipework: fersur3: ruby-install
[23:23:09] pipework: chruby and ruby-install
[23:23:33] pipework: finisherr: rvmrc's are just files that are essentially exec'd if they're trusted.
[23:23:37] pipework: last I used rvm that is
[23:23:51] bigmac: has joined #ruby
[23:23:51] finisherr: I know there are some options though
[23:23:59] finisherr: like rvm_install_on_use_flag=1
[23:23:59] finisherr: rvm_gemset_create_on_use_flag=1
[23:24:45] siaW: has joined #ruby
[23:24:54] iateadonut: has joined #ruby
[23:25:39] arcanez: has left #ruby: ()
[23:25:52] finisherr: I???td be great to know what environment variables are accessible to me
[23:26:00] finisherr: and what they do
[23:26:06] finisherr: having a hard time with the docs
[23:26:11] pipework: finisherr: #rvm is a thing. Why not just use ruby-install?
[23:26:22] michael_mbp: has joined #ruby
[23:26:22] finisherr: ahh, i guess I could try that channel
[23:26:33] pipework: It's small, does the least amount of work necessary to do the job, and is easy enough to read the whole source in a single sitting.
[23:28:09] banjara: has joined #ruby
[23:29:22] KnownSyntax_: has joined #ruby
[23:29:32] finisherr: I think there was a want for gemsets
[23:29:55] finisherr: and lots of folks use rvm already, don???t wanna push folks out of their tools
[23:30:23] tangentstorm: has joined #ruby
[23:30:44] mary5030: has joined #ruby
[23:34:30] yfeldblum: has joined #ruby
[23:34:31] VeryBewitching: has joined #ruby
[23:35:43] araujo_: has joined #ruby
[23:36:05] SumoBoy: has left #ruby: ()
[23:36:14] polly_wog: has joined #ruby
[23:37:04] BTRE: has joined #ruby
[23:37:17] willywos: has joined #ruby
[23:39:24] nzst: has joined #ruby
[23:40:23] petricore: has joined #ruby
[23:40:29] phutchins: has joined #ruby
[23:40:37] ebragaparah: has joined #ruby
[23:40:52] swgillespie: has joined #ruby
[23:42:02] Liothen-: has joined #ruby
[23:43:11] bronson: has joined #ruby
[23:44:59] Liothen: has joined #ruby
[23:45:08] weemsledeux: has joined #ruby
[23:45:26] michaeldeol: has joined #ruby
[23:48:10] workmad3: has joined #ruby
[23:49:14] quazimodo: has joined #ruby
[23:50:46] Igorshp: has joined #ruby
[23:51:27] otacon-: has joined #ruby
[23:54:20] EasyCo: Hey team, given the scenario where you have the following: Vehicle::Car.new(some_attrs). But you also have a wrapper/factory method which is part of the advertised public API: Vehicle.car(some_attrs). The latter does nothing special, it just proxies the values to Vehicle::Car.new(). Would you write test coverages for both ways of instantiating a car or just
[23:54:20] EasyCo: one of them?
[23:55:12] beauby: EasyCo: I'd write a test that ensures the forwarding, and then test the constructor extensively
[23:55:59] symbol: has joined #ruby
[23:56:37] RegulationD: has joined #ruby