« Back to channel list

#ruby - 11 July 2016

« Back 1 day Forward 1 day »
[00:00:13] vanvemden: has joined #ruby
[00:00:35] macsteps: has joined #ruby
[00:00:54] skweek: has joined #ruby
[00:01:28] ghr: has joined #ruby
[00:05:48] freerobby: has joined #ruby
[00:08:44] shevy: yeah parallel assignment
[00:09:48] ur5us: has joined #ruby
[00:10:47] moeabdol: has joined #ruby
[00:10:58] ghr: has joined #ruby
[00:11:38] mistermocha: has joined #ruby
[00:12:05] JeanCarloMachado: has joined #ruby
[00:12:08] freerobby: has joined #ruby
[00:13:23] postapocallyptic: yeah, my string has a newline inside it? how do I remove it? line.delete '\n' ?
[00:15:04] freerobby1: has joined #ruby
[00:15:37] Jet4Fire: has joined #ruby
[00:16:39] A_Drone: has joined #ruby
[00:17:06] JeanCarl1Machado: has joined #ruby
[00:18:56] al2o3-cr: postapocallyptic: if the \n is at the end of the string you can use chomp
[00:21:39] vanvemden: has joined #ruby
[00:24:17] karapetyan: has joined #ruby
[00:24:26] shevy: postapocallyptic you sorta gave the solution :)
[00:24:48] shevy: use " rather than ' though
[00:24:53] postapocallyptic: didn't work for some reason idk.
[00:25:01] shevy: ruby will differ between 'string' and "string"
[00:25:18] shevy: like foo = 'foo'; bar = "#{foo}bar"
[00:25:25] shevy: will not work if you use only ''
[00:27:44] isberg: has joined #ruby
[00:30:01] nankyokusei: has joined #ruby
[00:31:35] postapocallyptic: so when I'm inside a class I can only define a variable as a Array when I'm in the initializer method. and I can't define the instance variable to be a Array outside a method.
[00:31:51] postapocallyptic: this is all confusing to me as I come from another lang ( cpp )
[00:32:09] leea: any atom users know what the v and c mean on autocompletion? http://imgur.com/4C2YA3F
[00:33:09] leea: postapocallyptic what are you trying to do? I believe you can declare variables outside of the constructor (initialize method)
[00:33:46] leea: >> class Foo; @bar = []; end
[00:33:47] ruby[bot]: leea: # => [] (https://eval.in/603122)
[00:34:13] shevy: postapocallyptic you could use a constant
[00:34:33] shevy: class FOO; ARRAY = %w(a b c); def initialize; @data = ARRAY; end; end
[00:34:40] shevy: hmm I meant to write class Foo
[00:34:49] EXCHGR: has joined #ruby
[00:35:00] ghr: has joined #ruby
[00:35:09] shevy: postapocallyptic you could also initialize the array in any other method
[00:35:23] shevy: using a constant, an @ivar, a @@class var, a local var within the method... perhaps there are more ways
[00:35:30] al2o3-cr: leea: i'd hazard a guess at c = class and v = variable
[00:35:32] shevy: but in most cases, @ivar is best
[00:35:51] roamingdog: has joined #ruby
[00:36:00] leea: al2o3-cr oh ok, yeah I should have googled first. I thought I could do autocompletion by pressing those letters, didn't work though
[00:37:27] akira616: has left #ruby: ("Leaving")
[00:37:34] akira616: has joined #ruby
[00:37:42] isberg: has joined #ruby
[00:37:54] postapocallyptic: leea http://pastebin.com/7aS4wUmL
[00:37:55] ruby[bot]: postapocallyptic: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/62be82e644e10633e9344a30b2601efb
[00:37:55] ruby[bot]: postapocallyptic: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[00:39:31] leea: postapocallyptic on line 2 you defined @names, and in lines 4 and 5 you don't use the @,
[00:39:36] leea: if you use @names on 4 and 5 you won't get an error
[00:40:12] leea: The reason the 2nd class works is because attr_accessor defines a method "names" and it returns an array, then you're adding elements to that array
[00:40:43] coffeecupp: has joined #ruby
[00:40:46] postapocallyptic: yeah I forgot the round thing.
[00:40:52] leea: >> class Nameslist; @names = Array.new; def populate; @names << "blah"; @names << "yeah"; end; end
[00:40:53] ruby[bot]: leea: # => :populate (https://eval.in/603123)
[00:40:55] shevy: postapocallyptic ah you must be careful
[00:41:05] shevy: @names there is different from @names inside of a method
[00:41:06] pawnbox: has joined #ruby
[00:41:29] karapetyan: has joined #ruby
[00:41:57] leea: shevy are they not instance variables?
[00:42:11] al2o3-cr: yeah, the first one is class instance variable
[00:42:14] Guest51731: has joined #ruby
[00:42:48] leea: oh, got it.
[00:42:53] shevy: leea yeah but in another context, self will be different, it will be on class Namelist rather than when you instantiate the object
[00:43:11] xall: has joined #ruby
[00:43:50] leea: so could you solve the first class by defining #self.populate?
[00:44:41] pontiki: has joined #ruby
[00:45:36] al2o3-cr: or from a instance method self.class.populate
[00:46:11] shevy: leea yeah
[00:47:32] ghr: has joined #ruby
[00:52:12] ramfjord: has joined #ruby
[00:52:18] Guest51731: has joined #ruby
[00:54:31] sleepee: has joined #ruby
[00:56:46] tristanp: has joined #ruby
[00:56:57] pawnbox: has joined #ruby
[00:57:01] ghr: has joined #ruby
[00:58:13] al2o3-cr: postapocallyptic: this might help a little bit https://gist.github.com/gr33n7007h/d6bacb1fa444ba4a78fd28151a20eca1
[00:59:11] fujinuma: has joined #ruby
[00:59:56] tristanp: has joined #ruby
[01:00:42] sleepee: has joined #ruby
[01:04:07] MrBusiness: has joined #ruby
[01:05:02] blackmesa: has joined #ruby
[01:06:31] ghr: has joined #ruby
[01:08:08] armyriad: has joined #ruby
[01:11:14] fujinuma: has joined #ruby
[01:11:43] coffeecupp: has joined #ruby
[01:13:15] leea: has joined #ruby
[01:13:17] agentmeerkat: has joined #ruby
[01:13:58] yfeldblum: has joined #ruby
[01:14:05] asianMike: has joined #ruby
[01:14:31] flashpoint9: has joined #ruby
[01:16:02] ghr: has joined #ruby
[01:16:39] Xiti: has joined #ruby
[01:19:24] Xeago_: has joined #ruby
[01:21:57] zacts: has joined #ruby
[01:24:00] jazzonmymind```: has joined #ruby
[01:24:49] whathappens: has joined #ruby
[01:25:19] AngryBuzzy: has joined #ruby
[01:25:35] `tim`: has joined #ruby
[01:26:03] ghr: has joined #ruby
[01:27:02] charliesome: has joined #ruby
[01:29:39] ruby-lang671: has joined #ruby
[01:30:23] Ebok: has joined #ruby
[01:31:36] skweek: has joined #ruby
[01:32:29] angrybuzzy_: has joined #ruby
[01:33:35] coffeecupp: has joined #ruby
[01:35:23] harfangk: has joined #ruby
[01:36:33] ghr: has joined #ruby
[01:41:49] ecnalyr: has joined #ruby
[01:41:52] moeabdol: has joined #ruby
[01:42:49] dcunit3d: has joined #ruby
[01:43:28] Guest51731: has joined #ruby
[01:46:05] ghr: has joined #ruby
[01:46:17] A_Drone: has joined #ruby
[01:47:02] ericsupreme: has joined #ruby
[01:47:31] asianMike: has joined #ruby
[01:49:04] ericsupreme: hey can someone help me getting rubygems running correctly ...any ruby gem command i type whether it's gem -v , gem instal blahblahblah i get this message 'The program 'gem' can be found in the following packages:
[01:49:04] ericsupreme: Try: sudo apt-get install <selected package>
[01:50:07] ericsupreme: after spending time on google it seems to be a P
[01:50:29] ericsupreme: ATH is but i can't figure out how to set it
[01:51:02] shevy: you have to find out where "gem" file is
[01:51:10] shevy: look at /usr/bin first, for all *gem*
[01:52:17] ericsupreme: ok i have a few let one in home directory and the usr/bin i think i can tell one sec i've done so much i can't remember ..thanks for respondign by the way
[01:57:05] ghr: has joined #ruby
[01:57:55] karapetyan: has joined #ruby
[02:00:01] coffeecupp: has joined #ruby
[02:01:31] ekinmur: has joined #ruby
[02:01:56] jahrichie: has joined #ruby
[02:02:17] ericsupreme: ok an old askubuntu post from a guy with similar problem someone said PATH should be /usr/lib/ruby/gems
[02:02:55] al2o3-cr: ericsupreme: `type -a gem`
[02:02:58] ericsupreme: so im just confused period lol what do i do now with /usr/bin?
[02:03:25] Guest51731: has joined #ruby
[02:03:54] al2o3-cr: ericsupreme: you have installed ruby?
[02:04:10] ericsupreme: command not found
[02:04:40] ericsupreme: when 'type -a gem'
[02:04:53] ericsupreme: ruby -v works
[02:05:02] ericsupreme: gem -v nothing
[02:05:13] jahrichie: has joined #ruby
[02:06:00] al2o3-cr: ericsupreme: which gem
[02:06:27] pontiki: first try `which ruby` -- the gem program should be in the same folder
[02:07:09] blackmesa: has joined #ruby
[02:07:34] ericsupreme: where shevy said /usr/bin
[02:07:35] ghr: has joined #ruby
[02:07:58] pontiki: and is the gem program there?
[02:08:40] pontiki: gem and gem2.3 ?
[02:10:07] ericsupreme: well gem1.9.1 and latter to be exact
[02:10:19] ericsupreme: is that the issue should i uninstall the older version?
[02:11:22] pontiki: no, but i'd expect an actual program just "gem" to be there, with no version
[02:13:47] ericsupreme: if ruby and gem are both in the /usr/bin folder why does ruby -v work and not gem -v
[02:14:14] pontiki: something is messed up, for sure
[02:14:28] pontiki: try `file /usr/bin/gem`
[02:14:43] postmodern: has joined #ruby
[02:16:00] flashpoint9: has joined #ruby
[02:17:39] ericsupreme: hate to be a dense lol but what file name am i replacing 'file' with
[02:17:57] ericsupreme: ERROR: cannot open `/usr/bin/gem' (No such file or directory
[02:18:06] ghr: has joined #ruby
[02:19:37] lxsameer: has joined #ruby
[02:19:55] jrafanie_: has joined #ruby
[02:20:09] al2o3-cr: ericsupreme: the file command shows file types
[02:21:54] ericsupreme: oh ok ERROR: cannot open `/usr/bin/gem' (No such file or directory
[02:22:12] mattwashere: has joined #ruby
[02:22:48] al2o3-cr: ericsupreme: does gem2.3 -v work
[02:22:57] coffeecupp: has joined #ruby
[02:23:48] pontiki: sorry, ericsupreme, `file` is actually a *nix command
[02:23:54] ericsupreme: and the winner is ............
[02:24:09] ericsupreme: al2o3-cr!!!!!!!!!!!!!!!!!!1
[02:24:10] mattwashere: has joined #ruby
[02:24:27] ericsupreme: gem2.3 -v worked
[02:24:40] ericsupreme: damn i feel dumb lol thank you
[02:25:18] al2o3-cr: ericsupreme: did you install ruby using your package manager?
[02:27:31] ericsupreme: no command line
[02:27:36] ghr: has joined #ruby
[02:27:43] al2o3-cr: apt-get i take it?
[02:27:51] ericsupreme: SM didn't have newest version
[02:28:31] benlieb: has joined #ruby
[02:28:49] ledestin: has joined #ruby
[02:28:52] djbkd2: has joined #ruby
[02:29:22] tristanp: has joined #ruby
[02:30:37] nankyokusei: has joined #ruby
[02:30:57] al2o3-cr: ericsupreme: what does ruby -v output btw
[02:31:37] ericsupreme: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux-gnu]
[02:32:13] pontiki: you installed that version with apt-get?
[02:32:22] pontiki: did you get it from brightbox?
[02:33:01] pawnbox: has joined #ruby
[02:33:23] shevy: ericsupreme probably debian forgot a symlink
[02:33:35] shevy: they will have /usr/bin/ruby and /usr/bin/rubyVERSION or something like that
[02:33:37] ericsupreme: hmmm you know what ...yeah not apt-get
[02:34:03] ericsupreme: bright box isn't ringing a bell ..give me sec i'll tell you
[02:35:03] shevy: you could always symlink from /usr/bin/gem23 to /usr/bin/gem :)
[02:36:16] ericsupreme: true thanks shevy
[02:36:22] pontiki: i'd be surprised if you can get that new a version from deb or ubuntu ppa
[02:36:33] al2o3-cr: pontiki: you can't
[02:36:51] pontiki: al2o3-cr: the only place i know to get them that current is brightbox
[02:37:19] ericsupreme: yeah i tried updating my software managers repo
[02:37:27] ericsupreme: and it still wasn't on there
[02:37:36] ericsupreme: brightbox was the only way
[02:39:53] xall: has joined #ruby
[02:43:06] moeabdol: has joined #ruby
[02:43:09] armyriad: has joined #ruby
[02:44:32] A_Drone: has joined #ruby
[02:45:36] shevy: if only debian would make things easy!
[02:47:07] ghr: has joined #ruby
[02:49:41] shevy: perhaps this will eventually solve all these things https://github.com/snapcore/snapd
[02:49:45] shevy: oddly it needs Go
[02:51:21] lxsameer: does ruby currently have a JIT ?
[02:51:31] al2o3-cr: lxsameer: no
[02:53:37] postapocallyptic: i called a socket method and it returned an error. Errno::ECONNREFUSED: No connection could be made because the target machine actively refused it. - connect(2) however I don't want my software to close after it couldn't connect.
[02:54:06] shevy: you probably may have to use a loop
[02:55:16] postapocallyptic: it is inside a loop
[02:55:55] Dimik--: has joined #ruby
[02:56:29] postapocallyptic: pList.ip.each_with_index do |thing,index| loop where thing is unused for now
[02:56:33] Dimik--: i wonder if some one uses capybara for scraping
[02:56:40] ghr: has joined #ruby
[02:58:02] pontiki: Dimik--: i tried it, once
[03:00:07] colegatron_origi: has joined #ruby
[03:00:41] postapocallyptic: so i need to handle exceptions boo
[03:02:04] A_Drone: has joined #ruby
[03:02:19] maloik93: has joined #ruby
[03:03:42] pawnbox: has joined #ruby
[03:03:45] Dimik--: has joined #ruby
[03:03:50] chouhoulis: has joined #ruby
[03:04:17] VeryBewitching: has joined #ruby
[03:04:42] Dimik--: ideally i think it'd be good right
[03:04:51] chouhoulis: has joined #ruby
[03:05:04] xue: has joined #ruby
[03:05:23] nando293921: has joined #ruby
[03:05:52] nando293921: has joined #ruby
[03:06:08] ghr: has joined #ruby
[03:08:10] blackmesa: has joined #ruby
[03:08:39] benlieb: has joined #ruby
[03:09:36] mtkd: has joined #ruby
[03:12:00] gix: has joined #ruby
[03:13:04] macsteps: has joined #ruby
[03:13:05] craigp_: has joined #ruby
[03:14:27] agentmeerkat: has joined #ruby
[03:17:17] A_Drone: has joined #ruby
[03:19:09] ghr: has joined #ruby
[03:19:55] treaki__: has joined #ruby
[03:22:27] x0F_: has joined #ruby
[03:23:15] Ebok: has joined #ruby
[03:24:42] pontiki: idk, i ended up using watir-webdriver instead; it was a lot easier to get scraping done
[03:25:14] jon28_: has joined #ruby
[03:27:06] dylankarr: has joined #ruby
[03:27:53] elifoster: has joined #ruby
[03:28:00] A_Drone: has joined #ruby
[03:28:22] A_Drone: has joined #ruby
[03:28:41] dylankarr: has joined #ruby
[03:29:02] x0F: has joined #ruby
[03:29:06] leea: what would you add as a git commit message when doing tdd and implementing the tests so they pass w/ good code
[03:29:10] ghr: has joined #ruby
[03:29:34] Arcaire: "test tests please ignore"
[03:29:40] xlegoman: has joined #ruby
[03:30:03] leea: but i'm adding the test so the code works and making it work as intended
[03:30:25] Arcaire: whatever you want, it's your commit log
[03:30:43] dylankarr: "Adding tests for blah, blah blah"
[03:30:47] Arcaire: "passing tests"? id
[03:31:16] A_Drone: has joined #ruby
[03:31:38] dylankarr: does anyone else prefer capitalizing git commit messages?
[03:31:44] dylankarr: or is it just me?
[03:31:55] Madplatypus: has joined #ruby
[03:33:15] dylankarr: has left #ruby: ()
[03:34:05] enterprisey: has joined #ruby
[03:37:31] leea: oh i mean not implementing the tests, but implementing the code that the tests are testing for
[03:37:47] leea: idk if that makes a difference, like let's say i'm red. Then I do green.
[03:37:52] Dimik--: has joined #ruby
[03:38:45] A_Drone: has joined #ruby
[03:39:45] Dimik--: has joined #ruby
[03:40:16] A_Drone: has joined #ruby
[03:40:56] A_Drone: has joined #ruby
[03:42:09] pawnbox: has joined #ruby
[03:42:11] dionysus69: has joined #ruby
[03:43:41] ghr: has joined #ruby
[03:44:12] sebstrax: has joined #ruby
[03:45:11] zacts: has joined #ruby
[03:48:38] ericsupreme: any particular reason you guys capitalize git commit messages? or you just like the way it looks
[03:49:00] Arcaire: I treat them as a freestanding sentence.
[03:52:46] ericsupreme: ok i use all lower case for no reason lol i just do
[03:55:41] ghr: has joined #ruby
[03:56:55] spyder55: has joined #ruby
[03:59:27] karapetyan: has joined #ruby
[03:59:44] auzty: has joined #ruby
[04:00:28] pontiki: they're letters to other people
[04:00:35] pontiki: (and your future self)
[04:00:46] pontiki: you can be as formal or informal as that requires, really
[04:01:22] pontiki: also, sometimes the messages are really long, and that tends to ask for more formal grammar, etc
[04:01:46] pontiki: i also have tons of yolo commit messages :)
[04:05:12] ghr: has joined #ruby
[04:05:13] ketherah: has joined #ruby
[04:09:06] craigp_: has joined #ruby
[04:10:12] blackmesa: has joined #ruby
[04:11:16] yadobujo: has joined #ruby
[04:13:14] interki: has joined #ruby
[04:14:42] ghr: has joined #ruby
[04:15:47] agentmeerkat: has joined #ruby
[04:16:00] roamingdog: has joined #ruby
[04:16:48] lxsameer: has joined #ruby
[04:16:56] karapetyan: has joined #ruby
[04:19:36] zacts: has joined #ruby
[04:24:56] leea: has joined #ruby
[04:27:07] speaking1ode: has joined #ruby
[04:27:13] ghr: has joined #ruby
[04:31:31] nankyokusei: has joined #ruby
[04:36:44] ghr: has joined #ruby
[04:38:53] craigp_: has joined #ruby
[04:44:43] ascarter: has joined #ruby
[04:44:50] hastur: has joined #ruby
[04:46:54] hastur: hey all, so i'm making an app that's basically a bunch of markers on a map. there are two kinds of markers, A's and B's, but a B is just an A with extra info fields. my question is, should I have A's and B's be separate database entries, or should I use one model (B's) throughout, and fill in the fields when they become relevant, with like a boolean field A.is_B?
[04:47:14] ghr: has joined #ruby
[04:52:28] vavovi: has joined #ruby
[04:54:07] alfiemax: has joined #ruby
[04:54:46] SilverKey: has joined #ruby
[04:55:37] Dimik--: has joined #ruby
[04:56:45] ghr: has joined #ruby
[04:58:48] astrobunny: has joined #ruby
[05:01:43] tubuliferous: has joined #ruby
[05:03:03] atomx: has joined #ruby
[05:04:09] roamingdog: has joined #ruby
[05:05:08] speaking1ode: has joined #ruby
[05:05:25] pontiki: or assume that A is just a special case of B and deal with nil attributes accordingly
[05:05:40] roamingd_: has joined #ruby
[05:06:15] ghr: has joined #ruby
[05:06:16] tubuliferous: has joined #ruby
[05:06:23] hastur: cool! and you think that'd be easier than separate models?
[05:06:33] hastur: and/or """Best Practices""" ?
[05:07:35] pontiki: is there any difference between A and B besides the extra fields?
[05:09:28] xall: has joined #ruby
[05:10:58] blackmesa: has joined #ruby
[05:12:12] hk238: has joined #ruby
[05:13:40] ericsupreme: has joined #ruby
[05:15:46] ghr: has joined #ruby
[05:16:17] agentmeerkat: has joined #ruby
[05:18:16] flashpoint9: has joined #ruby
[05:18:22] ecnalyr: has joined #ruby
[05:18:37] karapetyan: has joined #ruby
[05:25:47] ghr: has joined #ruby
[05:29:55] A_Drone: has joined #ruby
[05:31:50] ruby-lang968: has joined #ruby
[05:34:53] Tachikomas: has joined #ruby
[05:36:17] ghr: has joined #ruby
[05:39:39] craigp_: has joined #ruby
[05:39:43] vuoto: has joined #ruby
[05:41:49] rickmasta: has joined #ruby
[05:42:28] johnny56: has joined #ruby
[05:43:21] alfiemax: has joined #ruby
[05:46:18] ghr: has joined #ruby
[05:48:11] pawnbox: has joined #ruby
[05:50:27] dminuoso: has joined #ruby
[05:57:49] ghr: has joined #ruby
[05:57:59] yokel: has joined #ruby
[05:58:16] ltp: has joined #ruby
[05:58:54] priodev: has joined #ruby
[05:59:49] mattwashere: has joined #ruby
[06:00:07] Macaveli: has joined #ruby
[06:00:13] xlegoman: has joined #ruby
[06:00:19] A_Drone: has joined #ruby
[06:06:04] yadobujo: has joined #ruby
[06:07:54] yadobujo: has joined #ruby
[06:08:02] pawnbox_: has joined #ruby
[06:08:55] priodev: has joined #ruby
[06:09:01] matrasss: has joined #ruby
[06:09:08] QoQOoO: has joined #ruby
[06:09:49] ghr: has joined #ruby
[06:11:01] edwinvdgraaf: has joined #ruby
[06:11:46] blackmesa: has joined #ruby
[06:12:32] matrasss: good day, people, anyone know a good beginner book for learning ruby?
[06:13:06] matrasss: also need to know if it is better to get to know ruby before moving onto rails?
[06:16:31] shevy: matrasss https://pine.fm/LearnToProgram/chap_00.html is still good
[06:16:45] shevy: for more content you may have to use an oldschool book
[06:16:56] agentmeerkat: has joined #ruby
[06:17:29] craigp_: has joined #ruby
[06:19:20] ghr: has joined #ruby
[06:19:24] A_Drone: has joined #ruby
[06:19:30] finnnnnnnnnnn: has joined #ruby
[06:19:37] A_Drone: has joined #ruby
[06:20:02] daumie: has joined #ruby
[06:20:43] naftilos76: has joined #ruby
[06:21:02] pawnbox: has joined #ruby
[06:22:26] priodev: has joined #ruby
[06:24:01] dionysus69: has joined #ruby
[06:24:07] Abonec: has joined #ruby
[06:24:31] Pupeno: has joined #ruby
[06:24:31] Pupeno: has joined #ruby
[06:26:33] dminuoso: has joined #ruby
[06:28:37] ngw: has joined #ruby
[06:29:40] conta: has joined #ruby
[06:31:51] ghr: has joined #ruby
[06:32:24] nankyokusei: has joined #ruby
[06:32:39] sucks: has joined #ruby
[06:34:20] dennisvennink: has joined #ruby
[06:38:11] vavovi: has joined #ruby
[06:43:23] neanderslob: has joined #ruby
[06:43:36] yardenbar: has joined #ruby
[06:43:36] finnnnnnnnnnn: has joined #ruby
[06:43:52] ghr: has joined #ruby
[06:49:06] the_drow: has joined #ruby
[06:49:26] mark_66: has joined #ruby
[06:50:37] travisxcode: has joined #ruby
[06:51:05] Hounddog: has joined #ruby
[06:51:14] DoubleMalt: has joined #ruby
[06:53:22] ghr: has joined #ruby
[06:54:04] moeabdol: has joined #ruby
[06:56:12] TomyWork: has joined #ruby
[06:58:33] Pupeno: has joined #ruby
[06:58:34] Pupeno: has joined #ruby
[07:00:02] burgestrand: has joined #ruby
[07:01:15] mattwashere: has joined #ruby
[07:01:19] charliesome: has joined #ruby
[07:03:23] ghr: has joined #ruby
[07:03:49] spyder55: has joined #ruby
[07:05:47] dminuoso: has joined #ruby
[07:08:14] andikr: has joined #ruby
[07:09:36] codecop: has joined #ruby
[07:12:32] blackmesa: has joined #ruby
[07:12:41] astrobunny: has joined #ruby
[07:13:23] ghr: has joined #ruby
[07:14:01] A_Drone: has joined #ruby
[07:15:41] pawnbox: has joined #ruby
[07:17:07] spyder55: has joined #ruby
[07:17:38] craigp_: has joined #ruby
[07:19:25] ltp: has joined #ruby
[07:19:33] priodev: has joined #ruby
[07:19:43] blaxter: has joined #ruby
[07:19:47] omphe: has joined #ruby
[07:21:02] Pupeno: has joined #ruby
[07:21:47] aganov: has joined #ruby
[07:23:23] antgel: has joined #ruby
[07:24:28] hk238: has joined #ruby
[07:24:39] tvw: has joined #ruby
[07:25:16] QoQOoO: has joined #ruby
[07:25:22] Meow-J: has joined #ruby
[07:26:51] Xeago_: has joined #ruby
[07:30:04] aufi: has joined #ruby
[07:30:26] spyder55: has joined #ruby
[07:31:07] blackmesa: has joined #ruby
[07:33:11] A_Drone: has joined #ruby
[07:34:06] Kedare: has joined #ruby
[07:35:04] priodev: has joined #ruby
[07:35:11] karapetyan: has joined #ruby
[07:40:36] QoQOoO: has joined #ruby
[07:40:39] ngw: has joined #ruby
[07:41:27] ponga: has joined #ruby
[07:42:58] anisha: has joined #ruby
[07:43:38] kirun: has joined #ruby
[07:44:58] seventy: has joined #ruby
[07:45:37] skade: has joined #ruby
[07:47:03] armyriad: has joined #ruby
[07:48:04] brianpWins: has joined #ruby
[07:48:09] johnny56: has joined #ruby
[07:48:19] daumie: has joined #ruby
[07:48:52] colegatron_origi: has joined #ruby
[07:49:34] multi_io: has joined #ruby
[07:49:53] execat: has joined #ruby
[07:50:50] Jen0vaCore: has joined #ruby
[07:51:43] minimalism: has joined #ruby
[07:52:45] karapetyan: has joined #ruby
[07:53:34] spyder55: has joined #ruby
[07:54:32] crdpink2: has joined #ruby
[07:55:45] QoQOoO: has joined #ruby
[07:55:46] mechanicles: has joined #ruby
[07:56:57] solars: has joined #ruby
[07:57:32] Pumukel: has joined #ruby
[07:59:54] vondruch: has joined #ruby
[08:00:49] QoQOoO: has joined #ruby
[08:02:39] dionysus69: has joined #ruby
[08:03:13] arlek: has joined #ruby
[08:03:38] yeticry: has joined #ruby
[08:03:52] tmtwd: has joined #ruby
[08:05:08] burgestrand: has joined #ruby
[08:06:25] karapetyan: has joined #ruby
[08:07:14] mtkd: has joined #ruby
[08:07:45] A_Drone: has joined #ruby
[08:08:37] DaniG2k: has joined #ruby
[08:09:39] the_drow: has joined #ruby
[08:11:18] arnab: has joined #ruby
[08:11:46] roshanavand: has joined #ruby
[08:12:01] arnab: Anyone know why rvm list shows me only one ruby (2.3.0) while ruby -v shows me 1.8.7?
[08:12:28] burgestrand: arnab system ruby is typically outside of RVM
[08:12:53] burgestrand: arnab 1.8.7 is *really* old, probably from your system's default ruby, you can do `rvm use 2.3.0` to change to 2.3
[08:12:59] arnab: Burgestrand: Right. So is there any way I can tell bundle to use the rvm ruby version?
[08:13:14] arnab: rvm is already telling me that 2.3.0 is default *and* current
[08:13:25] spyder55: has joined #ruby
[08:14:16] burgestrand: arnab Ok, if `ruby -v` is still saying 1.8.7 then there's probably an installation issue there: https://rvm.io/support/troubleshooting
[08:14:38] execat: has joined #ruby
[08:15:25] rikkipitt: has joined #ruby
[08:15:25] coffeecupp: has joined #ruby
[08:18:10] agentmeerkat: has joined #ruby
[08:18:13] Sashimi: has joined #ruby
[08:19:13] Xeago_: has joined #ruby
[08:19:53] atomx: has joined #ruby
[08:21:20] Pupeno: has joined #ruby
[08:22:36] bigkevmcd: has joined #ruby
[08:23:19] Chair: has joined #ruby
[08:24:51] Pupeno: has joined #ruby
[08:25:59] willemb: has joined #ruby
[08:26:18] willemb: Hi. I need some advice around managing gem sources on a big-ish network
[08:27:01] jaruga___: has joined #ruby
[08:27:34] willemb: how does the gem client traverse the source list, for instance? If I add multiple sources, will it try them in order, trying each one in turn until one works? or will my gem install fail if the gem cannot be found at the top source?
[08:29:13] apeiros: ping drbrain ^
[08:29:38] apeiros: willemb: if drbrain isn't around and nobody else can answer, I'd go to the mailinglist
[08:31:04] blackgoat: has joined #ruby
[08:31:10] arnab: 'ruby -v' is now giving me 2.3.0 when I'm ssh'ed into the server, but when doing 'ruby -v' as part of a teamcity build step..it still shows 1.8.7 :(
[08:33:15] nankyokusei: has joined #ruby
[08:33:44] atomx: willemb: however big is the network, it might help to set a caching proxy on that network
[08:34:05] willemb: thanks, atom_ that is what I am working on
[08:34:24] execat: has joined #ruby
[08:34:25] willemb: We have 3 locations. one with about 500 nodes, the other 2 have around 1000 nodes each.
[08:34:43] eGGshke: has joined #ruby
[08:35:24] willemb: I am rolling out proxies. My question is this: is there any value in having all 3 proxies configured on all machines, ordering the local one first, or should I not have anything other than the local one and rubygems.org listed ?
[08:35:29] TomyWork: you know what would be great? syntax-level support for currying... def foo(bar)(baz)
[08:35:43] TomyWork: returns a Method
[08:37:19] atomx: willemb: if you had a LB that pointed to the nearest proxy depending on the location on the VM, that would also help reduce latency
[08:37:33] atomx: (assuming you're using VMs, but you get the point)
[08:37:43] tristanp: has joined #ruby
[08:38:02] M4dH4TT3r: has joined #ruby
[08:38:12] willemb: yea, atom_ that would work. But what would the point be, if there isn't a LB in each location?
[08:38:54] apeiros: arnab: sounds like your teamcity build steps don't have the same env as your user (sudo? other things?)
[08:39:18] atomx: none - then you would have VMs with low latency to your proxy and 2/3 of your infra that would still suffer from latency
[08:39:36] senayar: has joined #ruby
[08:39:36] senayar: has joined #ruby
[08:40:09] willemb: so that leaves me with the same problem - determining which lb is the closest isn't any easier than determining which proxy is the closest
[08:40:29] willemb: My whole infrastructure is under puppet control, so I can easily specify with hieradata which proxy to use
[08:41:12] willemb: however, if the gem client will try the next source in the list automatically, I can take one proxy down for maintenance with little disruption
[08:43:47] atomx: I see your point
[08:45:06] execat: has joined #ruby
[08:45:26] willemb: unrelated question: Is there an easy way to programatically determine if a given ip address is 'in' a range?
[08:45:32] willemb: in a specific range, I should say
[08:45:42] charliesome: has joined #ruby
[08:45:59] atomx: I don't know how much time you have to develop this solution, but also consider how Fedora/CentOS handle their repositories
[08:46:25] atomx: they have a single URL in the repo files (inside /etc/yum.repos.d), and that one makes subsequent requests go to the nearest server
[08:46:31] latemus: has joined #ruby
[08:46:37] atomx: I think this approach is what you're looking for
[08:47:04] apeiros: willemb: ipaddr (stdlib) can do that iirc.
[08:47:12] willemb: ok, thanks
[08:47:34] seventy: Ruby man. I keep coming here and never know if I should learn it.
[08:47:43] TheHodge: has joined #ruby
[08:48:28] apeiros: yupp, just tested. it does.
[08:50:58] tubuliferous: has joined #ruby
[08:51:31] arnab: Burgestrand: I think I figured it out. /usr/bin/ruby -v gives me 1.8.7 but ruby -v gives me 2.3.0
[08:51:51] arnab: The question now is: how do i get teamcity and bundle to use 2.3.0?
[08:52:05] burgestrand: arnab that's quite a lot different from what you originally asserted in that `ruby -v` gave you 1.8.7!
[08:52:20] apeiros: arnab: either ensure they have the proper env, or use a wrapper
[08:52:22] burgestrand: arnab what about `which bundle`, where is it?
[08:52:28] arnab: yes, that's after doing rvm get stable and stuff
[08:52:40] arnab: Burgestrand: ~/.rvm/gems/ruby-2.3.0/bin/bundle
[08:52:58] burgestrand: arnab assuming `ruby -v` is 2.3.0, `bundle` ought to use 2.3.0 now
[08:53:08] arnab: apeiros: I'm using the same user as teamcity
[08:53:22] burgestrand: I don't know what teamcity is though, I'm afraid
[08:53:40] arnab: teamcity is just something that automates build steps.
[08:53:43] apeiros: "same user" != "same login shell with same env", though
[08:53:56] arnab: apeiros: true
[08:54:11] giz|work: has joined #ruby
[08:54:31] ecnalyr: has joined #ruby
[08:56:33] voodoofish4301: has joined #ruby
[09:00:05] arnab: apeiros: so I ran "env" on both my ssh session and as part of a teamcity step
[09:00:22] arnab: I get the following things which teamcity does NOT have set
[09:00:39] arnab: GEM_HOME, IRBRC, MY_RUBY_HOME, GEM_PATH, RUBY_VERSION
[09:03:20] benlieb: has joined #ruby
[09:03:37] symm-: has joined #ruby
[09:04:39] execat: has joined #ruby
[09:05:08] omphe: has joined #ruby
[09:08:42] workmad3: has joined #ruby
[09:09:53] coffeecupp: has joined #ruby
[09:13:17] Guest76251: has joined #ruby
[09:15:30] omphe: has joined #ruby
[09:17:32] craigp: has joined #ruby
[09:19:21] arnab: Burgestrand: running "which bundle" through teamcity gives me "/usr/bin/bundle"
[09:19:22] agentmeerkat: has joined #ruby
[09:19:26] arnab: Is that maybe the root cause?
[09:19:36] flashpoint9: has joined #ruby
[09:19:44] apeiros: yes. /usr/bin is system stuff. not rvm.
[09:20:02] apeiros: rvm is (usually) ~/.rvm/…
[09:20:20] rikkipitt: has joined #ruby
[09:20:34] arnab: so if I get "something something rvm/bundle" when doing 'which bundle' through ssh
[09:20:37] burgestrand: arnab so you probably once did "sudo gem install bundler", which is a no-no
[09:21:01] arnab: Burgestrand: not that I remember, but go on. Is there a way to fix that?
[09:21:59] burgestrand: arnab it's possible something else did, but personally I'd do `sudo gem uninstall bundler`, however the risk is that something else once did install bundler using sudo and is relying on it to be there
[09:22:30] burgestrand: arnab however, it might be sufficient to just do "gem install bundler" from your ruby -v 2.3, and it'll take precedence
[09:22:31] arnab: is it possible to see what is possibly depending on /usr/bin/bundler ?
[09:22:55] arnab: how do i do gem install bundler from my ruby -v 2.3?
[09:23:00] burgestrand: arnab I highly doubt it, computer systems is just a heap of invisible spaghetties connecting the meatballs that are binaries and libraries
[09:23:37] burgestrand: arnab if you do "ruby -v" and it says "2.3.0", then it should be sufficient to do "gem install bundler"
[09:23:54] arnab: heh, done that 10 times now
[09:24:02] arnab: so I guess the nuclear option is the only one left
[09:24:49] execat: has joined #ruby
[09:27:29] arnab: Burgestrand: so I did the 'sudo gem uinstall bundler'
[09:27:44] arnab: However, ruby -v still gives me 1.8.7 in teamcity and 2.3.0 in ssh
[09:28:02] apeiros: uninstalling bundler does not fix your missing envs
[09:28:21] apeiros: if you're just "how do I solve this quickly", then IMO just use a wrapper.
[09:28:22] burgestrand: arnab teamcity is probably it's own user? you need to make sure that user initializes RVM the same way you do in your .bash_profile
[09:28:51] burgestrand: arnab or use a wrapper, like apeiros says
[09:28:54] the_drow: has joined #ruby
[09:29:28] burgestrand: arnab I can't find the wrapper documentation on rvm website though
[09:29:54] burgestrand: arnab rvm also has its' own IRC on #rvm
[09:29:59] karapetyan: has joined #ruby
[09:30:18] apeiros: seems to have been replaced by rvm alias?
[09:30:44] apeiros: not sure. and sadly not enough time to investigate.
[09:30:58] apeiros: ACTION hasn't had to deploy to anything which needed wrappers for a long time
[09:31:09] burgestrand: apeiros aliases are just another way to name commonly used ruby versions with another name, e.g. rvm use super-old-ruby
[09:31:35] burgestrand: (or, I guess, rvm use ruby-for-project-titan)
[09:31:53] jaiks: has joined #ruby
[09:31:53] latemus: everyone's nicks begin with a and b, i'm feeling very uneasy here
[09:32:16] burgestrand: latemus it's this new thing, you're late(mus) to the party
[09:32:39] astrobunny: has joined #ruby
[09:33:31] edwinvdgraaf: has joined #ruby
[09:34:30] Coldblackice: has joined #ruby
[09:35:04] arup_r: has joined #ruby
[09:35:34] arup_r: Is there any more clean way to get the last integer out of this string? "show_announcement_100"[/.*_(\d+)\z/, 1]
[09:36:53] charliesome: has joined #ruby
[09:38:07] latemus: Burgestrand: haha
[09:38:51] burgestrand: arup_r well, I'd claim you don't need ".*_" as part of your regex since you have \z :)
[09:39:22] bruce_lee: has joined #ruby
[09:39:43] arup_r: Burgestrand: ok thanks :) I removed. regex is always scary to me because I didn't learn it yet properly
[09:39:47] burgestrand: arup_r otherwise, imo it's acceptable and clean enough
[09:40:19] daffy_duck_3: has joined #ruby
[09:40:36] burgestrand: arup_r (and just to be clear, "\d+\z" is sufficient as your regex)
[09:40:50] burgestrand: >> "show_announcement_100"[/\d+\z/]
[09:40:51] ruby[bot]: Burgestrand: # => "100" (https://eval.in/603270)
[09:41:48] burgestrand: arup_r you don't need the parentheses because the \z is a zero-width match, so your entire match becomes just the numbers
[09:41:56] al2o3-cr: just /\d+/ in that string should suffice
[09:42:22] arup_r: thanks for making it tiny :p
[09:42:27] burgestrand: arup_r al2o3-cr is also correct, however it depends if you ever happen to have numbers anywhere else in the string but still just want the ones towards the end
[09:42:52] burgestrand: >> "10_show_announcement_100"[/\d+/]
[09:42:53] ruby[bot]: Burgestrand: # => "10" (https://eval.in/603271)
[09:42:55] burgestrand: >> "10_show_announcement_100"[/\d+\z/]
[09:43:08] ruby[bot]: Burgestrand: # => "100" (https://eval.in/603272)
[09:45:00] execat: has joined #ruby
[09:49:46] coffeecupp: has joined #ruby
[09:53:04] gumbee: has joined #ruby
[09:55:38] execat: has joined #ruby
[09:55:59] pandaant: has joined #ruby
[09:57:58] pawnbox: has joined #ruby
[09:58:14] charliesome: has joined #ruby
[10:03:15] benlieb: has joined #ruby
[10:03:28] Wildfyr: has joined #ruby
[10:03:51] mattwashere: has joined #ruby
[10:05:10] execat: has joined #ruby
[10:06:52] connor_goodwolf: has joined #ruby
[10:12:46] coffeecupp: has joined #ruby
[10:13:43] arnab: Burgestrand: interesting. I tried doing "rvm list" on teamcity and it just said "rvm command not found". So I guess it's time to ping teamcity support :P
[10:15:04] giz|work: has joined #ruby
[10:15:19] roamingdog: has joined #ruby
[10:15:53] execat: has joined #ruby
[10:16:25] burgestrand: arnab your SSH user probably has "source $HOME/.rvm/scripts/rvm", but the teamcity user probably don't
[10:16:37] burgestrand: arnab as part of its' .bash_profile
[10:16:53] arnab: Burgestrand: the users are both the same, which is why I am stumped :(
[10:17:27] burgestrand: arnab perhaps teamcity is not using a login shell for its things, and as such don't execute .bash_profile?
[10:17:57] arnab: Maybe not, but our old teamcity server is doing the same thing on another server
[10:18:17] arnab: But let's see if adding that as a step fixes it
[10:18:19] snowy: has joined #ruby
[10:21:20] dminuoso: arnab: Note, using RVM for production uses is a bad idea.
[10:22:17] dminuoso: It hooks into shell commands like cd/do - which is a particularly bad idea to do on a production system.
[10:23:30] xrlabs: has joined #ruby
[10:23:53] arnab: dminuoso: which is why putting into a step was just a check, not my end goal :=)
[10:24:09] Ropeney: has joined #ruby
[10:27:02] execat: has joined #ruby
[10:27:04] ytti: http://imgur.com/DrEinPB
[10:28:35] j-em: has joined #ruby
[10:28:47] adaedra: I suppose 512 is also out-of-question.
[10:29:21] elvis4526: What's the best ruby IDE ?
[10:29:38] ytti: vim, atom
[10:29:53] ytti: people who are wrong say emacs
[10:29:57] ruby[bot]: "better" and "best" depend entirely on your context. Try to describe what quality would make one thing better than the other.
[10:30:35] elvis4526: The best at making me as productive as possible..
[10:30:36] allcentury: has joined #ruby
[10:31:03] ytti: editor is not gonna make or break your productivity
[10:31:09] ytti: if you're motivated, ed is all you need
[10:31:18] elvis4526: What about echo ?
[10:31:36] elvis4526: It feels way less bloated than ed
[10:31:39] benlieb: has joined #ruby
[10:31:55] adaedra: so we're editor-war'ing betweed ed and echo now?
[10:32:35] ytti: race to the bottom
[10:33:07] Wildfyr: why not cat
[10:33:13] Wildfyr: cat > file
[10:33:59] Emmanuel_Chanel: has joined #ruby
[10:34:05] nankyokusei: has joined #ruby
[10:34:26] Emmanuel_Chanel: has joined #ruby
[10:35:05] sdothum: has joined #ruby
[10:35:15] AlexRussia: has joined #ruby
[10:35:26] elvis4526: What I'd really like is a community edition of RubyMine.
[10:35:28] Ishido: has joined #ruby
[10:35:44] pawandubey: has joined #ruby
[10:37:05] execat: has joined #ruby
[10:37:29] Xeago_: has joined #ruby
[10:37:46] vuoto: has joined #ruby
[10:38:56] tristanp: has joined #ruby
[10:42:56] solars: has joined #ruby
[10:43:28] pawnbox: has joined #ruby
[10:44:28] Chair: has joined #ruby
[10:46:31] Xeago_: has joined #ruby
[10:48:36] craigp: has joined #ruby
[10:48:49] rikkipitt: has joined #ruby
[10:49:33] johnmilton: has joined #ruby
[10:49:56] Xeago__: has joined #ruby
[10:51:11] chip_: has joined #ruby
[10:56:37] rodfersou: has joined #ruby
[10:56:56] execat: has joined #ruby
[10:57:57] toretore: has joined #ruby
[11:01:24] umdstu: has joined #ruby
[11:04:45] deecross: has joined #ruby
[11:05:32] edwinvdgraaf: has joined #ruby
[11:05:51] tubuliferous: has joined #ruby
[11:06:20] burgestrand: has joined #ruby
[11:07:29] tvw: has joined #ruby
[11:08:42] flashpoint9: has joined #ruby
[11:09:32] burgestrand: dminuoso why?
[11:09:41] haxrbyte_: has joined #ruby
[11:10:57] Coldblackice: has joined #ruby
[11:12:15] snowy: has joined #ruby
[11:14:21] spyder55: has joined #ruby
[11:14:56] spyder55: has joined #ruby
[11:17:10] execat: has joined #ruby
[11:17:11] roamingdog: has joined #ruby
[11:17:48] roamingdog: has joined #ruby
[11:20:05] Xeago_: has joined #ruby
[11:20:26] agentmeerkat: has joined #ruby
[11:21:01] shevy: incredibly hot today
[11:23:16] blaxter: has joined #ruby
[11:23:46] freerobby: has joined #ruby
[11:24:38] Ebok: has joined #ruby
[11:25:04] Fernando-Basso: has joined #ruby
[11:25:56] dionysus69: has joined #ruby
[11:25:59] naftilos76: has joined #ruby
[11:31:34] spiette: has joined #ruby
[11:32:23] Bish: >> x = Object.new;def x.[] test
[11:32:24] ruby[bot]: Bish: # => /tmp/execpad-6d2b5473fac9/source-6d2b5473fac9:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/603350)
[11:32:49] Guest76251: has joined #ruby
[11:32:51] Bish: are blocks not valid on [] ?
[11:33:19] shevy: I think the parser has a problem with it
[11:33:27] Bish: that sucks
[11:33:32] Bish: why would it?
[11:33:45] JeanCarloMachado: has joined #ruby
[11:34:40] shevy: https://gist.github.com/shevegen/a6c0d0248640d0e949a876cbdaaeb002
[11:34:55] shevy: we have on one line ...
[11:35:08] Bish: wrote a class "CacheHash", which caches the result of a block :/
[11:35:09] shevy: [] like an Array, and {} for either a hash or a block-syntax
[11:35:33] shevy: if I replace via do end I get:
[11:35:34] shevy: syntax error, unexpected keyword_do_block, expecting end-of-input
[11:35:54] Bish: .[](k) {} works though
[11:36:33] shevy: you mean in the definition?
[11:36:41] shevy: ah you mean invoke via .
[11:37:17] execat: has joined #ruby
[11:37:32] marr: has joined #ruby
[11:37:34] shevy: I can't get anything to work
[11:37:55] shevy: do you have a working sample file?
[11:38:20] Bish: >> x = Object.new; def x.[] x; yield; end; x.[](1) { puts "hi" }
[11:38:21] ruby[bot]: Bish: # => hi ...check link for more (https://eval.in/603363)
[11:38:51] tubuliferous: has joined #ruby
[11:38:56] Bish: >> x = Object.new; def x.[] x; yield; end; x[1] { puts "hi" }
[11:38:57] ruby[bot]: Bish: # => /tmp/execpad-e324acebf68a/source-e324acebf68a:2: syntax error, unexpected { arg, expecting keyword_e ...check link for more (https://eval.in/603365)
[11:39:09] Bish: >> x = Object.new; def x.[] x; yield; end; x[1] do; puts "hi"; end;
[11:39:10] ruby[bot]: Bish: # => /tmp/execpad-e8112d33a3dc/source-e8112d33a3dc:2: syntax error, unexpected keyword_do_block, expectin ...check link for more (https://eval.in/603366)
[11:39:15] apeiros: Bish: no, symbolic methods can't take a block
[11:39:29] apeiros: that means none of +, -, *, [], []= etc. can take one
[11:39:31] Mimorial: has joined #ruby
[11:39:32] ldnunes: has joined #ruby
[11:39:44] Bish: i don't speak japanese
[11:39:44] giz|work: has joined #ruby
[11:40:22] jhass: matz speaks english though
[11:40:27] tristanp: has joined #ruby
[11:40:30] apeiros: and ambiguity is quite likely an issue
[11:40:38] Bish: guess so
[11:40:48] Bish: but they can take blocks, as it seems
[11:40:57] Bish: just not if they are called like they're supposed to
[11:40:57] apeiros: if you use send/public_send, yes
[11:41:01] shevy: really peculiar syntax
[11:41:49] jhass: in non-sugar syntax too, as already noted
[11:41:58] jhass: >> 1.*(2) { x }
[11:41:58] ruby[bot]: jhass: # => 2 (https://eval.in/603370)
[11:42:16] shevy: x.[](1,2,3,4,5) { puts "hi" }
[11:44:09] Hanmac: has joined #ruby
[11:44:20] Emmanuel_Chanel: has joined #ruby
[11:44:44] Emmanuel_Chanel: has joined #ruby
[11:46:39] Bish: has someone written a dynamic cache for a methods? like usaged in dynamic programming
[11:47:11] Bish: i wrote a hash for that, but then it came to my mind, that this could be done genericially
[11:47:24] pierre``: has joined #ruby
[11:47:26] apeiros: ruby already has an inline method cache?
[11:47:44] Bish: has it? wait let me give an example
[11:47:56] execat: has joined #ruby
[11:48:04] apeiros: yes. otherwise it'd be a lot slower. method lookup is expensive.
[11:48:16] Bish: that's not what i meant
[11:48:25] Bish: wait a sec please!
[11:48:28] nando293921: has joined #ruby
[11:48:30] MrBusiness2: has joined #ruby
[11:48:39] Papierkorb: apeiros: is Bish talking about memoization?
[11:48:39] shevy: that would be cool
[11:48:45] Bish: i think so
[11:48:47] apeiros: Papierkorb: maybe
[11:48:48] shevy: like a squeak VM that gets changed at runtime and remains persistent
[11:48:55] apeiros: ACTION waits patiently and sees
[11:48:59] Bish: like fib(n) always calculating for n
[11:49:10] shevy: oh that sounds indeed like memoization
[11:49:12] Bish: and instead of calculating you can save the result for n
[11:49:13] Papierkorb: Bish: Just a delegator with method_missing, where you can do the hash lookup and if it's not there yet, just call into the method itself
[11:49:29] Papierkorb: Bish: then you have it pretty generically.
[11:49:53] Bish: Papierkorb: i didn't get that yet, i was more thinking about saving the method, renaming it, wrap it
[11:49:57] apeiros: Bish: yes that's memoization, and there's plenty of gems for it
[11:50:01] Vingador: has joined #ruby
[11:51:00] roamingdog: has joined #ruby
[11:51:36] Coldblackice: has joined #ruby
[11:53:03] arnab: Burgestrand: Would this be a good way to install cucumber on centos?
[11:53:04] arnab: https://ducquoc.wordpress.com/2012/05/13/install-ruby-cucumber/
[11:53:21] arnab: (using ruby 2.3.0 obviously)
[11:53:21] charliesome: has joined #ruby
[11:53:48] burgestrand: arnab yeah, looks simple enough, prereqs using apt and then rvm for ruby, and then the ruby package manager without sudo :)
[11:54:06] roamingd_: has joined #ruby
[11:54:15] shevy: arnab should work if you try the more recent ruby of course... blog mentions 1.9.x
[11:54:33] flashpoint9: has joined #ruby
[11:54:39] arnab: Burgestrand: yes, I guess you mean yum since im on centos?
[11:55:12] burgestrand: arnab yum, apt, rpm, whatever :)
[11:55:28] shevy: you make me so hungry
[11:55:33] shevy: the yummy burger
[11:56:27] burgestrand: nice to see you're still around here shevy
[11:56:35] shevy: I idle to power!
[11:58:08] omphe: has joined #ruby
[11:58:13] Bish: Hash.new { |h,k| if k < 2;1;else;h[k] = (h[k-1]=h[k-1])+(h[k-2]=h[k-2]);end; }
[11:58:17] Bish: why doesn't this work :D
[11:58:49] shevy: what are you doing
[11:58:58] griffindy: has joined #ruby
[11:59:00] Bish: trying to generate a fibonnaci hash, that caches results
[11:59:03] apeiros: Bish: because it's broken
[11:59:14] Bish: well, result is correct, but the hash is empty
[11:59:20] Bish: or.. is it? i dunn
[11:59:32] shevy: Hash.new { |h,k| if k < 2;1;else;h[k] = (h[k-1]=h[k-1])+(h[k-2]=h[k-2]);end; } == {} # => true
[11:59:39] shevy: a very complicated way to create an empty hash
[11:59:42] Bish: yes it's broken :D, but i actually want to know why hash is empty
[11:59:56] synthroid: has joined #ruby
[12:00:07] shevy: sets a default
[12:00:19] apeiros: Bish: um, mine isn't?
[12:00:24] apeiros: that is, after you use it at least once
[12:00:39] Bish: oh yes, im an idiot
[12:00:41] Bish: print was before
[12:01:02] shevy: x = Hash.new { |h,k| if k < 2;1;else;h[k] = (h[k-1]=h[k-1])+(h[k-2]=h[k-2]);end; }
[12:01:06] allcentury: has joined #ruby
[12:01:06] adaedra: >> Hash.new { |h,k| if k < 2;1;else;h[k] = (h[k-1]=h[k-1])+(h[k-2]=h[k-2]);end; }.tap { h[5] }
[12:01:07] ruby[bot]: adaedra: # => undefined local variable or method `h' for main:Object (NameError) ...check link for more (https://eval.in/603375)
[12:01:08] shevy: x[5] # => 8
[12:01:11] shevy: x # => {1=>1, 0=>1, 2=>2, 3=>3, 4=>5, 5=>8}
[12:01:13] shevy: magic data!
[12:01:15] Jet4Fire: has joined #ruby
[12:01:35] adaedra: >> Hash.new { |h,k| if k < 2;1;else;h[k] = (h[k-1]=h[k-1])+(h[k-2]=h[k-2]);end; }.tap { |h| h[5] }
[12:01:36] ruby[bot]: adaedra: # => {1=>1, 0=>1, 2=>2, 3=>3, 4=>5, 5=>8} (https://eval.in/603376)
[12:01:46] adaedra: There's a small order problem tho :D
[12:01:54] zacstewart: has joined #ruby
[12:02:38] karapetyan: has joined #ruby
[12:02:50] adaedra: That's actually a creative use of Hash default
[12:03:11] bradflaugher: has joined #ruby
[12:03:47] Bish: Hash.new({1=>1,0=>1}) { |h,k| h[k] = h[k-1]+h[k-2] } this would've been real beauty
[12:04:12] tubuliferous: has joined #ruby
[12:04:31] mattwashere: has joined #ruby
[12:05:15] mcls: has joined #ruby
[12:05:17] symm-: has joined #ruby
[12:07:30] execat: has joined #ruby
[12:07:46] Bish: adaedra: thanks, that's for cs 1:1 is good for i guess
[12:07:52] sergio_101: has joined #ruby
[12:07:56] spiette: has joined #ruby
[12:08:17] shevy: you people are very advanced
[12:08:34] shevy: I don't think I have encountered a line like the above one in real code yet!
[12:08:40] rikkipitt: has joined #ruby
[12:09:21] shevy: does the code work?
[12:09:27] Xeago_: has joined #ruby
[12:10:35] deuterium: has joined #ruby
[12:12:28] spyder55: has joined #ruby
[12:12:43] roamingdog: has joined #ruby
[12:12:56] Guest76251: has joined #ruby
[12:13:24] AngryBuzzy: has joined #ruby
[12:13:33] ghr: has joined #ruby
[12:14:22] Xeago_: has joined #ruby
[12:14:22] mattwashere: has joined #ruby
[12:14:39] apeiros: recursive implementation of fib is still a bad idea, though. n^2 invocations for an inherently linear problem.
[12:17:22] charliesome: has joined #ruby
[12:17:34] adaedra: ACTION puts a "FUN KILLER"-sticker on apeiros 
[12:17:36] deecross: has joined #ruby
[12:17:56] apeiros: ACTION adds a "proudly so"-sticker below it
[12:18:07] execat: has joined #ruby
[12:18:29] Bish: shevy: yes it does, but what adaedra says is true
[12:19:23] willemb: ping drbrain ^
[12:19:55] willemb: still no takers on 'what happens if I have multple gem sources' ?
[12:20:18] apeiros: willemb: I've only an expectation. but no knowledge what actually happens.
[12:20:30] burgestrand: has joined #ruby
[12:20:55] bensarz: has joined #ruby
[12:20:58] dminuoso: Burgestrand: Why what?
[12:21:18] shevy: I get an error in irb
[12:21:20] antgel: has joined #ruby
[12:21:26] shevy: x = Hash.new({1=>1,0=>1}) { |h,k| h[k] = h[k-1]+h[k-2] } # ArgumentError: wrong number of arguments (given 1, expected 0)
[12:21:38] agentmeerkat: has joined #ruby
[12:21:40] dminuoso: Burgestrand: Why I think that hooking core shell comands like "cd" to implement a version changing feature that realistically only requires managing PATH properly is a bad idea?
[12:21:41] apeiros: shevy: can't have default value and proc
[12:21:43] burgestrand: dminuoso advising people not to use rvm in production
[12:21:52] dminuoso: Burgestrand: Because RVM is highly intrusive into core system parts.
[12:22:21] burgestrand: dminuoso why is that a problem if it's a stable solution?
[12:22:36] dminuoso: Burgestrand: Stable by what measure?
[12:23:13] burgestrand: dminuoso I understand why people have restraints against using RVM in general, but I don't feel like pushing an opinion upon others as fact is constructive
[12:23:17] Xeago_: has joined #ruby
[12:23:19] execat: has joined #ruby
[12:23:49] burgestrand: dminuoso i.e. "I don't think you should use in RVM in production because …" is cool, "RVM is not for production" not so cool
[12:23:51] dminuoso: Burgestrand: I don't care much about RVM, but hacking shell commands is not a stable solution.
[12:24:16] dminuoso: Burgestrand: Did you even bother to read the second sentence I wrote shortly afterwards?
[12:24:48] dminuoso: Or did you just skip everything to immediately nitpick on it.
[12:25:09] burgestrand: dminuoso if you disagree with me that's fine, but there's no need to resort to that level of arguments.
[12:25:38] elomatreb: It's a freaking version manager. Nothing this boring should warrant a discussion this heated
[12:25:47] AlexRussia: has joined #ruby
[12:26:00] pawnbox: has joined #ruby
[12:26:02] dminuoso: 14:23 < Burgestrand> dminuoso i.e. "I don't think you should use in RVM in production because …" is cool, "RVM is not for production" not so cool
[12:26:14] dminuoso: I explained why it sucks right at the beginning.
[12:26:17] nadir: has joined #ruby
[12:26:18] dminuoso: So Im not sure what your problem is.
[12:26:32] burgestrand: dminuoso did you explain it to me, or to the person you were saying it to before?
[12:26:49] apeiros: dminuoso: the dressing an opinion as a fact part is
[12:27:03] apeiros: and I concur with Burgestrand on that
[12:27:52] burgestrand: dminuoso if you did explain it to the person having rvm issues then that's cool, I missed that because I disconnected, but if you didn't I really think you should!
[12:28:24] dminuoso: Burgestrand: It appears that you immediately disconencted after that first statement. So I guess its a misunderstanding then
[12:28:29] dminuoso: 12:22 < dminuoso> It hooks into shell commands like cd/do - which is a particularly bad idea to do on a production system.
[12:28:45] burgestrand: dminuoso nice! Misunderstanding indeed. :)
[12:30:29] shevy: noooo guys
[12:30:34] shevy: this was almost as epic as vim versus emacs!
[12:31:04] ecnalyr: has joined #ruby
[12:32:37] snowy: has joined #ruby
[12:33:36] spacemud: has joined #ruby
[12:33:44] jmignault: has joined #ruby
[12:33:59] pawnbox: has joined #ruby
[12:34:56] nankyokusei: has joined #ruby
[12:35:07] stardiviner: has joined #ruby
[12:35:08] JeanCarl1Machado: has joined #ruby
[12:35:22] daumie: has joined #ruby
[12:35:23] burgestrand: shevy vim vs emacs was settled years ago, a butterfly is all you need
[12:36:10] burgestrand: also, imagine fly made out of butter
[12:38:27] deviation: has joined #ruby
[12:39:22] platzhirsch: has joined #ruby
[12:39:25] deviation: has joined #ruby
[12:39:27] hutch34: has joined #ruby
[12:39:32] dminuoso: Burgestrand: You know, Emacs has that feature... :-)
[12:40:46] shevy: Burgestrand I read on reddit lately that someone wrote some editor in C in less than 1000 lines of code
[12:42:35] jmignault: has joined #ruby
[12:44:40] Guest76251: has joined #ruby
[12:45:45] flashpoint9: has joined #ruby
[12:46:26] yqt: has joined #ruby
[12:46:48] A_Drone: has joined #ruby
[12:48:08] dminuoso: has joined #ruby
[12:48:55] rikkipitt: has joined #ruby
[12:49:20] howdoi: has joined #ruby
[12:51:01] anisha_: has joined #ruby
[12:51:29] kavanagh: has joined #ruby
[12:51:37] mjuszczak: has joined #ruby
[12:51:53] TvL2386: has joined #ruby
[12:52:21] execat: has joined #ruby
[12:54:05] omphe: has joined #ruby
[12:55:23] Coldblackice: has joined #ruby
[12:57:37] Xeago_: has joined #ruby
[13:01:07] cd-rum: has joined #ruby
[13:01:31] ChiefAlexander: has joined #ruby
[13:02:22] dkam: has joined #ruby
[13:03:31] ramortegui: has joined #ruby
[13:03:35] ekinmur: has joined #ruby
[13:04:06] mentok: has joined #ruby
[13:09:58] Bish: can i give a proc a persistent variable without a class around it?
[13:10:04] Bish: not really, right?
[13:10:09] solars: has joined #ruby
[13:10:28] ccooke: yes, if there's a variable it can access that nothing else uses
[13:10:55] ccooke: but a class or module would be a much better way to namespace it
[13:11:40] kavanagh: has joined #ruby
[13:12:01] execat: has joined #ruby
[13:12:11] Bish: hm,how would i create an anonymous module to put that proc int it?
[13:12:13] Bish: (is that crazy?)
[13:13:26] al2o3-cr: has joined #ruby
[13:13:35] evie_hammond: has joined #ruby
[13:14:04] codecop: has joined #ruby
[13:15:55] shevy: I think others wanted the same in the past here on #ruby
[13:16:00] shevy: so you are within the confines of regular insanity
[13:16:19] zenlot: has joined #ruby
[13:16:37] shevy: all the things without a name!
[13:17:51] FernandoBasso: has joined #ruby
[13:19:30] harfangk: has joined #ruby
[13:19:47] AngryBuzzy: has joined #ruby
[13:20:55] karapetyan: has joined #ruby
[13:21:21] Bish: >> p Module.new { def x; puts "hi"; end; }.x
[13:21:24] ecnalyr: has joined #ruby
[13:21:27] ruby[bot]: Bish: # => undefined method `x' for #<Module:0x41ec9a3c> (NoMethodError) ...check link for more (https://eval.in/603429)
[13:21:38] Bish: well, easier than i thought.
[13:22:02] daumie: has joined #ruby
[13:22:18] chouhoulis: has joined #ruby
[13:22:29] jahrichie: has joined #ruby
[13:22:53] chouhoulis: has joined #ruby
[13:23:19] Bish: so anonymous models are a thing, i guess
[13:23:24] Bish: modules*
[13:24:01] Bish: what's actually the difference between class and module
[13:24:07] jahrichie1: has joined #ruby
[13:24:15] Bish: only the constructor?
[13:24:57] lupine: well, you can't include classes, can you?
[13:25:14] lupine: TypeError: wrong argument type Class (expected Module)
[13:26:06] pawnbox: has joined #ruby
[13:26:54] Bish: oh, include is not a method
[13:26:58] Bish: while require is, really funny
[13:27:08] apeiros: Bish: Class is a subclass of Module. Class can't be used with include/extend/prepend. Module doesn't have ::allocate
[13:27:18] apeiros: (which is needed for ::new)
[13:27:32] jrafanie: has joined #ruby
[13:27:46] apeiros: huh? how'd you figure include wasn't a method? because it definitely is :)
[13:27:56] malconis: has joined #ruby
[13:28:00] jhass: &ri Module#include
[13:28:00] `derpy: http://ruby-doc.org/core-2.3.1/Module.html#method-i-include
[13:29:01] shevy: derpy the pink pony for the rescue
[13:31:25] aegis3121: has joined #ruby
[13:31:42] execat: has joined #ruby
[13:32:33] spiette_: has joined #ruby
[13:33:16] blackmesa: has joined #ruby
[13:35:05] Bish: so include IS a method
[13:35:11] Bish: man, u never learn enough about ruby
[13:35:22] Bish: how does the class Class drop include?
[13:35:30] Bish: when it inherits from Module
[13:35:40] apeiros: you confuse receiver and argument
[13:35:40] ekinmur: has joined #ruby
[13:35:51] apeiros: Class#include exists. but you can't pass a class as an argument to it.
[13:36:03] Bish: that's genius
[13:36:03] c0mrad3: has joined #ruby
[13:36:10] apeiros: after all, include is probably much more often used on classes than on modules :)
[13:36:24] Bish: yeah i was stupid there
[13:36:26] Bish: i get it!
[13:36:31] sinanislekdemir: has joined #ruby
[13:36:32] Bish: ACTION is hyped
[13:36:34] mentok_: has joined #ruby
[13:36:42] Bish: is having anonymous modules somehow stupid? GC or something
[13:37:08] apeiros: an object is an object is an object
[13:37:30] apeiros: and anonymous here means two things: a) not assigned to a constant, b) no .name inferred from said constant
[13:37:34] dminuoso: Bish: Ruby has only very few keywords, and it is possible to avoid all of them I think.
[13:38:02] apeiros: as for a: the majority of objects in your code are not assigned to a constant
[13:38:12] apeiros: and as for b: the majority of your object doesn't have a .name either :)
[13:38:16] dminuoso: Bish: And no it is not stupid. Especially in dynamic meta programming anoynmous classes/modules make a lot of sense.
[13:38:25] dminuoso: Bish: Singleton classes for example do not need to be named.
[13:38:31] mattwashere: has joined #ruby
[13:38:34] dminuoso: (And for all intends and purposes modules and classes are the same)
[13:38:56] apeiros: one note about it though: some frameworks/libraries (IMO erroneously) expect classes/modules to have names and fail to work properly if that's not the case
[13:39:00] `tim`: has joined #ruby
[13:39:56] dminuoso: So, here I am, discovering the most bizarre Oracle bug. Do you think I can make money off it?
[13:40:17] shevy: don't lower to their ways!
[13:40:26] apeiros: dminuoso: either I missed a prior scoping of that blanket statement or I'd say it's just wrong. see above mentions of differences between class & module.
[13:40:40] apeiros: dminuoso: no, with oracle, you pay money to be allowed to report the bug to them
[13:40:40] SilverKey: has joined #ruby
[13:40:44] apeiros: and I'm not even kidding.
[13:40:57] dminuoso: Im well aware.
[13:41:47] dminuoso: Somehow, I managed to create a very simplistic view that is accepted, that you can easily select * from, but one particular column is totally and entirely fucked up.
[13:41:52] execat: has joined #ruby
[13:42:08] dminuoso: Well, it is almost, but not quite, entirely broken.
[13:43:06] apeiros: what behavior do you observe which is broken?
[13:43:39] dminuoso: apeiros: select col1 from view; returns errors that col1 is an invalid identifier. running desc returns some really broken output around the col1 too.
[13:43:47] dminuoso: But a plain select * from view works just fine, displaying the col1 even.
[13:44:17] apeiros: same when double-quoting the col?
[13:44:34] apeiros: the name might be an obscure reserved word
[13:44:38] dminuoso: apeiros: well its not a reserved identifier, and its behind an alias.
[13:44:49] dminuoso: apeiros: And that keyword has worked fine for years.
[13:44:52] dminuoso: well, column name.
[13:45:12] evie_hammond: has joined #ruby
[13:45:12] dminuoso: But Ill try and see what happens, its a good idea.
[13:45:43] cdg: has joined #ruby
[13:46:38] dminuoso: apeiros: https://gist.github.com/anonymous/788150b30486d5f11d1fe1fef137859a
[13:46:46] dminuoso: If thats not some really borked DESC output, I dont know what is.
[13:46:51] skade: has joined #ruby
[13:46:59] dminuoso: (COL4 is the one that is broken of coursE)
[13:47:05] shevy: https://xkcd.com/327/
[13:48:22] apeiros: funny, even got problems putting stuff on the same line?
[13:48:43] dminuoso: Which was the first indicator that this is an oracle bug.
[13:50:34] eljimmy: has joined #ruby
[13:51:55] Bish: https://gist.github.com/anonymous/d311143ab38563811e5584346c9a2a36
[13:51:59] Bish: what do you guys think
[13:52:03] allcentury: has joined #ruby
[13:52:14] Bish: how could i make "createCached" better
[13:52:28] Bish: how can i also, replace rekursive calls of the method "meth" with "myself"
[13:52:34] dminuoso: apeiros: Haha I found it. Oracle allows the usage of newline characters in identifiers...
[13:52:46] Gooer: has joined #ruby
[13:53:12] apeiros: my next table will have a 30-newlines column
[13:53:49] apeiros: Bish: I think createCached reads like java :-p
[13:53:56] Bish: .. well, it's just a PoC
[13:54:00] Bish: to see if i want something like that
[13:54:07] A_Drone: has joined #ruby
[13:54:16] Xeago_: has joined #ruby
[13:54:17] Bish: (my last message was the name of my oracle table oO)
[13:55:22] tristanp: has joined #ruby
[13:56:01] apeiros: `m.instance_exec(meth) { @m = meth}` ?
[13:56:12] bougyman: so much meth
[13:56:17] apeiros: I'd probably just return a proc
[13:56:24] blackmesa: has joined #ruby
[13:56:31] apeiros: I see no point in those Module shenanigans
[13:56:41] Bish: well i need a place to store my "cache"
[13:56:54] apeiros: easy, procs are closures
[13:57:17] Bish: :o pls specify
[13:57:22] Bish: they have their own namespace?
[13:57:25] apeiros: cache = {}; proc { |*args| … cache[…] …}
[13:57:42] Bish: but where to store "cache" ?
[13:57:43] apeiros: not namespace, no. their own scope.
[13:58:00] apeiros: the proc closes over it, ensuring it exists for as long as the proc exists.
[13:58:33] Bish: well but i would like cache to be invisible
[13:58:36] apeiros: >> def foo; x = 1; proc { x }; end; a = foo; a.call
[13:58:37] ruby[bot]: apeiros: # => 1 (https://eval.in/603443)
[13:58:55] apeiros: even though you're out of scope of foo when doing a.call, the proc can still access x.
[13:59:10] Bish: so the local of "foo" lives as long as proc does
[13:59:12] apeiros: it's pretty much even more invisible than in your solution.
[13:59:14] Bish: since it references it
[13:59:32] Bish: javascriptish
[13:59:39] Bish: who said that?! wasn't me
[13:59:48] apeiros: yes, it's a pattern often used in JS
[14:00:07] giz|work: has joined #ruby
[14:00:08] chip_: has joined #ruby
[14:00:15] Bish: and if foo gets invoked twice, it will not be the same x?
[14:00:19] Bish: surely not
[14:00:28] apeiros: try and see
[14:00:56] Bish: >> def x; x=1; x.object_id; end; x; x;
[14:00:57] ruby[bot]: Bish: # => 3 (https://eval.in/603444)
[14:01:03] Bish: sigh, im stupid.
[14:01:07] execat: has joined #ruby
[14:01:08] apeiros: anyway, the other variant I'd consider better, which goes more towards what you did, would be to have a proper CachedMethod class, which you instantiate.
[14:01:38] tristanp: has joined #ruby
[14:01:46] dminuoso: apeiros: As to your question, about the only difference is that Module does not come with an allocator/new method - and includes only accepts Modules explicitly.
[14:02:01] apeiros: >> def x; x="1"; proc { x }; end; [x.call.object_id, x.call.object_id]
[14:02:02] ruby[bot]: apeiros: # => [552012980, 552012930] (https://eval.in/603445)
[14:02:18] apeiros: dminuoso: precisely what I said above
[14:02:32] apeiros: also it wasn't my question, it was my answer to bish's question
[14:03:05] apeiros: 15:27 apeiros: Bish: Class is a subclass of Module. Class can't be used with include/extend/prepend. Module doesn't have ::allocate
[14:03:30] apeiros: and I now notice it should have been #allocate
[14:03:54] apeiros: same for #new (since Module very much does have a ::new, and that's not the one I meant :D)
[14:04:28] dminuoso: apeiros: Oh yeah.
[14:07:22] kobain: has joined #ruby
[14:08:21] omphe: has joined #ruby
[14:10:47] A_Drone: has joined #ruby
[14:11:21] execat: has joined #ruby
[14:13:58] malconis: has joined #ruby
[14:14:13] Bish: apeiros: but i won't be able, to replcae the recursive calls, right?
[14:14:29] Bish: >>asm def x; x; end;
[14:14:30] ruby[bot]: Bish: # => undefined method `asm' for main:Object (NoMethodError) ...check link for more (https://eval.in/603448)
[14:14:34] Bish: asm>> def x; x; end;
[14:14:34] apeiros: Bish: what do you mean?
[14:14:35] ruby[bot]: Bish: I have disassembled your code, the result is at https://eval.in/603449
[14:14:48] Bish: apeiros: sorry, wrong highlight
[14:15:02] apeiros: oh, in my example? should have used another name for the variable :D
[14:15:13] apeiros: >> def foo; x="1"; proc { x }; end; [foo.call.object_id, foo.call.object_id]
[14:15:14] ruby[bot]: apeiros: # => [548138150, 548138100] (https://eval.in/603450)
[14:15:28] Bish: i always confuse you with adeara or whats hes called
[14:15:35] agentmeerkat: has joined #ruby
[14:15:55] Bish: no, let's say i want to cache recursive fibonacci, then i can cache args=>result
[14:16:05] Bish: but i cannot cache the recursive calls, it does to itself
[14:17:41] mustmodify: has left #ruby: ()
[14:17:52] yadobujo: has joined #ruby
[14:20:17] yadobujo_: has joined #ruby
[14:20:48] deviation: has joined #ruby
[14:21:02] benlieb: has joined #ruby
[14:21:03] al2o3-cr: didn't know you could do this with detect
[14:21:11] al2o3-cr: >> x = proc { "no match" }; %w^foo bar baz^.detect(x) { |word| word.size > 3 }
[14:21:12] ruby[bot]: al2o3-cr: # => "no match" (https://eval.in/603451)
[14:21:23] yadobujo_: has joined #ruby
[14:22:26] agentmeerkat: has joined #ruby
[14:22:28] agent_white: has joined #ruby
[14:23:22] SilverKey: has joined #ruby
[14:26:23] burgestrand: has joined #ruby
[14:26:31] diegoviola: has joined #ruby
[14:26:32] skade: has joined #ruby
[14:26:42] Xeago_: has joined #ruby
[14:27:33] Bish: now this is sick
[14:27:56] Xeago__: has joined #ruby
[14:28:28] Bish: https://gist.github.com/anonymous/e459db5abe5ae2528b724db134930ad5
[14:28:30] tubuliferous: has joined #ruby
[14:28:31] Bish: that's just great
[14:29:00] Bish: write stupid functions, and replace them afterwars if they're slow
[14:29:12] Bish: (as long as they don't have sideeffects)
[14:29:16] swills: has joined #ruby
[14:29:20] agent_white: has joined #ruby
[14:30:38] execat: has joined #ruby
[14:32:25] swills: has joined #ruby
[14:33:06] apeiros: Bish: obviously a cached method has to run first in order to cache the result. so no, you can't eliminate that step.
[14:33:20] SilverKey: has joined #ruby
[14:33:30] apeiros: but once you have the result for a call which would cause recursions, you won't recur anymore since you already have the result.
[14:33:40] ecnalyr: has joined #ruby
[14:34:10] Bish: apeiros: well, my last gist works for recursive calls!
[14:34:24] Bish: and it's awesome that something like that is possible
[14:34:29] yqt: has joined #ruby
[14:34:46] Bish: surely only works for static functions
[14:35:38] Bish: apeiros: my last gist, look at it!
[14:35:50] nankyokusei: has joined #ruby
[14:35:53] Bish: it's so cool ( not because i have written it, but because it's possible )
[14:36:03] apeiros: and congrats
[14:36:05] Bish: if you outcomment the line before the last lane
[14:36:13] apeiros: but I don't get your "surely only works for static functions"
[14:36:14] Bish: it's muuuch slower, yippeh
[14:36:19] elomatreb: Does anyone know if I can tell rubocop to disable a linter only for a single method, but including rescue blocks of that method?
[14:36:38] Bish: well.. if the function not alyways outputs the same for input xyz it won't work
[14:36:52] elomatreb: If I disable it inside the method, it does not work for the rescue blocks, if I disable outside it disable for the whole class/module
[14:36:53] apeiros: oh, deterministic you mean.
[14:37:04] apeiros: static is something else ;-)
[14:37:08] evie_hammond: has joined #ruby
[14:37:24] Bish: yeah i even knew it, but i wasn't confident enough to say it
[14:37:28] apeiros: and yes, of course, memoization isn't for non-deterministic functions. a memoized rand would be horrible.
[14:37:55] Bish: *replaces rand*
[14:37:55] apeiros: or a memoized Time.now
[14:38:34] Bish: proven to be random by dice
[14:38:53] apeiros: also functions which return mutable data might be a bad choice
[14:38:58] haxrbyte: has joined #ruby
[14:39:34] Bish: can i replace member functions? like so that future instances of that class will have that?
[14:40:48] mwlang: has joined #ruby
[14:41:47] stoopidmunkey: has joined #ruby
[14:42:06] dkam: has joined #ruby
[14:42:12] snath: has joined #ruby
[14:42:19] Xeago_: has joined #ruby
[14:42:35] Coldblackice: has joined #ruby
[14:42:48] mark_661: has joined #ruby
[14:43:07] daumie: has joined #ruby
[14:44:35] GinoMan2440: has joined #ruby
[14:45:20] roamingdog: has joined #ruby
[14:45:53] dminuoso: has joined #ruby
[14:46:04] burgestrand: has joined #ruby
[14:47:11] mark_661: has left #ruby: ()
[14:47:13] tristanp: has joined #ruby
[14:48:43] fmcgeough: has joined #ruby
[14:49:00] anisha_: has joined #ruby
[14:50:14] tristanp_: has joined #ruby
[14:50:21] execat: has joined #ruby
[14:50:54] evie_hammond: has joined #ruby
[14:54:58] tristanp: has joined #ruby
[14:55:58] mark_66: has joined #ruby
[14:56:40] Emmanuel_Chanel: has joined #ruby
[14:57:07] Emmanuel_Chanel: has joined #ruby
[14:58:41] jrafanie_: has joined #ruby
[14:58:58] skade: has joined #ruby
[14:59:56] polishdub: has joined #ruby
[15:00:21] spyder55: has joined #ruby
[15:01:33] mjuszczak: has joined #ruby
[15:02:07] mistermocha: has joined #ruby
[15:02:53] mjuszczak: has joined #ruby
[15:03:34] aegis3121: has joined #ruby
[15:03:51] mjuszczak: has joined #ruby
[15:04:08] giz|work: has joined #ruby
[15:07:12] tjohnson: has joined #ruby
[15:07:34] skade: has joined #ruby
[15:09:01] asianMike: has joined #ruby
[15:10:17] execat: has joined #ruby
[15:11:34] ChiefAlexander: has joined #ruby
[15:11:41] aupadhye: has joined #ruby
[15:12:34] omphe: has joined #ruby
[15:12:54] mtkd: has joined #ruby
[15:12:57] yadobujo: has joined #ruby
[15:13:46] Coldblackice: has joined #ruby
[15:14:32] yadobujo: has joined #ruby
[15:15:20] Xeago_: has joined #ruby
[15:15:24] shinnya: has joined #ruby
[15:16:28] blackmesa: has joined #ruby
[15:17:02] skade: has joined #ruby
[15:17:08] daumie: has joined #ruby
[15:19:27] habitullence: has joined #ruby
[15:20:26] mamercad: has joined #ruby
[15:21:27] kies: has joined #ruby
[15:24:20] James123: has joined #ruby
[15:24:28] karapetyan: has joined #ruby
[15:25:35] chip_: has joined #ruby
[15:25:53] priodev: has joined #ruby
[15:28:25] James123: Hello, I started using watir-webdriver and there is a javascript script that when executed loads some text from another site. However, I can't get that text (although it is displayed in the web browser), the source obtained from watir has the script itself. Any ideas?
[15:29:53] execat: has joined #ruby
[15:30:43] zacts: has joined #ruby
[15:32:23] dopie: has joined #ruby
[15:33:45] alfiemax: has joined #ruby
[15:36:19] _djbkd: has joined #ruby
[15:37:20] tristanp: has joined #ruby
[15:37:34] jhass: you would need to select whatever node the script inserts, not the script node itself
[15:37:44] User458764: has joined #ruby
[15:38:08] biberu: has joined #ruby
[15:38:27] dgynn: has joined #ruby
[15:39:00] zacts: has joined #ruby
[15:40:16] synthroid: has joined #ruby
[15:40:26] blackmesa: has joined #ruby
[15:41:15] mjuszczak: has joined #ruby
[15:42:29] skade: has joined #ruby
[15:42:52] execat: has joined #ruby
[15:44:33] tubuliferous: has joined #ruby
[15:44:36] AlexRussia: has joined #ruby
[15:45:57] aufi: has joined #ruby
[15:46:35] achamian: has joined #ruby
[15:46:39] mistermocha: has joined #ruby
[15:47:36] evie_hammond: has joined #ruby
[15:47:38] aupadhye: has joined #ruby
[15:47:38] foooobear: has joined #ruby
[15:47:41] hutch34: has joined #ruby
[15:48:13] Coldblackice: has joined #ruby
[15:48:42] skweek: has joined #ruby
[15:49:18] arup_r: has joined #ruby
[15:49:48] arup_r: Can I say `#itself` is the unblock version of `#tap` or they are completely different? Out of curiosity..
[15:49:56] priodev: has joined #ruby
[15:50:39] ltp: has joined #ruby
[15:51:12] dkam: has joined #ruby
[15:51:59] ljarvis_: >> x = nil; "foo".tap { |s| x = s.itself }; x
[15:52:16] ljarvis_: cba to change my nick
[15:52:29] ljarvis_: oh eval isn't even here
[15:52:37] ljarvis_: arup_r: did you try it in irb?
[15:52:41] jhass: ljarvis_: it is
[15:52:43] ljarvis_: you can check pretty easily
[15:52:48] jhass: ruby[bot] does it, since months ;)
[15:52:53] ljarvis_: oh right yep
[15:53:00] ljarvis_: i require more coffee
[15:53:02] execat: has joined #ruby
[15:53:22] jhass: arup_r: I guess so, yet their usecases don't really compare
[15:53:39] jhass: so I'm not sure I see any usefulness in that statment
[15:53:43] jhass: *statement
[15:53:44] arup_r: ljarvis_: You didn't get my question all, and the example you gave makes no sense though.. :)
[15:54:02] toretore: what is a use case for itself?
[15:54:09] Tonkers: has joined #ruby
[15:54:20] ljarvis_: group_by is a good one
[15:54:33] nhhc: has joined #ruby
[15:54:35] toretore: just so you can use &:itself ?
[15:54:39] ljarvis_: pretty much
[15:54:45] dennisvennink: has joined #ruby
[15:54:50] ljarvis_: remember this is ruby, we add weird conveniences all over the place
[15:54:56] ljarvis_: hence 35 aliases for a single method
[15:55:01] toretore: that's pretty weak, but i guess there could be better ones
[15:55:31] Tonkers: anyone have experience with compass?
[15:55:33] conta: has joined #ruby
[15:55:49] jhass: toretore: yeah, it comes up with .lazy. IME
[15:55:51] amclain: has joined #ruby
[15:56:15] [Butch]: has joined #ruby
[15:56:37] jhass: Tonkers: I see a #compass
[15:56:59] craigp: has joined #ruby
[15:57:34] Tonkers: jhass: thanks
[15:57:51] `tim`: has joined #ruby
[15:58:37] davedev24: has joined #ruby
[16:01:24] TomyLobo: has joined #ruby
[16:05:32] Peteykun: has joined #ruby
[16:05:40] ramfjord: has joined #ruby
[16:07:42] _djbkd: has joined #ruby
[16:08:29] djbkd_: has joined #ruby
[16:12:36] yadobujo: has joined #ruby
[16:13:41] spudowiar: has joined #ruby
[16:14:18] snowy: has joined #ruby
[16:14:47] l4v2: has joined #ruby
[16:14:56] whathappens: has joined #ruby
[16:15:14] hastur: has joined #ruby
[16:15:27] evie_hammond: has joined #ruby
[16:17:46] memorasus: has joined #ruby
[16:20:37] fructose: has joined #ruby
[16:21:11] macsteps: has joined #ruby
[16:21:14] pawnbox: has joined #ruby
[16:22:09] SCHAAP137: has joined #ruby
[16:23:18] tristanp: has joined #ruby
[16:24:35] bradflaugher: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[16:24:56] ayonkhan: has joined #ruby
[16:25:31] JeanCarloMachado: has joined #ruby
[16:26:53] Xeago_: has joined #ruby
[16:27:07] l4v2: has left #ruby: ()
[16:27:22] l4v2: has joined #ruby
[16:27:44] fructose: I've seen multiple Ruby style guides now that recommend leaving off parenthesis for method calls with no arguments, none of which explain why. Anyone know? I'm very new to Ruby, but that seems like the opposite of what I'd do, given the parenthesis help distinguish from variables.
[16:28:41] elomatreb: fructose: Almost all styleguides are opinions. If you really want to use parentheses, you are free to do so
[16:29:08] darix: fructose: and in some cases it might even be needed to make the syntax more clear.
[16:29:39] fructose: elomatreb: Sure, but generally there is a reason, even if not everyone agrees with it. Right now I just don't see any advantages at all
[16:29:40] jhass: they are opinions, yes. Keep in mind some try to find the majority opinion in the community about a topic though
[16:29:55] Coldblackice: has joined #ruby
[16:29:58] jhass: it reads cleaner to most people
[16:29:59] elomatreb: I guess the reason is both that the optional parentheses are one of Ruby's defining features, and everything you can access from the outside of an object is a method, so the distiction is not needed as often as in other languages
[16:30:32] jhass: whether it's a method call or local variable is also more often than not irrelevant information, thus noise
[16:30:39] havenwood: fructose: Here's a little writeup: https://gist.github.com/drbrain/5ea7c9389a55c81fd3c1
[16:30:46] ule: has joined #ruby
[16:30:47] JeanCarloMachado: has joined #ruby
[16:31:04] JeanCarl1Machado: has joined #ruby
[16:31:05] jhass: in chain calls it's also redundant, foo.bar vs foo.bar(), I already know bar can only be a method call in the former
[16:31:26] aupadhye: has joined #ruby
[16:32:04] smathy: has joined #ruby
[16:32:08] skade: has joined #ruby
[16:32:24] roamingdog: has joined #ruby
[16:32:40] diegoviola: has joined #ruby
[16:36:23] roamingdog: has joined #ruby
[16:36:42] nankyokusei: has joined #ruby
[16:39:29] fructose: Funny how the arguments one way are all convincing me of the opposite
[16:43:22] craigp: has joined #ruby
[16:44:28] Macaveli: has joined #ruby
[16:44:32] nettoweb: has joined #ruby
[16:44:48] flashpoint9: has joined #ruby
[16:46:22] ChiefAlexander: has joined #ruby
[16:46:48] cschneid_: has joined #ruby
[16:47:21] DrCode: has joined #ruby
[16:48:14] mechanicles: has joined #ruby
[16:49:18] akira616: has joined #ruby
[16:49:52] zacts: has joined #ruby
[16:50:54] James123: I am using Watir and there is a tag <time datetime="..."></time>. I can get the whole thing with browser.time, but I can't find how to get the datetime. Any ideas?
[16:51:31] roshanavand: has joined #ruby
[16:51:45] jhass: browser.time["datetime"] ?
[16:51:51] ruby[bot]: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
[16:51:56] daumie: has joined #ruby
[16:52:03] jhass: do a binding.pry where you have the object
[16:52:05] jhass: play around
[16:52:07] jhass: find its class
[16:52:11] jhass: find the docs for its class
[16:53:07] James123: jhass, thank you. I didn't know about Pry :)
[16:54:05] conta: has joined #ruby
[16:54:11] stoopidmunkey: has joined #ruby
[16:54:25] elomatreb: Pry and byebug are so nice
[16:54:41] chadwtaylor: has joined #ruby
[16:56:01] noodle: has joined #ruby
[16:56:16] banisterfiend: has joined #ruby
[16:57:20] execat: has joined #ruby
[16:59:28] tomchapin: has joined #ruby
[17:00:31] leea: has joined #ruby
[17:00:49] ledestin: has joined #ruby
[17:01:14] replay: has joined #ruby
[17:03:00] tristanp: has joined #ruby
[17:04:04] dennisvennink: What's Ruby's best built-in command line option parser?
[17:04:24] skade: has joined #ruby
[17:04:38] Hobogrammer: has joined #ruby
[17:04:51] ruby[bot]: "better" and "best" depend entirely on your context. Try to describe what quality would make one thing better than the other.
[17:05:49] maloik: has joined #ruby
[17:07:41] mjuszczak: has joined #ruby
[17:09:01] mjuszczak: has joined #ruby
[17:09:13] dennisvennink: Fair enough. I guess something that's more idiomatic Ruby.
[17:09:22] xall: has joined #ruby
[17:09:44] mechanic_: has joined #ruby
[17:09:46] jhass: more idiomatic Ruby than?
[17:09:51] Dimik: has joined #ruby
[17:09:56] mjuszczak: has joined #ruby
[17:10:56] ule: has joined #ruby
[17:11:18] mjuszczak: has joined #ruby
[17:11:47] jhass: sorry, we just can't give a clear recommendation without an idea of what you're looking for
[17:12:01] jhass: if you just want personal favorites, mine's slop still
[17:12:18] mjuszczak: has joined #ruby
[17:13:52] mjuszczak: has joined #ruby
[17:14:55] macsteps: has joined #ruby
[17:16:27] dennisvennink: slop is not a built-in module. I guess I'm stuck with OptionParser and GetoptLong?
[17:17:52] hastur: hey, i have a rails view with a for loop that runs over some models. why does the array of models get returned in HTML after the loop? how can i prevent that?
[17:18:13] spyder55: has joined #ruby
[17:18:29] toretore: ?rails hastur
[17:18:29] ruby[bot]: hastur: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[17:19:09] burgestrand: has joined #ruby
[17:20:49] roshanavand: has joined #ruby
[17:21:32] hastur: has left #ruby: ("Leaving")
[17:21:51] roamingdog: has joined #ruby
[17:22:16] wldcordeiro: has joined #ruby
[17:22:24] deecross: has joined #ruby
[17:23:23] pilne: has joined #ruby
[17:25:32] ramfjord: has joined #ruby
[17:26:23] roamingdog: has joined #ruby
[17:26:27] jhass: dennisvennink: well yes, there's not much choice there
[17:26:33] jhass: nobody really uses getoptlong
[17:27:25] dennisvennink: jhass: Thanks. I'll try OptionParser.
[17:28:34] ekinmur: has joined #ruby
[17:28:42] kboosy: has joined #ruby
[17:29:10] aegis3121: has joined #ruby
[17:30:18] rcvalle: has joined #ruby
[17:31:26] firstdayonthejob: has joined #ruby
[17:31:45] dikaio: has joined #ruby
[17:33:31] yxhuvud: has joined #ruby
[17:33:34] Infra-Red: has joined #ruby
[17:34:03] Coldblackice: has joined #ruby
[17:34:26] `tim`: has joined #ruby
[17:34:43] daumie: has joined #ruby
[17:35:38] daumie: has joined #ruby
[17:36:12] ged: Does anyone know if there's a comprehensive summary of the changes between Rack 1.6.x and 2.x (besides just reading the whole commit log)? The homepage still lists "News" from 2013, and neither the HISTORY file nor the NEWS file have anything from 2016 in them.
[17:37:42] flashpoint9: has joined #ruby
[17:38:03] DrCode: has joined #ruby
[17:38:09] deadnull: has joined #ruby
[17:39:24] deadnull: has joined #ruby
[17:40:10] sucks: has joined #ruby
[17:40:18] tomchapin: has joined #ruby
[17:40:36] sucks: has joined #ruby
[17:40:52] vuoto: has joined #ruby
[17:41:01] macsteps: has joined #ruby
[17:44:49] ChiefAlexander: has joined #ruby
[17:47:20] pawnbox: has joined #ruby
[17:48:27] SilverKey: has joined #ruby
[17:49:04] pawnbox_: has joined #ruby
[17:49:18] yardenbar: has joined #ruby
[17:49:29] deecross: has joined #ruby
[17:50:20] solars: has joined #ruby
[17:50:59] wldcordeiro: has joined #ruby
[17:51:27] Eiam: has joined #ruby
[17:52:02] xall: has joined #ruby
[17:54:22] ayonkhan_: has joined #ruby
[17:55:00] tristanp: has joined #ruby
[17:55:01] dkam: has joined #ruby
[17:55:39] Xeago_: has joined #ruby
[17:56:54] execat: has joined #ruby
[17:58:39] dionysus69: has joined #ruby
[17:59:18] ule: hey guys..
[17:59:35] ule: how do I check if a key exist in a hash and this key is not nil?
[17:59:49] ule: irb(main):008:0> a
[17:59:50] ule: => {"a"=>2, "b"=>nil}
[17:59:56] ule: irb(main):010:0> a.has_key?('b')
[17:59:57] jhass: ule: Hash#has_key? or its alias Hash#key?
[17:59:58] ule: => true
[18:00:11] jhass: oh, not nil
[18:00:18] ule: yeah.. :/
[18:00:23] jhass: just a["b"].nil?
[18:00:31] ule: jhass: lemme try thanks
[18:00:47] jhass: that relies on Hash#default's default value of nil ;)
[18:01:21] ule: irb(main):014:0> a['b'].nil?
[18:01:22] ule: => true
[18:01:53] ule: how can I do inverse of nil?
[18:02:08] jhass: !a['b'].nil?
[18:02:15] ule: oh cool
[18:02:20] ule: thanks a LOT jhass
[18:02:20] jhass: or use unless instead of if
[18:02:24] jhass: or until instead of while
[18:02:29] jhass: or reject instead of select
[18:03:00] LoneHerm_: has joined #ruby
[18:03:14] Coldblackice: has joined #ruby
[18:03:42] ramfjord_: has joined #ruby
[18:04:13] LoneHerm_: has joined #ruby
[18:06:56] ule: I did my code here
[18:07:04] priodev: has joined #ruby
[18:07:21] LoneHerm_: has joined #ruby
[18:07:24] symm-: has joined #ruby
[18:07:24] ule: I'm pretty sure that you guys could do all that what I did in 7 lines, in just 1
[18:07:39] ule: but basically.. I'm looping in all Products
[18:07:41] VeryBewitching: has joined #ruby
[18:08:04] ule: and creating an array with all Product.brand (if the brand is not nil)
[18:08:24] CybrGhost: has joined #ruby
[18:08:26] `tim`: has joined #ruby
[18:08:26] aryaching: has joined #ruby
[18:08:29] ule: I think I can do this using Product.each(&foo
[18:08:33] ule: I'll read about that
[18:09:30] ule: in php we have array_map()
[18:09:43] ule: to apply a function to all elements of the array
[18:11:12] elomatreb: In Ruby there are Array#map and Array#map!, both take a block or a function symbol
[18:11:16] AngryBuzzy: has joined #ruby
[18:13:01] baweaver: &ri Enumerable#map
[18:13:02] `derpy: http://ruby-doc.org/core-2.3.1/Enumerable.html#method-i-map
[18:13:19] baweaver: read through the rest of Enumerable while you're there
[18:13:34] art-solopov: has joined #ruby
[18:13:46] djbkd: has joined #ruby
[18:14:42] Spami: has joined #ruby
[18:15:02] cyource: has joined #ruby
[18:15:04] A_Drone: has joined #ruby
[18:15:16] cyource: Hi, anyone know how ti fix error: Could not find gem 'github-pages (>= 0) x64-mingw32' in the gems available on this
[18:17:33] A_Drone: has joined #ruby
[18:18:24] hutch34: has joined #ruby
[18:18:34] yardenbar: has joined #ruby
[18:18:46] jenrzzz: has joined #ruby
[18:19:24] chrisarcand: cyource: Are you using Bundler? (did you 'bundle install' and get that message?)
[18:19:53] spider-mario: has joined #ruby
[18:19:54] spudowiar: has joined #ruby
[18:20:57] chrisarcand: If so, ensure you have 'source "http://rubygems.org"' at the top of your Gemfile
[18:21:51] tvw: has joined #ruby
[18:22:57] mattwashere: has joined #ruby
[18:23:03] Es0teric: has joined #ruby
[18:23:45] cyource: chrisarcand yep
[18:24:23] havenwood: cyource: What do you get for?: gem search --remote --exact github-pages
[18:24:40] tubuliferous: has joined #ruby
[18:25:14] yfeldblum: has joined #ruby
[18:25:24] cyource: ERROR: While executing gem ... (OptionParser::InvalidOption)
[18:25:25] cyource: invalid option: --exact
[18:25:53] havenwood: cyource: Uh, you might want to update to the latest RubyGems: gem update --system
[18:26:04] cdg: has joined #ruby
[18:26:13] RegulationD: has joined #ruby
[18:26:20] cyource: havenwood ok
[18:26:33] havenwood: cyource: Was saying "Uh" in a conversation out loud, didn't mean to type that. >.>
[18:26:48] cyource: ok, alright, lol
[18:27:52] mcls: has joined #ruby
[18:28:09] vuoto: has joined #ruby
[18:29:12] ghr: has joined #ruby
[18:30:13] triangles: has joined #ruby
[18:30:29] vuoto: has joined #ruby
[18:31:18] maikowblue: has joined #ruby
[18:31:23] nogic: has joined #ruby
[18:31:24] havenwood: cyource: Or trying installing with --remote, maybe check your GEM CONFIGURATION section for `:local => true`: gem env
[18:31:38] minimalism: has joined #ruby
[18:32:32] havenwood: https://github.com/rubygems/rubygems/blob/master/History.txt#L3-L9
[18:32:53] havenwood: gem update --system=2.6.6
[18:33:28] deviation: has joined #ruby
[18:33:44] vuoto: has joined #ruby
[18:33:44] mcqueenorama: has joined #ruby
[18:34:16] cyource: havenmod ok... ruby downloading...
[18:35:31] flashpoint9: has joined #ruby
[18:36:10] SilverKey: has joined #ruby
[18:37:02] hahuang61: has joined #ruby
[18:37:34] nankyokusei: has joined #ruby
[18:38:19] roshanavand: has joined #ruby
[18:39:51] wnd: has joined #ruby
[18:39:58] vuoto_: has joined #ruby
[18:40:32] futilegames: has joined #ruby
[18:40:49] vuoto: has joined #ruby
[18:42:21] cyource: havenwood, ah, ok, thanks
[18:43:02] djbkd_: has joined #ruby
[18:44:00] nofxx: has joined #ruby
[18:44:00] nofxx: has joined #ruby
[18:44:03] LoneHerm_: has joined #ruby
[18:45:34] VeryBewitching: I need to pass a File object that has a fixed filename into a method, but I can only create a Tempfile object, anyone have any insight on this?
[18:45:42] l4v2: has joined #ruby
[18:45:45] bkxd: has joined #ruby
[18:46:29] pawnbox: has joined #ruby
[18:46:41] cyource: havenwood in debian?
[18:47:14] VeryBewitching: I'm decoding a base64 string so I can pass the binary data to another class, but so far when I write to the temp file, the filename of the original file provided is not preserved in any way (aside from being a part of the Tempfile)
[18:48:27] havenwood: cyource: I think the Debian package wants to take care of RubyGems itself. Normally RubyGems is shipped with Ruby but can and should be independently updated like gems themselves.
[18:49:00] havenwood: cyource: In Debian's case I think they backport security fixes and you're stuck with they RubyGems they ship, but I'm unsure.
[18:49:11] toretore: VeryBewitching: elaborate on why you want to do this
[18:49:28] toretore: are you using something that expects an IO, but you have a string?
[18:49:31] havenwood: cyource: Maybe you don't need a more recent RubyGems. Sorry if I sent you on a yak shave.
[18:49:53] daumie: has joined #ruby
[18:50:34] VeryBewitching: toretore: I'm building a JSON API, and I'm going to receive a b64 encoded string. I need to decode this and pass it to Paperdragon; if I create a File object the filename is preserved and Paperdragon can deal with it, but it doesn't seem to pick up any filename at all from a Tempfile object
[18:51:30] havenwood: cyource: Try?: gem install --remote github-pages
[18:51:53] havenwood: cyource: If it doesn't work take a look at or gist: gem install --remote github-pages --debug
[18:52:07] cyource: havenwood, ok.
[18:52:08] Coldblackice: has joined #ruby
[18:52:19] cyource: sorry for late replies - irssi has no notifications
[18:52:23] tristanp: has joined #ruby
[18:53:17] ghr: has joined #ruby
[18:53:28] toretore: VeryBewitching: does it have to be a file?
[18:54:38] VeryBewitching: toretore: I believe so (though it might work with a URI, too)
[18:55:36] ramfjord: has joined #ruby
[18:55:38] VeryBewitching: toretore: Doing File.new('file.ext', flags) works because Paperdragon has a filename; Tempfile creates its own name based on your input, but for whatever reason Paperdragon doesn't carry that over.
[18:55:48] dkam: has joined #ruby
[18:56:04] VeryBewitching: (Which makes sense to me, it's a tmp file)
[18:56:41] execat: has joined #ruby
[18:57:58] tomchapin: has joined #ruby
[18:58:20] snath: has joined #ruby
[18:59:19] aryaching: has joined #ruby
[19:01:00] memorasus: has joined #ruby
[19:02:03] Tachikomas: has joined #ruby
[19:02:37] cpruitt: has joined #ruby
[19:02:46] bogusdisk: has joined #ruby
[19:05:28] ddffg: has joined #ruby
[19:05:40] stoopidmunkey: has joined #ruby
[19:05:49] l4v2: has left #ruby: ()
[19:06:19] l4v2: has joined #ruby
[19:09:27] vuoto: has joined #ruby
[19:10:18] ascarter: has joined #ruby
[19:11:33] leea: has joined #ruby
[19:14:15] Contigi: has joined #ruby
[19:15:13] ramfjord: has joined #ruby
[19:17:27] Coldblackice: has joined #ruby
[19:17:53] travisxcode: has joined #ruby
[19:19:35] nankyokusei: has joined #ruby
[19:19:50] tjbiddle: has joined #ruby
[19:19:50] djbkd: has joined #ruby
[19:20:34] macsteps: has joined #ruby
[19:21:01] jenrzzz: has joined #ruby
[19:21:08] snath: has joined #ruby
[19:21:39] zacstewart: has joined #ruby
[19:21:57] snath: has left #ruby: ()
[19:22:07] ltp: has joined #ruby
[19:22:23] yqt: has joined #ruby
[19:22:58] kiyote23: has joined #ruby
[19:23:23] karapetyan: has joined #ruby
[19:24:55] wrkrcoop: has joined #ruby
[19:24:59] tristanp: has joined #ruby
[19:25:16] wrkrcoop: i installed a new version of a gem, but when i run a command, it is still using the old version of the gem … anyone know why this would happen?
[19:25:16] nettoweb: has joined #ruby
[19:25:53] havenwood: wrkrcoop: Are you in a project with a Gemfile?
[19:25:59] wrkrcoop: havenwood: yes
[19:26:23] havenwood: wrkrcoop: Did you update the Gemfile?
[19:26:24] havenwood: wrkrcoop: Make sure to run: bundle update gem_name_here
[19:26:29] tvon: has joined #ruby
[19:26:49] isberg: has joined #ruby
[19:26:53] havenwood: (after changing the Gemfile)
[19:28:10] wrkrcoop: havenwood: hmm … ok
[19:28:15] wrkrcoop: but that gem doesnt exist in the file
[19:30:56] tvon: has joined #ruby
[19:32:33] havenwood: wrkrcoop: Sanity check `which gem_name` and `gem which gem_name` to see where the binary and library are?
[19:32:58] wrkrcoop: havenwood: what will that tell me?
[19:33:26] tvon: A shot in the dark, but I'm looking to reproduce a bug that has been fixed in ruby (to determine if a RHEL release of ruby has addressed the bug or not): https://bugs.ruby-lang.org/issues/10933 Any thoughts/suggestions?
[19:34:18] solars: has joined #ruby
[19:34:23] havenwood: wrkrcoop: Just to make sure you're using a gem corresponding to your current Ruby. That the gem binary path is in your $PATH and that the `gem` in your $PATH knows about that gem.
[19:34:38] tvon: I can't even figure out how to view the actual diff looking at redmine...
[19:35:23] havenwood: wrkrcoop: They should be in subdirectories of your: gem env gemdir
[19:36:53] havenwood: wrkrcoop: Is the gem in question in your Gemfile.lock? (What's the gem?)
[19:37:02] wrkrcoop: havenwood: maybe
[19:37:23] havenwood: wrkrcoop: Are you using RVM? (Matters because it installs rubygems-bundler by default.)
[19:37:24] wrkrcoop: it is in the lock file
[19:37:31] cyource: havenwood, had to build Ruby 2 myself via http://stackoverflow.com/questions/18490591/how-to-install-ruby-2-on-ubuntu-without-rvm
[19:37:33] havenwood: wrkrcoop: Ah, yeah that was my suspicion.
[19:37:34] wrkrcoop: and it is locked at the version
[19:41:48] execat: has joined #ruby
[19:44:11] skade: has joined #ruby
[19:45:38] djbkd: has joined #ruby
[19:47:23] Macaveli: has joined #ruby
[19:48:22] whathappens: has joined #ruby
[19:48:31] yfeldblum: has joined #ruby
[19:49:08] tomchapin: has joined #ruby
[19:49:19] ifsp: has joined #ruby
[19:49:41] mtkd: has joined #ruby
[19:50:42] Coldblackice: has joined #ruby
[19:51:01] LoneHerm_: has joined #ruby
[19:51:12] flashpoint9: has joined #ruby
[19:51:42] iWaffles: has joined #ruby
[19:53:38] yadobujo: has joined #ruby
[19:54:42] cdg: has joined #ruby
[19:55:21] karapetyan: has joined #ruby
[19:56:31] elifoster: has joined #ruby
[19:56:33] dkam: has joined #ruby
[19:56:55] aryaching: has joined #ruby
[19:58:58] pocketprotector: has joined #ruby
[20:00:24] AlexRussia: has joined #ruby
[20:01:56] Xeago_: has joined #ruby
[20:02:44] Guest61689: has joined #ruby
[20:03:00] tristanp: has joined #ruby
[20:03:54] Ponyo: has joined #ruby
[20:04:40] GinoManWorks: has joined #ruby
[20:04:49] hxegon: is a private method using send to call private methods considered bad?
[20:05:16] whathappens: has joined #ruby
[20:05:21] yadobujo: has joined #ruby
[20:06:22] macsteps: has joined #ruby
[20:06:23] failshell: has joined #ruby
[20:06:23] hahuang61: has joined #ruby
[20:06:28] nando293921: has joined #ruby
[20:06:48] jenrzzz: has joined #ruby
[20:07:04] adam12: hxegon: I would say no.
[20:07:09] adam12: hxegon: If I am understanding you right.
[20:08:55] e4xit: has joined #ruby
[20:11:02] Madplatypus: has joined #ruby
[20:12:55] karapetyan: has joined #ruby
[20:15:07] zeroDi: has joined #ruby
[20:16:10] hxegon: I didn't think so, but just double checking
[20:16:19] sneakers: has joined #ruby
[20:19:29] bwq: has joined #ruby
[20:20:07] isberg_: has joined #ruby
[20:21:01] shevy: I think .public_send was added in ... 1.9.x ?
[20:21:54] spudowiar: has joined #ruby
[20:23:18] hxegon: and? You can't use public_send to call private methods, right?
[20:23:31] yadobujo: has joined #ruby
[20:24:37] ekinmur: has joined #ruby
[20:25:42] freerobby: has joined #ruby
[20:25:53] wrkrcoop: has joined #ruby
[20:28:01] shevy: no idea, I never used it
[20:28:17] shevy: I was mostly just pointing out that it was added at some later point in time
[20:29:06] hutch34: has joined #ruby
[20:29:51] Guest: has joined #ruby
[20:29:55] tvon: I believe it was 1.9.something, fwiw.
[20:32:59] Guest76251: has joined #ruby
[20:33:15] blackgoat: has joined #ruby
[20:33:19] yadobujo: has joined #ruby
[20:33:30] aegis3121: has joined #ruby
[20:34:26] aredridel: has joined #ruby
[20:34:36] sumobob: has joined #ruby
[20:35:37] ChiefAlexander: has joined #ruby
[20:37:21] SilverKey: has joined #ruby
[20:37:32] futilegames: has left #ruby: ()
[20:38:43] karapetyan: has joined #ruby
[20:40:10] ramfjord: has joined #ruby
[20:40:58] futilegames: has joined #ruby
[20:41:13] futilegames: has left #ruby: ()
[20:41:17] jon28_: has joined #ruby
[20:41:31] JeanCarloMachado: has joined #ruby
[20:41:45] roshanavand: has joined #ruby
[20:41:56] yadobujo: has joined #ruby
[20:49:03] Vingador: has joined #ruby
[20:50:10] dminuoso: has joined #ruby
[20:51:47] LoneHerm_: has joined #ruby
[20:56:06] tAn: has joined #ruby
[20:56:20] omphe: has joined #ruby
[20:57:40] blackmesa: has joined #ruby
[20:59:23] leea: has joined #ruby
[20:59:58] yadobujo: has joined #ruby
[21:00:11] Polysics: has joined #ruby
[21:00:12] tristanp: has joined #ruby
[21:01:51] edwinvdgraaf: has joined #ruby
[21:02:49] ghr: has joined #ruby
[21:03:13] whathappens: has joined #ruby
[21:04:12] Aria22: has joined #ruby
[21:04:20] tomchapin: has joined #ruby
[21:09:44] pawnbox: has joined #ruby
[21:09:51] Renich: has joined #ruby
[21:11:07] ledestin: has joined #ruby
[21:12:34] Xiti: has joined #ruby
[21:14:14] workmad3: has joined #ruby
[21:14:18] ghr: has joined #ruby
[21:15:23] ma489: has joined #ruby
[21:15:57] replay: has joined #ruby
[21:16:01] chip_: has joined #ruby
[21:16:24] ma489: has left #ruby: ()
[21:17:49] nando293921: has joined #ruby
[21:18:02] yadobujo: has joined #ruby
[21:18:48] daumie: has joined #ruby
[21:19:40] GinoMan2440: has joined #ruby
[21:20:03] shadeslayer: has joined #ruby
[21:20:29] nankyokusei: has joined #ruby
[21:22:10] dkam: has joined #ruby
[21:22:12] tvon: has joined #ruby
[21:23:06] SirFunk: has joined #ruby
[21:24:52] karapetyan: has joined #ruby
[21:25:48] daumie: has joined #ruby
[21:25:51] ghr: has joined #ruby
[21:30:18] wrkrcoop: has joined #ruby
[21:30:19] weaksauce: has joined #ruby
[21:31:00] execat: has joined #ruby
[21:31:06] aryaching: has joined #ruby
[21:31:11] snowy: has joined #ruby
[21:31:24] yadobujo: has joined #ruby
[21:31:32] daumie: has joined #ruby
[21:35:44] snowy: has joined #ruby
[21:37:55] ghr: has joined #ruby
[21:38:13] hutch34: has joined #ruby
[21:39:12] karapetyan: has joined #ruby
[21:41:57] SCHAAP137: has joined #ruby
[21:45:39] ericsupreme: has joined #ruby
[21:48:42] ICantCook: has joined #ruby
[21:49:20] ghr: has joined #ruby
[21:49:50] crystal77: has joined #ruby
[21:51:01] A_Drone: has joined #ruby
[21:52:08] skade: has joined #ruby
[21:52:18] dminuoso: has joined #ruby
[21:52:21] spudowiar: has joined #ruby
[21:52:46] LoneHermit: has joined #ruby
[21:55:14] daumie254: has joined #ruby
[21:55:18] isberg: has joined #ruby
[21:55:25] burgestrand: has joined #ruby
[21:56:24] Ebok: has joined #ruby
[21:57:14] burgestrand: I recall there's some gem in ruby for nicer management of spawning subprocesses, piping between them, etc, outside of stdlib. Anybody know what it might be?
[21:57:55] colegatron_origi: has joined #ruby
[21:58:18] skade: has joined #ruby
[21:59:21] ghr: has joined #ruby
[21:59:42] blackmesa: has joined #ruby
[22:00:06] xlegoman: has joined #ruby
[22:01:00] Mimorial: has joined #ruby
[22:01:28] Talltree: has joined #ruby
[22:02:26] wrkrcoop: has joined #ruby
[22:05:28] mattwashere: has joined #ruby
[22:06:37] Xeago_: has joined #ruby
[22:09:01] burgestrand: has joined #ruby
[22:10:22] nankyokusei: has joined #ruby
[22:10:22] jenrzzz: has joined #ruby
[22:10:39] ascarter: has joined #ruby
[22:11:28] tAn: has joined #ruby
[22:11:51] ghr: has joined #ruby
[22:12:00] blackmesa: has joined #ruby
[22:12:18] downdonedown: has joined #ruby
[22:12:33] toretore: has joined #ruby
[22:14:21] SCHAAP137: has joined #ruby
[22:17:32] flashpoint9: has joined #ruby
[22:20:46] yadobujo: has joined #ruby
[22:21:03] SilverKey: has joined #ruby
[22:21:52] ghr: has joined #ruby
[22:24:31] karapetyan: has joined #ruby
[22:25:07] Guest43: has joined #ruby
[22:25:34] Guest43: has joined #ruby
[22:28:48] tAn: has joined #ruby
[22:29:16] flashpoint9: has joined #ruby
[22:29:58] zacts: has joined #ruby
[22:30:31] skade: has joined #ruby
[22:33:57] zenlot6: has joined #ruby
[22:33:57] roamingdog: has joined #ruby
[22:36:53] ghr: has joined #ruby
[22:37:37] execat: has joined #ruby
[22:38:46] shinnya: has joined #ruby
[22:42:32] banisterfiend: has joined #ruby
[22:43:35] tomchapin: has joined #ruby
[22:44:32] AndrewIsHere: has joined #ruby
[22:46:07] daffy_duck: has joined #ruby
[22:46:53] ghr: has joined #ruby
[22:47:25] alex88: has joined #ruby
[22:48:41] aryaching: has joined #ruby
[22:51:06] mjuszczak: has joined #ruby
[22:52:20] mtkd: has joined #ruby
[22:53:03] dminuoso: has joined #ruby
[22:54:42] LoneHermit: has joined #ruby
[22:55:00] travisxcode: has joined #ruby
[22:55:19] macsteps: has joined #ruby
[22:56:30] zapata: has joined #ruby
[22:56:37] moeabdol: has joined #ruby
[22:57:22] tedwards: has joined #ruby
[22:58:57] ghr: has joined #ruby
[22:59:01] execat: has joined #ruby
[23:04:04] hahuang61: has joined #ruby
[23:04:35] sucks: has joined #ruby
[23:05:40] johnmilton: has joined #ruby
[23:06:02] User458764: has joined #ruby
[23:06:05] leea: has joined #ruby
[23:06:20] mattwashere: has joined #ruby
[23:07:49] hahuang65: has joined #ruby
[23:08:54] ghr: has joined #ruby
[23:10:08] dkam: has joined #ruby
[23:11:33] AndroidLoverInSF: has joined #ruby
[23:12:13] CrossFit_Jesus: has joined #ruby
[23:13:05] Mimorial: has joined #ruby
[23:17:05] Xeago_: has joined #ruby
[23:18:25] ghr: has joined #ruby
[23:19:17] skade: has joined #ruby
[23:20:03] flashpoint9: has joined #ruby
[23:21:40] dkam: has joined #ruby
[23:22:27] johnmilton: has joined #ruby
[23:23:47] craigp: has joined #ruby
[23:31:34] roamingdog: has joined #ruby
[23:32:22] ekinmur: has joined #ruby
[23:34:56] ghr: has joined #ruby
[23:37:19] downdonedown: has joined #ruby
[23:37:59] travisxcode: has joined #ruby
[23:39:31] isberg: has joined #ruby
[23:40:55] roamingd_: has joined #ruby
[23:41:50] mistermocha: has joined #ruby
[23:42:42] JeanCarloMachado: has joined #ruby
[23:44:26] ghr: has joined #ruby
[23:50:13] koooge: has joined #ruby
[23:53:44] SilverKey: has joined #ruby
[23:54:04] dminuoso: has joined #ruby
[23:54:45] mattwashere: has joined #ruby
[23:56:27] ghr: has joined #ruby
[23:58:34] zacstewart: has joined #ruby