« Back to channel list

#ruby - 29 June 2016

« Back 1 day Forward 1 day »
[00:03:08] croberts: has joined #ruby
[00:04:02] blackmesa: has joined #ruby
[00:06:33] solocshaw: has joined #ruby
[00:08:21] jmignault: has joined #ruby
[00:10:36] ekinmur: has joined #ruby
[00:11:24] jenrzzz: has joined #ruby
[00:11:24] Hobogrammer: has joined #ruby
[00:12:18] dannyh: has joined #ruby
[00:12:47] kobain: has joined #ruby
[00:14:14] korzybski: has joined #ruby
[00:17:10] djbkd: has joined #ruby
[00:18:02] mfb2_: has joined #ruby
[00:20:29] solocshaw1: has joined #ruby
[00:20:59] Vingador: has joined #ruby
[00:21:11] macsteps: has joined #ruby
[00:21:49] tAn: has joined #ruby
[00:23:05] mattwashere: has joined #ruby
[00:23:17] mfb2: has joined #ruby
[00:23:23] dannyh: has joined #ruby
[00:24:22] ledestin: has joined #ruby
[00:24:38] B1n4r10: has joined #ruby
[00:25:04] electrostat: has joined #ruby
[00:26:22] LoneHerm_: has joined #ruby
[00:29:10] jenslarsson: has joined #ruby
[00:30:08] agentmeerkat: has joined #ruby
[00:31:37] ruby_nuby: has joined #ruby
[00:31:42] ruby_nuby: I have question who can help?
[00:32:32] ruby_nuby: i am trying to post multipart http request cucumber via cucumber
[00:32:47] dhruvasagar: has joined #ruby
[00:33:16] ruby_nuby: How can i post multipart form including metadata via cucumber?
[00:35:12] Radar: Ruby_Nuby: what have you tried?
[00:39:06] nettoweb: has joined #ruby
[00:39:22] macsteps: has joined #ruby
[00:39:55] ruby_nuby: @Radar i've tried a bunch of things.. im currently using cucumber-api gem along with json_spec and RestClient..
[00:40:01] dc4: has joined #ruby
[00:40:35] ruby_nuby: but i cant get the file to upload, let alone with the basic auth header and params i need to send as metadata
[00:41:01] electrostat: has joined #ruby
[00:41:07] ruby_nuby: I need to send a txt file as well as json metadata
[00:41:27] ruby_nuby: There is no UI
[00:41:48] Radar: Ruby_Nuby: show us some code please
[00:42:39] evansbee: has joined #ruby
[00:43:10] ruby_nuby: here is 50th attempt code: http://screencast.com/t/Nh7uNSY1h
[00:43:10] aibot: has joined #ruby
[00:44:10] ruby_nuby: this code does nothing currently.. what am I doing wrong? and how can i add auth header and metadata?
[00:45:26] ruby_nuby: any help would be appreciated
[00:45:29] mattwashere: has joined #ruby
[00:46:59] ruby_nuby: I need to make a POST with auth header, that uploads file and sends JSON metaData
[00:48:32] Radar: Can you run that code outside of Cucumber and see what ti does?
[00:50:29] hahuang61: has joined #ruby
[00:51:34] ruby_nuby: 400 Bad Request (RestClient::BadRequest) ...gems/ruby-2.0.0-p648/gems/rest-client-1.8.0/lib/restclient/abstract_response.rb:74:in `return!'
[00:52:35] Radar: Ruby_Nuby: Do you have access to the server to see what it's doing?
[00:53:36] dc4: has joined #ruby
[00:54:57] diegoviola: has joined #ruby
[00:55:52] dannyh: has joined #ruby
[00:56:46] banisterfiend: has joined #ruby
[00:56:46] banisterfiend: has joined #ruby
[00:58:24] Radar: Ruby_Nuby: Still there?
[00:58:40] whathappens: has joined #ruby
[00:59:00] banisterfiend: has joined #ruby
[00:59:31] hastur: has joined #ruby
[00:59:43] banisterfiend: has joined #ruby
[01:00:00] hastur: how would i structure a program that uses both eventmachine / websockets and rufus-scheduler?
[01:00:09] arescorpio: has joined #ruby
[01:00:17] arnonhongklay: has joined #ruby
[01:00:28] hastur: it seems i can't have both in one script from the command line, because each one tries to take the entire thread
[01:01:10] jhack: has joined #ruby
[01:02:39] tao_: has joined #ruby
[01:02:47] mattwashere: has joined #ruby
[01:03:52] skade: has joined #ruby
[01:04:16] jenrzzz: has joined #ruby
[01:06:12] LoneHerm_: has joined #ruby
[01:06:27] pilne: has joined #ruby
[01:07:43] neo_: has joined #ruby
[01:09:34] hastur: i guess it's just threading?
[01:10:16] MrBusiness: has joined #ruby
[01:10:24] Ropeney: has joined #ruby
[01:12:43] B1n4r10: has joined #ruby
[01:12:55] enterprisey: has joined #ruby
[01:16:03] sanjayu: has joined #ruby
[01:17:53] arooni_: has joined #ruby
[01:17:57] User458764: has joined #ruby
[01:18:16] hutch34: has joined #ruby
[01:18:28] diegoviola: has joined #ruby
[01:22:20] jmignault: has joined #ruby
[01:24:19] pilne: has joined #ruby
[01:24:57] jaguarmagenta: has joined #ruby
[01:26:12] howdoi: has joined #ruby
[01:27:03] crystal77: has joined #ruby
[01:28:17] crystal77: has joined #ruby
[01:29:12] skweek: has joined #ruby
[01:30:21] ulluh: has joined #ruby
[01:32:08] CloCkWeRX: has joined #ruby
[01:34:20] evansbee: has joined #ruby
[01:36:32] isberg: Is there a way to check if a value is a boolean?
[01:36:43] isberg: Except for checking for true/false
[01:36:54] isberg: I.e is_a?(Bool)
[01:37:23] mistermocha: has joined #ruby
[01:37:48] eam: all objects have a boolean value. You can check if something is either TrueClass or FalseClass
[01:37:49] nankyokusei: has joined #ruby
[01:38:09] isberg: So not both?
[01:38:46] eam: it can't be both, but you could see if it's either one
[01:39:13] isberg: They belong to the same group, boolean
[01:39:20] isberg: that's what I'm trying to check
[01:39:22] eam: what's a group?
[01:39:46] isberg: true/false is a boolean
[01:39:53] isberg: boolean is a group
[01:40:05] eam: all objects are a boolean
[01:40:16] eam: "hello" is a boolean value, and it's true
[01:40:59] isberg: In Ruby, yes. But that's no very helpful if I'm trying to convert to something else
[01:41:34] ekinmur: has joined #ruby
[01:42:15] eam: it sounds like you want to find out if something is a TrueClass or FalseClass
[01:42:36] isberg: Yes. If they belong to the group of booleans
[01:43:19] arooni: has joined #ruby
[01:44:31] BiHi: has joined #ruby
[01:48:47] rbennacer: has joined #ruby
[01:49:32] rbennacer: has joined #ruby
[01:50:37] whathappens: has joined #ruby
[01:51:02] korzybski: has joined #ruby
[01:51:52] Ariadeno: has joined #ruby
[01:53:25] nofxx: isberg, agree that a is_a?(Boolean) would be nice. Anything better than is_a?(TrueClass) || is_a?(FalseClass) ?
[01:53:56] isberg: Yeah, exactly
[01:54:06] A5101: has joined #ruby
[01:54:29] nofxx: isberg, but there's always `nil` to consider too. As why says: only two wear the black cape in ruby: false and nil
[01:55:16] jmignault: has joined #ruby
[01:56:27] whathappens: has joined #ruby
[01:57:02] B1n4r10: has joined #ruby
[01:57:25] nofxx: problem is the politics with nil being considered boolean... tri-state booleans
[01:57:55] Rodya_: has joined #ruby
[01:58:32] sucks: has joined #ruby
[01:59:42] gregf: has joined #ruby
[02:05:28] DoomDood: has joined #ruby
[02:06:00] ruby-nuby: has joined #ruby
[02:06:37] ruby-nuby: still looking for help with multipart form upload: need to send txt with json metadata
[02:07:02] ruby-nuby: *txt file with accompanying JSON metadata
[02:15:17] ruby-nuby: any takers?
[02:15:35] ruby-nuby: or can you help me by showing me where to look?
[02:15:45] ruby-nuby: i can really find anything on google
[02:17:41] adam12: ruby-nuby: What have you tried?
[02:17:50] adam12: ruby-nuby: Are you trying to interface to a specific service?
[02:17:53] agent_white: has joined #ruby
[02:19:27] agent_white: Evenin' folks
[02:22:23] Parker0: has joined #ruby
[02:24:12] okdas: has joined #ruby
[02:24:12] okdas: has joined #ruby
[02:24:59] freerobby: has joined #ruby
[02:26:45] Rodya_: has joined #ruby
[02:28:31] chouhoulis: has joined #ruby
[02:33:22] claw: has joined #ruby
[02:35:14] dhruvasagar: has joined #ruby
[02:38:27] arthurl: has joined #ruby
[02:38:57] nertzy: has joined #ruby
[02:39:52] korzybski: has joined #ruby
[02:40:19] nadir: has joined #ruby
[02:42:21] CloCkWeRX: has joined #ruby
[02:46:02] arooni-mobile: has joined #ruby
[02:46:29] arooni-mobile: has left #ruby: ()
[02:47:59] shakes: has joined #ruby
[02:49:53] prefix: has joined #ruby
[02:51:55] tAn: has joined #ruby
[02:51:57] BiHi: has joined #ruby
[03:04:33] mozzarella: has joined #ruby
[03:04:45] ekinmur: has joined #ruby
[03:07:53] Regulati_: has joined #ruby
[03:11:06] Parker0: has joined #ruby
[03:13:34] bfrizzle: has joined #ruby
[03:13:52] yokel: has joined #ruby
[03:14:02] B1n4r10: has joined #ruby
[03:16:44] sucks: has joined #ruby
[03:16:45] netuoso: has joined #ruby
[03:18:13] dc4: has joined #ruby
[03:21:03] electrostat: has joined #ruby
[03:21:18] k3rn31: has joined #ruby
[03:22:52] braincras: has joined #ruby
[03:24:54] gix: has joined #ruby
[03:28:45] mozzarella: has joined #ruby
[03:34:20] yokel: has joined #ruby
[03:36:40] dhruvasagar: has joined #ruby
[03:37:42] tristanp_: has joined #ruby
[03:38:59] nankyokusei: has joined #ruby
[03:39:10] jaguarmagenta: has joined #ruby
[03:39:55] wldcordeiro: has joined #ruby
[03:43:14] dhruvasagar: has joined #ruby
[03:46:13] LoneHerm_: has joined #ruby
[03:48:02] crankharder: has joined #ruby
[03:48:12] enterprisey: has joined #ruby
[03:53:27] hk238: has joined #ruby
[03:55:05] mistermocha: has joined #ruby
[03:55:05] tmtwd: has joined #ruby
[03:55:55] mattwashere: has joined #ruby
[03:59:13] mattwashere: has joined #ruby
[03:59:17] banisterfiend: has joined #ruby
[04:00:38] PaulCapestany: has joined #ruby
[04:02:54] duncannz: has joined #ruby
[04:02:59] ulluh: has joined #ruby
[04:02:59] rkazak: has joined #ruby
[04:03:37] duncannz: has joined #ruby
[04:03:53] workmad3: has joined #ruby
[04:04:38] duncannz: has joined #ruby
[04:09:37] agent_white: has joined #ruby
[04:10:02] djbkd: has joined #ruby
[04:11:19] kareeoleez: has joined #ruby
[04:12:32] neo_: has joined #ruby
[04:12:43] ThatsNotJack: has joined #ruby
[04:17:12] roamingdog: has joined #ruby
[04:17:14] nando293921: has joined #ruby
[04:23:22] raeoks: has joined #ruby
[04:23:28] glrrf: has joined #ruby
[04:24:52] emiltin: has joined #ruby
[04:25:01] bb010g: has joined #ruby
[04:25:05] glrrf: has left #ruby: ()
[04:25:13] Radar: ruby-nuby: protip: to get help with your problem, you're going to need to reply quickly to the people who are trying to help you.
[04:33:01] dsea: has joined #ruby
[04:33:10] Devalo: has joined #ruby
[04:34:09] sanjayu: has joined #ruby
[04:34:46] dsea: has joined #ruby
[04:43:43] korzybski: has joined #ruby
[04:44:05] shevy: I have a question for the method:
[04:44:20] shevy: x = [1,2,3,4,5] # => [1, 2, 3, 4, 5]; x[1,2] = 8; x # => [1, 8, 4, 5]
[04:44:44] shevy: how can I define a method on a custom class, say class Foo; end, that allows me to also do something like this? the: "x[1,2] = 8" part
[04:46:59] codecop: has joined #ruby
[04:48:43] tao_: has joined #ruby
[04:50:23] ohcibi: has joined #ruby
[04:55:58] mistermocha: has joined #ruby
[04:55:59] kentnl: has joined #ruby
[04:55:59] kentnl: has joined #ruby
[04:56:30] jmignault: has joined #ruby
[04:56:48] k3rn31: has joined #ruby
[04:57:02] kareeoleez: has joined #ruby
[05:01:22] terminalrecluse: has joined #ruby
[05:04:09] mattwashere: has joined #ruby
[05:05:43] arnonhongklay: has joined #ruby
[05:16:30] dc4: has joined #ruby
[05:21:29] shevy: ah seems to be like any other method that accepts arguments, just inside the () ... "def []=(a,b,c)"
[05:21:37] hutch34: has joined #ruby
[05:22:27] LoneHerm_: has joined #ruby
[05:22:30] gusrub: has joined #ruby
[05:25:12] sucks: has joined #ruby
[05:29:46] sucks: has joined #ruby
[05:30:59] elifoster: has joined #ruby
[05:33:15] pawnbox: has joined #ruby
[05:33:47] pawnbox: has joined #ruby
[05:34:20] last_staff: has joined #ruby
[05:36:15] tmtwd: has joined #ruby
[05:37:47] tubuliferous: has joined #ruby
[05:38:09] the_drow: has joined #ruby
[05:39:33] nankyokusei: has joined #ruby
[05:39:56] TomyLobo: has joined #ruby
[05:40:16] mistermocha: has joined #ruby
[05:42:12] mistermocha: has joined #ruby
[05:43:09] Wildfyr: has joined #ruby
[05:45:42] xall: has joined #ruby
[05:45:46] Hyuk: has joined #ruby
[05:53:01] djbkd: has joined #ruby
[05:57:24] Dimik: has joined #ruby
[05:58:04] kareeoleez: has joined #ruby
[05:58:16] arnonhongklay: has joined #ruby
[05:58:27] anisha: has joined #ruby
[06:01:09] arnonhongklay: has joined #ruby
[06:02:25] pandaant: has joined #ruby
[06:03:25] Dimik: is there a vim gem for pry or irb
[06:03:59] No: has joined #ruby
[06:08:18] edwardly: has joined #ruby
[06:08:18] edwardly: has joined #ruby
[06:09:01] AnoHito: has joined #ruby
[06:09:01] dsea11: has joined #ruby
[06:10:37] pawnbox: has joined #ruby
[06:12:36] yfeldblum: has joined #ruby
[06:14:46] xall: has joined #ruby
[06:14:53] banjara: has joined #ruby
[06:15:13] Hyuk: has joined #ruby
[06:16:04] ur5us: has joined #ruby
[06:21:35] solars: has joined #ruby
[06:29:54] Es0teric: has joined #ruby
[06:30:17] harfangk: has joined #ruby
[06:31:37] Blue_Ice_: has joined #ruby
[06:31:56] nevynxxx: has joined #ruby
[06:33:01] mieko: has joined #ruby
[06:33:03] conta: has joined #ruby
[06:33:18] firstdayonthejob: has joined #ruby
[06:35:13] ciampix: has joined #ruby
[06:39:49] dionysus69: has joined #ruby
[06:40:09] dhruvasagar: has joined #ruby
[06:41:42] craigp_: has joined #ruby
[06:41:55] aufi: has joined #ruby
[06:43:02] andikr: has joined #ruby
[06:45:42] korzybski: has joined #ruby
[06:48:59] the_drow: has joined #ruby
[06:50:32] DoubleMalt: has joined #ruby
[06:51:44] pawnbox: has joined #ruby
[06:52:24] tAn: has joined #ruby
[06:54:38] sucks: has joined #ruby
[06:55:57] ldrancer: has joined #ruby
[06:56:04] l4v2: has joined #ruby
[06:56:10] ldrancer: has left #ruby: ()
[06:57:36] dhruvasagar: shevy: you could just extend array I suppose
[06:58:05] tmtwd: has joined #ruby
[06:58:08] jaruga___: has joined #ruby
[06:59:26] dminuoso: has joined #ruby
[07:00:35] neo_: has joined #ruby
[07:01:02] dc4: has joined #ruby
[07:02:18] d0nn1e: has joined #ruby
[07:03:07] skade: has joined #ruby
[07:03:52] terminalrecluse: has joined #ruby
[07:07:29] pawnbox: has joined #ruby
[07:07:41] aganov: has joined #ruby
[07:09:36] User458764: has joined #ruby
[07:11:37] mark_661: has joined #ruby
[07:17:43] blaxter: has joined #ruby
[07:19:02] Synthead: has joined #ruby
[07:19:50] alexherbo2: has joined #ruby
[07:20:42] terlar: has joined #ruby
[07:21:23] exadeci: has joined #ruby
[07:21:26] harfangk: has joined #ruby
[07:21:32] Synthead: has joined #ruby
[07:23:16] the_drow: has joined #ruby
[07:25:57] bweston92: has joined #ruby
[07:28:00] ejnahc: has joined #ruby
[07:29:11] tAn: has joined #ruby
[07:31:10] xall: has joined #ruby
[07:31:52] ruby-lang821: has joined #ruby
[07:32:11] edwinvdgraaf: has joined #ruby
[07:34:08] isberg: has joined #ruby
[07:34:32] polll: has joined #ruby
[07:35:52] agit0: has joined #ruby
[07:37:23] pawnbox: has joined #ruby
[07:37:46] maloik: has joined #ruby
[07:38:18] Ishido: has joined #ruby
[07:40:27] nankyokusei: has joined #ruby
[07:43:48] ngw: has joined #ruby
[07:44:10] neo_: has joined #ruby
[07:45:34] last_staff: has joined #ruby
[07:45:40] ur5us: has joined #ruby
[07:46:11] Couch: has joined #ruby
[07:48:16] lenwood: has joined #ruby
[07:48:38] multi_io: has joined #ruby
[07:50:37] triangles: has joined #ruby
[07:54:16] tomphp: has joined #ruby
[07:55:38] solars: has joined #ruby
[07:57:11] triangles: Is there a special way you're supposed to require gems brought in from Github, as opposed to rubygems?
[07:57:26] triangles: I'm trying to use this https://github.com/sycobuny/sinatra-spreadsheet but can't figure out how to require it once installed
[07:57:29] evansbee: has joined #ruby
[07:58:34] mattwashere: has joined #ruby
[08:00:44] yokel: has joined #ruby
[08:00:56] dminuoso: triangles: The README actually shows how its required. :-)
[08:01:47] ljarvis: triangles: are you using bundler?
[08:01:50] dminuoso: triangles: And you are not exactly specifying "github" as a source, but rather you can (if you want) specify "git" for a specific gem.
[08:02:06] triangles: dminuoso: as 'sinatra/spreadsheet'? I've tried that, but get an error on that line
[08:02:34] triangles: I have bundler required, and used bundle install to install the gems, if that's what using bundler means
[08:02:51] febuiles: has joined #ruby
[08:02:55] ljarvis: then you don't need to require it explicitly, if you're loading your bundle in your code
[08:03:14] ljarvis: e.g. with Bundler.require
[08:03:33] dc4: has joined #ruby
[08:03:44] yeticry: has joined #ruby
[08:04:05] dminuoso: triangles: If you use bundle, then you must use bundle.
[08:04:13] dminuoso: (Let's see if that makes sense to you)
[08:04:38] ulluh: has joined #ruby
[08:08:34] nickjj: has joined #ruby
[08:11:46] Silthias: has joined #ruby
[08:12:03] edwinvdgraaf: has joined #ruby
[08:13:42] Jerkychew: has joined #ruby
[08:14:09] the_drow: has joined #ruby
[08:15:37] n1x-nz: has joined #ruby
[08:16:40] Wildfyr: has joined #ruby
[08:16:40] lxsameer: has joined #ruby
[08:18:12] tomphp: has joined #ruby
[08:18:43] Emmanuel_Chanel: has joined #ruby
[08:19:19] ych: has joined #ruby
[08:21:49] ramfjord: has joined #ruby
[08:22:00] joonty: has joined #ruby
[08:22:38] ponga: has joined #ruby
[08:24:41] burgestrand: has joined #ruby
[08:26:12] weckl: has joined #ruby
[08:26:16] triangles: I'm scouring the bundler.io docs and trying every combination of bundler/setup, bundler, Bundler.require etc I can think of and still can't get the name to resolve
[08:26:52] weckl: has joined #ruby
[08:27:28] weckl: has joined #ruby
[08:28:05] weckl: has joined #ruby
[08:28:40] weckl: has joined #ruby
[08:29:19] weckl: has joined #ruby
[08:29:52] weckl: has joined #ruby
[08:30:27] weckl: has joined #ruby
[08:31:07] troulouliou_div2: has joined #ruby
[08:31:09] dminuoso: triangles: How about you gist some code that shows what you are trying to do, what you expect to happen, and what error message you get.
[08:31:31] weckl: has joined #ruby
[08:32:03] mikecmpbll: has joined #ruby
[08:32:05] weckl: has joined #ruby
[08:36:31] harfangk: has joined #ruby
[08:36:42] triangles: dminuoso: good idea, https://gist.github.com/jennygreene88/3b24979d6234215f01b54e8e262a136a
[08:37:30] dhruvasagar: has joined #ruby
[08:37:59] tomphp: has joined #ruby
[08:39:50] tao_: has joined #ruby
[08:39:56] lenwood: has joined #ruby
[08:42:00] burgestrand: has joined #ruby
[08:42:18] snowy: has joined #ruby
[08:46:03] yfeldblum: has joined #ruby
[08:46:53] tomphp: has joined #ruby
[08:47:09] jenrzzz: has joined #ruby
[08:48:11] dminuoso: triangles: Let's first clear up some things.
[08:48:19] dminuoso: triangles: Either you use bundler to require things, or you dont.
[08:49:42] dminuoso: Let's just assume you want to use bundler, all you need to do is require 'bundler/setup' after rubygems and then run Bundler.require
[08:50:07] dminuoso: triangles: However! You need to tell bundler which group to require - anything that is outside of a named group is implicitly placed into the :default group.
[08:50:35] dminuoso: triangles: So the correct way would be to use Bundler.require(:default) (unless you place some gems into groups, then you need to specify that group as well)
[08:50:46] dminuoso: And then you do not need to require it again.
[08:52:40] ayonkhan: has joined #ruby
[08:53:28] edwinvdgraaf: has joined #ruby
[08:55:16] skade: has joined #ruby
[08:55:18] B1n4r10: has joined #ruby
[09:00:34] emiltin: has joined #ruby
[09:02:55] marr: has joined #ruby
[09:04:00] aryaching: has joined #ruby
[09:04:50] beast: has joined #ruby
[09:05:34] triangles: So I just require rubygems, bundler/setup, then call Bundler.require(:default)?
[09:07:13] mrmortondk: has joined #ruby
[09:08:16] burgestrand: has joined #ruby
[09:09:14] lenwood: has joined #ruby
[09:09:58] burgestrand: has joined #ruby
[09:11:28] consti: has joined #ruby
[09:12:07] antgel: has joined #ruby
[09:12:36] Oclair: has joined #ruby
[09:14:35] dionysus69: has joined #ruby
[09:18:11] Wildfyr: as a ruby begginer what is the best way to install gems
[09:18:36] Zarthus: Wildfyr: What is your usecase? Are you starting a new project, or installing one?
[09:18:58] Wildfyr: Zarthus: installing one
[09:19:49] Zarthus: generally `bundle install` is sufficient, if there is no 'vendor' folder in the root you might choose to install it in your own prefix (like your home) if you really want to.
[09:20:43] Zarthus: like with any program, `bundle --help' is often useful to read.
[09:20:46] patrick_star: has joined #ruby
[09:20:55] fclausen: has joined #ruby
[09:21:05] Zarthus: in your case, you want `bundle --help install'
[09:22:12] Wildfyr: Zarthus: no bundle here
[09:22:21] Zarthus: `gem install bundler' first
[09:22:22] yude: has joined #ruby
[09:22:54] pawnbox: has joined #ruby
[09:23:15] sdothum: has joined #ruby
[09:24:12] futilegames: has joined #ruby
[09:24:35] naftilos76: has joined #ruby
[09:24:45] jenrzzz: has joined #ruby
[09:24:45] jenrzzz: has joined #ruby
[09:24:50] mozzarella: has joined #ruby
[09:25:33] futilegames: has joined #ruby
[09:25:40] Wildfyr: are there any significant advantages of using bundler over gem
[09:27:36] Zarthus: the gem command helps install gems and manage them, bundler reads project dependencies and loops over them, passing them to gem (in a very brief way of saying it)
[09:28:08] Zarthus: bundler also helps your ruby path so you can always include your required gems
[09:28:16] Bish: has joined #ruby
[09:28:42] harfangk: has joined #ruby
[09:29:32] araujo: has joined #ruby
[09:29:33] araujo: has joined #ruby
[09:29:42] fclausen_: has joined #ruby
[09:30:11] Zarthus: if you are familiar with other languages, the bundler is a bit like the build file, where gems is just the tool the buildfile uses to install dependencies with
[09:30:28] jmignault: has joined #ruby
[09:31:07] araujo: has joined #ruby
[09:31:47] jenrzzz: has joined #ruby
[09:33:35] araujo: has joined #ruby
[09:33:52] toretore: has joined #ruby
[09:34:29] chip_: has joined #ruby
[09:34:33] Emmanuel_Chanel_: has joined #ruby
[09:36:26] terminalrecluse: has joined #ruby
[09:36:58] hahuang65: has joined #ruby
[09:37:56] jenrzzz: has joined #ruby
[09:37:56] jenrzzz: has joined #ruby
[09:38:38] Gasher: has joined #ruby
[09:39:55] jaguarmagenta: has joined #ruby
[09:41:16] nankyokusei: has joined #ruby
[09:44:18] Emmanuel_Chanel: has joined #ruby
[09:44:47] Emmanuel_Chanel: has joined #ruby
[09:45:04] sanjayu: has joined #ruby
[09:46:31] No: has joined #ruby
[09:49:35] harfangk: has joined #ruby
[09:55:29] dhruvasagar: has joined #ruby
[09:55:43] Oclair: has joined #ruby
[09:55:58] User458764: has joined #ruby
[09:56:06] joonty: has joined #ruby
[09:58:24] evansbee: has joined #ruby
[09:59:26] mattwashere: has joined #ruby
[10:01:38] charliesome: has joined #ruby
[10:03:01] TheWhip: has joined #ruby
[10:08:35] tvw: has joined #ruby
[10:11:04] User458764: has joined #ruby
[10:11:40] tAn: has joined #ruby
[10:14:25] Tempesta: has joined #ruby
[10:19:27] jenrzzz: has joined #ruby
[10:19:27] jenrzzz: has joined #ruby
[10:20:42] rickmasta: has joined #ruby
[10:22:12] DoubleMalt: has joined #ruby
[10:23:09] ABK: has joined #ruby
[10:23:51] febuiles: has left #ruby: ()
[10:24:00] harfangk: has joined #ruby
[10:29:25] emiltin: has joined #ruby
[10:30:38] binaryplease1: has joined #ruby
[10:32:04] postmodern: has joined #ruby
[10:37:00] jmignault: has joined #ruby
[10:40:08] allcentury: has joined #ruby
[10:42:11] tao_: has joined #ruby
[10:44:06] B1n4r10: has joined #ruby
[10:46:17] ramfjord: has joined #ruby
[10:48:15] rodfersou: has joined #ruby
[10:48:21] harfangk: has joined #ruby
[10:50:16] dc4: has joined #ruby
[10:53:58] GodFather: has joined #ruby
[10:59:05] GodFather: has joined #ruby
[10:59:46] AlexJakeGreen: has joined #ruby
[11:01:00] johnmilton: has joined #ruby
[11:01:42] charliesome: has joined #ruby
[11:01:49] Xeago_: has joined #ruby
[11:02:08] dminuoso: has joined #ruby
[11:05:24] GodFather_: has joined #ruby
[11:05:30] leitz: has joined #ruby
[11:06:16] TheWhip: has joined #ruby
[11:06:19] leitz: How do you test if a passed in argument can be converted to a Fixnum?
[11:10:10] tAn: has joined #ruby
[11:10:29] arnonhongklay: has joined #ruby
[11:11:38] hutch34: has joined #ruby
[11:12:52] Xeago_: has joined #ruby
[11:14:59] hahuang65: has joined #ruby
[11:15:38] jmignault: has joined #ruby
[11:17:41] arnonhongklay: has joined #ruby
[11:19:48] nettoweb: has joined #ruby
[11:20:56] Vile`: has joined #ruby
[11:21:21] GodFather: has joined #ruby
[11:24:13] aryaching: has joined #ruby
[11:25:14] AlexJakeGreen: leitz, http://stackoverflow.com/questions/49274/safe-integer-parsing-in-ruby
[11:26:17] Macaveli: has joined #ruby
[11:27:58] MrBusiness2: has joined #ruby
[11:29:02] aries_liuxueyang: has joined #ruby
[11:29:10] Carella: has joined #ruby
[11:29:53] MrBusiness3: has joined #ruby
[11:30:37] burgestrand: has joined #ruby
[11:35:04] No: has joined #ruby
[11:36:47] edwinvdgraaf: has joined #ruby
[11:37:11] ramfjord: has joined #ruby
[11:37:32] freerobby: has joined #ruby
[11:37:53] terminalrecluse: has joined #ruby
[11:40:42] jaguarmagenta: has joined #ruby
[11:42:07] nankyokusei: has joined #ruby
[11:46:47] stoopidmunkey: has joined #ruby
[11:47:30] Hanmac: has joined #ruby
[11:48:35] leitz: AlexJakeGreen, thanks!
[11:51:02] arnonhongklay: has joined #ruby
[11:52:05] rkazak: has joined #ruby
[11:53:24] eatsfoobars: has joined #ruby
[11:53:35] joonty: has joined #ruby
[11:54:16] emiltin: has joined #ruby
[11:57:33] mistermocha: has joined #ruby
[11:59:10] evansbee: has joined #ruby
[11:59:18] jrafanie: has joined #ruby
[12:02:45] nhhc: has joined #ruby
[12:04:20] sergio_101: has joined #ruby
[12:04:20] senayar: has joined #ruby
[12:04:37] rkazak: has joined #ruby
[12:06:05] arnonhongklay: has joined #ruby
[12:06:19] ulluh: has joined #ruby
[12:06:36] synthroid: has joined #ruby
[12:09:06] tao_: has joined #ruby
[12:10:26] harfangk: has joined #ruby
[12:10:55] biberu: has joined #ruby
[12:11:38] blackmesa: has joined #ruby
[12:13:08] jokke: i have a question about rspec mocks
[12:13:40] jokke: if i use expect to_receive with a non existing method i get an error that it's not implemented
[12:14:03] jokke: this method doesn't and shouldn't exists because it's handled with SimpleDelegator
[12:14:26] jokke: can i somehow force rspec to mock it even if it's not defined?
[12:14:45] Papierkorb: jokke: you could use a double()
[12:14:59] jokke: https://p.jreinert.com/yF4Z/ruby
[12:15:53] TheWhip: has joined #ruby
[12:16:24] hk238: has joined #ruby
[12:19:05] ych: has joined #ruby
[12:19:26] jokke: Papierkorb: but how could i test my method then?
[12:19:42] jokke: i need to call it on the actual object
[12:20:50] Papierkorb: then you should mock the inner object
[12:21:06] jokke: i do that
[12:21:43] jokke: but i need to know assign_attributes actually calls the specified methods on the decorator instance even if they're not defined
[12:21:54] nettoweb: has joined #ruby
[12:22:31] Papierkorb: as I said, mock the inner object. the decorated object, not the decorator.
[12:22:39] rodfersou: has joined #ruby
[12:22:45] jokke: and what does that help?
[12:22:50] Papierkorb: Or use a decorator which actually defines methods
[12:24:12] Papierkorb: Why do you want to verify the decorators functionality? It'll work, as it's most likely tested elsewhere. it will call onto the inner object.
[12:26:28] jokke: yeah.. i guess so. it would've been just nice to have the test so it'd be easier to pluck the decorator into it's own gem for example
[12:26:56] arnonhongklay: has joined #ruby
[12:27:00] Papierkorb: you can do that. just use a double as inner object
[12:27:26] jokke: yeah then i'd test if the inner object receives test1=
[12:27:29] jokke: or whatever
[12:27:57] jokke: but the main point is that it tries the decorator first incase a setter has been overwritten to do stuff with the value
[12:28:05] ldnunes: has joined #ruby
[12:28:17] jokke: i'll just add one setter
[12:28:28] jokke: and the other i test with the inner object
[12:28:38] zapata: has joined #ruby
[12:29:36] ramfjord: has joined #ruby
[12:30:40] dsea: has joined #ruby
[12:31:08] tubuliferous: has joined #ruby
[12:31:27] jokke: oh come on...
[12:31:38] jokke: i tried defining a singleton method in the example
[12:31:46] jokke: can't define singleton
[12:32:27] pawnbox: has joined #ruby
[12:32:54] B1n4r10: has joined #ruby
[12:33:24] solars: has joined #ruby
[12:33:25] dminuoso: jokke: How did you try defining the singleton method?
[12:33:39] djbkd: has joined #ruby
[12:34:58] aupadhye: has joined #ruby
[12:38:33] leea: has joined #ruby
[12:38:36] dionysus69: has joined #ruby
[12:40:08] Fernando-Basso: has joined #ruby
[12:42:00] rolfb: has joined #ruby
[12:42:10] Ropeney: has joined #ruby
[12:42:46] tAn: has joined #ruby
[12:42:47] jrafanie: has joined #ruby
[12:43:38] spiette: has joined #ruby
[12:43:45] yardenbar: has joined #ruby
[12:44:01] bmurt: has joined #ruby
[12:45:39] spiette: has joined #ruby
[12:46:36] l4v2: has joined #ruby
[12:47:05] the_drow: has joined #ruby
[12:47:29] rbennacer: has joined #ruby
[12:48:04] shevy: dhruvasagar yeah, it was just the weird syntax that confused me
[12:48:08] jrafanie: has joined #ruby
[12:48:27] shevy: like to see [-1,1] = '' but in the definition we use def []=(a,b,c)
[12:50:33] chip_: has joined #ruby
[12:52:20] aupadhye: has joined #ruby
[12:54:09] dc4: has joined #ruby
[12:57:13] Abonec: has joined #ruby
[12:58:12] arnonhongklay: has joined #ruby
[12:59:13] jrafanie: has joined #ruby
[12:59:35] solocshaw: has joined #ruby
[13:01:51] arnonhongklay: has joined #ruby
[13:02:31] aegis3121: has joined #ruby
[13:03:02] terminalrecluse: has joined #ruby
[13:04:09] ekinmur: has joined #ruby
[13:04:23] ruby-lang167: has joined #ruby
[13:04:24] ChiefAlexander: has joined #ruby
[13:05:07] zer0: has left #ruby: ()
[13:05:19] aegis3121: has joined #ruby
[13:06:06] archaicdemon: has joined #ruby
[13:07:02] ramortegui: has joined #ruby
[13:08:18] hutch34: has joined #ruby
[13:09:02] diegoviola: has joined #ruby
[13:11:11] evansbee: has joined #ruby
[13:11:45] charliesome: has joined #ruby
[13:13:36] mdw: has joined #ruby
[13:14:27] mattwashere: has joined #ruby
[13:15:33] TheWhip: has joined #ruby
[13:19:04] archio: has joined #ruby
[13:19:19] pawnbox: has joined #ruby
[13:20:07] Vile`: has joined #ruby
[13:20:17] roamingdog: has joined #ruby
[13:21:14] swills: has joined #ruby
[13:23:04] allcentury: has joined #ruby
[13:26:26] isberg: has joined #ruby
[13:29:58] malconis: has joined #ruby
[13:31:33] sha1sum: has joined #ruby
[13:31:53] tubuliferous: has joined #ruby
[13:31:55] maucar: has joined #ruby
[13:32:02] evansbee: has joined #ruby
[13:32:35] sha1sum: I have a check for whether a gem is installed within my file and--if it is not installed--I call the gem installation. How can I reload the available gems so I can require the newly-installed one without having to exit the process?
[13:33:11] sha1sum: (this is a Vagrant file, so I'm aware it's not normal procedure for regular ruby)
[13:33:43] chip_: has joined #ruby
[13:34:14] Ropeney: has joined #ruby
[13:34:29] nankyokusei: has joined #ruby
[13:34:41] rickmasta: has joined #ruby
[13:35:50] ekinmur: has joined #ruby
[13:35:53] leea: can you post a gist?
[13:35:56] c0mrad3: has joined #ruby
[13:37:11] hutch34: has joined #ruby
[13:37:19] roamingdog: has joined #ruby
[13:38:23] sha1sum: leea: sure, one sec
[13:39:01] diego2: has joined #ruby
[13:39:17] diego2: has joined #ruby
[13:39:18] prefix: has joined #ruby
[13:39:22] sha1sum: leea: https://gist.github.com/sha1sum/3a15a0bc2ff4562e0a44495679fd055f
[13:40:14] sha1sum: leea: if I re-run *after* the plugin is installed it works fine
[13:41:14] saipal: has joined #ruby
[13:41:26] jaguarmagenta: has joined #ruby
[13:44:04] leea: this is a bit date but have you tried this? https://www.ruby-forum.com/topic/131346
[13:45:05] sha1sum: leea: actually I noticed something like, that, but I just ran into this specifically for Vagrant users, so I think I may use it :) /www.ruby-forum.com/topic/131346
[13:45:16] sha1sum: http://stackoverflow.com/questions/19492738/demand-a-vagrant-plugin-within-the-vagrantfile#answer-29125806
[13:46:23] davedev24: has joined #ruby
[13:46:46] workmad3: has joined #ruby
[13:47:13] And1: has joined #ruby
[13:47:14] tao_: has joined #ruby
[13:47:15] ChiefAlexander: has joined #ruby
[13:47:31] leea: oh okay, I'm glad you were able to find a solution :)
[13:47:32] `tim`: has joined #ruby
[13:47:51] And1: Hello folks. Can please anyone help me with a rake question? I want to specify a variable, NUM_CPUS = %x[sysctl -n hw.ncpu] … how can I multiply that value by 4 in another variable?
[13:48:27] adam12: And1: Integer(NUM_CPUS) * 4 ?
[13:48:52] fmcgeough: has joined #ruby
[13:48:58] davedev24: has joined #ruby
[13:49:48] And1: adam12: Do I need quotes around one of the both declarations? Sorry I’m just modifying a file, I never touched ruby before.
[13:50:11] adam12: And1: Can you share what you have in a Gist? You shouldn't need any quotes.
[13:50:27] grill_U: has joined #ruby
[13:52:11] And1: adam12: Here’s a paste: http://lpaste.net/168511
[13:52:38] adam12: And1: That looks like it will work
[13:52:55] RegulationD: has joined #ruby
[13:52:55] nando293921: has joined #ruby
[13:52:56] adam12: But I doubt it will
[13:53:06] And1: adam12: Why you doubt that? : )
[13:53:10] adam12: Because of the namespace stuff.
[13:53:49] adam12: I'm not super familiar with Rake internals, but your constants (NUM_CRAWLERS, NUM_CPUS) defined in data namespace might not be available in crawl namespace.
[13:54:07] And1: Ah I see. Ok let me try it …
[13:54:34] And1: It seems to work. Thank you!
[13:54:56] ullu: has left #ruby: ("Closing Window")
[13:55:16] adam12: And1: Weird? Well that's great to hear!
[13:55:41] codingcan: has joined #ruby
[13:55:51] GodFather: has joined #ruby
[13:56:07] arthurl: has joined #ruby
[13:56:57] codingcan: has left #ruby: ()
[13:58:26] malconis: has joined #ruby
[13:59:23] neo_: has joined #ruby
[14:00:29] mattwashere: has joined #ruby
[14:00:53] Neo--: has joined #ruby
[14:04:36] Kruppe: has joined #ruby
[14:05:05] rbennacer: has joined #ruby
[14:06:24] rbennacer: has joined #ruby
[14:08:42] swills: has joined #ruby
[14:08:46] agent_white: has joined #ruby
[14:08:53] agent_white: has joined #ruby
[14:09:13] aldodelgado: has joined #ruby
[14:09:16] chip_: has joined #ruby
[14:10:33] smathy: has joined #ruby
[14:13:03] mattwashere: has joined #ruby
[14:14:21] CJKinni: has joined #ruby
[14:15:27] Ishido: has joined #ruby
[14:16:36] ThatsNotJack: has joined #ruby
[14:17:31] orakar: has joined #ruby
[14:19:43] orakar: As you'll soon discover when you read my code example, I'm a C programmer trying Ruby. I'm trying to extract a little endian uint32 from a string. What I've done now works, but seems awfully un-Ruby. Can anyone advise? https://gist.github.com/anonymous/94b27b301aafdd79cc5bd264d4948c0d
[14:20:40] apeiros: orakar: unpack is your friend
[14:21:15] orakar: apeiros: looks promising! Thanks!
[14:21:40] B1n4r10: has joined #ruby
[14:22:21] codingcan: has joined #ruby
[14:22:31] apeiros: "L<" is probably what you need as unpack directive
[14:22:36] codingcan: has left #ruby: ()
[14:22:56] MrBusiness2: has joined #ruby
[14:24:02] Guest73250: has joined #ruby
[14:24:41] hxegon: That feeling when you spend like 3 weeks reinventing the observer pattern :|
[14:24:54] codingcan: has joined #ruby
[14:25:17] craigp_: has joined #ruby
[14:26:01] nhhc: has joined #ruby
[14:27:10] Bish: hxegon: why did u?
[14:27:19] ChiefAlexander: has joined #ruby
[14:27:53] orakar: apeiros: once I've unpacked the string, how do I combine the parts? Sorry if that's a silly question. I can imagine lots of ways to do it, but I'm after the most idiomatic way in Ruby
[14:28:27] Bish: orakar: can you gist an example?
[14:28:36] hxegon: long story short, processing different async input sources that have to all be fed into a single pipeline
[14:28:37] Bish: are you talking about the array resultung in the unpack?
[14:28:53] leea: has joined #ruby
[14:29:42] pawnbox: has joined #ruby
[14:29:53] orakar: Bish: yeah, that's what I mean. So "aa" would be 24929, since a = 97 and (97 + (97 << 8)) == 24929
[14:30:17] eatsfoobars: has joined #ruby
[14:30:54] Bish: aa alone wouldn't be uint32
[14:31:04] Bish: >> "aaaa".unpack "L<"
[14:31:05] ruby[bot]: Bish: # => [1633771873] (https://eval.in/597887)
[14:31:16] Bish: >> "\x00\x00aa".unpack "L<"
[14:31:17] ruby[bot]: Bish: # => [1633746944] (https://eval.in/597888)
[14:31:27] GodFather: has joined #ruby
[14:31:45] Bish: oh endian, right
[14:31:49] Bish: >> "aa\x00\x00".unpack "L<"
[14:31:49] orakar: Bish: you're right, sorry. I switched to uint16 because I was working it out on paper and didn't fancy 97 << 24 :P
[14:31:50] ruby[bot]: Bish: # => [24929] (https://eval.in/597889)
[14:32:06] Bish: so, what is the "part" you are talking about?
[14:32:29] harfangk: has joined #ruby
[14:32:38] tubuliferous: has joined #ruby
[14:32:40] orakar: Oh. I was under the impression that unpack would return an array of each byte. But I can see now that isn't the case.
[14:32:49] orakar: Brilliant, thanks very much Bish. And Apeiros. Much appreciated.
[14:33:01] Bish: ;) you're welcome
[14:33:15] `tim`: has joined #ruby
[14:33:19] orakar: Now the code looks much more Ruby-esque
[14:33:44] Bish: idd it is, ruby is the only language higher than c that makes parsing binary fun, imho
[14:34:13] Bish: already wrote elf binary patchers in ruby and it was great.
[14:34:45] kareeoleez: has joined #ruby
[14:34:52] Hobogrammer: has joined #ruby
[14:34:58] workmad3: has joined #ruby
[14:35:09] jokke: another rspec question
[14:35:11] jokke: https://p.jreinert.com/CoJEA/ruby
[14:35:31] jokke: this raises can't define singleton in line 10
[14:35:50] tvon: has joined #ruby
[14:35:51] jokke: maybe someone can explain why
[14:36:07] CloCkWeRX: has joined #ruby
[14:36:16] swills: has joined #ruby
[14:36:36] orakar: has joined #ruby
[14:36:51] jokke: i'm an idiot
[14:36:53] jokke: never mind
[14:37:22] jokke: (should be task, not :task of course)
[14:37:25] bkxd: has joined #ruby
[14:37:39] orakar: I just realised that the unpack answer isn't quite complete. My example (https://gist.github.com/anonymous/94b27b301aafdd79cc5bd264d4948c0d) involved getting just one uint32 from a specific position of 4 bytes from the middle of a string.
[14:38:44] orakar: (sorry, didn't mean to suggest the answer was incomplete in the sense that you'd shortchanged me. :P I just meant that I wasn't 100% sure how to proceed)
[14:38:52] tvw: has joined #ruby
[14:40:06] neo_: has joined #ruby
[14:40:36] DaniG2k: has joined #ruby
[14:41:20] hutch34: has joined #ruby
[14:41:33] centrx: has joined #ruby
[14:42:58] xaxisx: has joined #ruby
[14:43:01] aryaching: has joined #ruby
[14:43:01] blandflakes: has joined #ruby
[14:43:04] chouhoulis: has joined #ruby
[14:43:24] shinnya: has joined #ruby
[14:44:01] sanjayu: has joined #ruby
[14:44:31] mattwashere: has joined #ruby
[14:45:03] howardg: has joined #ruby
[14:45:24] orakar: I think I've got the solution: I'll just call .unpack on the substring which contains the data I want :-)
[14:45:31] Bish: >> "abcd\x01\x00\x00\x00def"[4..8].unpack "L<"
[14:45:32] ruby[bot]: Bish: # => [1] (https://eval.in/597902)
[14:45:36] xaxisx: has joined #ruby
[14:45:54] Bish: orakar: that's very ruby-ish
[14:46:00] Bish: rubbish, HYUK HYUK
[14:46:07] hutch34: has joined #ruby
[14:46:14] orakar: Bish: It's such a different mindset to C that I have trouble imagining the possibilities :P
[14:46:32] Bish: i know that feel, but as long as i can stay in the ruby mindset i am happy
[14:46:46] Bish: orakar: there is even a language that tries to be C while looking like ruby
[14:46:50] neo_: has joined #ruby
[14:47:31] skade: has joined #ruby
[14:47:51] BTRE: has joined #ruby
[14:48:02] orakar: Bish: so these two examples have identical outputs for all values, and the latter is Rub(y)ish, right? :-) https://gist.github.com/anonymous/447adff2f7dd75d8fa271d52c6c7e060
[14:48:29] glrrf: has joined #ruby
[14:48:36] orakar: Bish: great! Thanks again.
[14:48:45] Bish: also guessing the first one is faster
[14:48:48] orakar: I can finally escape the 1980s
[14:48:52] saipal: has joined #ruby
[14:49:30] mattwashere: has joined #ruby
[14:50:44] Madplatypus: has joined #ruby
[14:51:09] glrrf: has left #ruby: ("Leaving")
[14:51:34] joelwallis: has joined #ruby
[14:53:13] imperator: has joined #ruby
[14:54:40] tAn: has joined #ruby
[14:55:05] TomyWork: from file scope, is there a way to run another ruby file as if its instructions had been pasted at that point?
[14:55:33] Bish: File.read & eval
[14:55:49] TomyWork: require will allow me to access unadorned variables?
[14:55:59] TomyWork: non-$ non-@
[14:56:18] rippa: has joined #ruby
[14:56:32] dc4: has joined #ruby
[14:56:59] TomyWork: i have this configuration file named gitlab.rb. Here's an example instruction: gitlab_rails['time_zone'] = 'UTC'
[14:57:33] TomyWork: i want to leave this file as is, except for one line at the end in which i invoke another file that overrides a bunch of options
[14:59:24] imperator: has left #ruby: ("Leaving")
[15:00:03] toretore: TomyWork: do you control the contents of gitlab.rb?
[15:00:29] neo_: has joined #ruby
[15:00:47] aryaching: has joined #ruby
[15:00:59] TomyWork: toretore i could, but i want to leave this as is, so i can update it easily
[15:01:09] TomyWork: i only want to add one line at the end
[15:01:14] TomyWork: #include "other.rb"
[15:01:20] TomyWork: something to that effect :)
[15:02:17] toretore: TomyWork: need more context. gist files?
[15:03:20] TomyWork: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-config-template/gitlab.rb.template here's the template it is generated from
[15:03:29] mattwashere: has joined #ruby
[15:04:07] bruce_lee: has joined #ruby
[15:04:56] pwnd_nsfw: has joined #ruby
[15:06:34] howardg: has joined #ruby
[15:08:03] sepp2k: has joined #ruby
[15:08:36] CloCkWeRX: has joined #ruby
[15:10:05] rodfersou: has joined #ruby
[15:11:00] toretore: TomyWork: where do you need to "include" this from?
[15:11:12] TomyWork: no, i need to include something into this
[15:11:45] TomyWork: and that "something" needs to have the ability to everything gitlab.rb is modifying there in the examples
[15:12:01] TomyWork: and that "something" needs to have the ability to modify everything gitlab.rb is modifying there in the examples
[15:12:39] ramfjord: has joined #ruby
[15:13:02] blackmesa: has joined #ruby
[15:13:34] toretore: so you want to, inside this file, "include" another that uses `gitlab_rails` etc?
[15:14:31] toretore: unless whatever is executing that file has a mechanism for it, there is no reliable way to do it
[15:14:48] nando293921: has joined #ruby
[15:15:06] TomyWork: no "require with binding" or something?
[15:15:12] ChiefAlexander: has joined #ruby
[15:15:47] skade: has joined #ruby
[15:15:48] toretore: it is likely that it is being read and instance_eval-ed by something, in which case you could do the same
[15:16:41] toretore: it is more likely that there is a better way, but i can't say because i don't know the whole context of your use case
[15:17:05] TomyWork: does binding.eval(File.read('other.rb')) sound promising?
[15:17:43] TomyWork: i will, tomorrow :)
[15:17:53] toretore: it doesn't sound promising at all, it sounds like a very bad idea all of it, but it might "work"
[15:17:59] aryaching: has joined #ruby
[15:18:21] TomyWork: maybe i'll just make a copy and merge when i upgrade...
[15:18:32] toretore: this kind of configuration has been made to be "user friendly" and "pretty", not logical and extensible
[15:19:18] TomyWork: anyway, thanks for the advice :)
[15:22:36] aryaching: has joined #ruby
[15:27:06] `tim`: has joined #ruby
[15:27:34] aissar: has joined #ruby
[15:29:05] dionysus69: has joined #ruby
[15:29:09] l4v2: has joined #ruby
[15:29:38] arnonhongklay: has joined #ruby
[15:30:04] giz|work: has joined #ruby
[15:33:02] tvw: has joined #ruby
[15:33:22] roamingdog: has joined #ruby
[15:33:28] mattwashere: has joined #ruby
[15:34:32] connor_goodwolf: has joined #ruby
[15:35:04] nankyokusei: has joined #ruby
[15:35:12] alfiemax: has joined #ruby
[15:38:49] chip_: has joined #ruby
[15:41:09] nankyokusei: has joined #ruby
[15:41:38] ramfjord: has joined #ruby
[15:41:41] Vingador: has joined #ruby
[15:42:10] jaguarmagenta: has joined #ruby
[15:43:34] B1n4r10: has joined #ruby
[15:45:04] douglascorrea: has joined #ruby
[15:45:46] rbennacer: has joined #ruby
[15:45:54] speakingcode: has joined #ruby
[15:46:34] synthroid: has joined #ruby
[15:47:21] roamingdog: has joined #ruby
[15:47:42] hxegon: Help me prepare an exit strategy; What would you, roughly, say is appropriate pay for a ruby dev with 1 year experience and only some rails experience?
[15:47:44] diegoviola: has joined #ruby
[15:48:03] centrx: One dolla
[15:48:05] roamingdog: has joined #ruby
[15:48:29] hxegon: centrx: about tree fiddy?
[15:49:02] shevy: two dolla
[15:49:14] Silthias1: has joined #ruby
[15:49:22] nettoweb: has joined #ruby
[15:50:28] ChiefAlexander: has joined #ruby
[15:51:04] hxegon: but seriously though, I would greatly appreciate any bounded minimums. I'm pretty insulated from other developers I can talk to, so you guys/gals are my only hope, obi-wan
[15:51:39] adam12: hxegon: Depends a ton on market
[15:51:59] adam12: NYC vs Idaho
[15:52:11] workmad3: has joined #ruby
[15:52:11] adaedra: Depends on many things
[15:52:11] hxegon: California area
[15:52:20] hxegon: any way I could narrow it down more?
[15:52:53] aegis3121: has joined #ruby
[15:53:44] hxegon: I know nothing exists in a vacuum here, but I am really just looking for a rough estimate. Not going to hold anyone accountable if it's wrong
[15:53:45] shevy: california is rich so people earn more and have to be paid more
[15:54:05] aegis3121: has joined #ruby
[15:54:06] TomyLobo: has joined #ruby
[15:54:46] tvon: has joined #ruby
[15:56:42] neo_: has joined #ruby
[15:57:17] neo_: has joined #ruby
[15:58:03] Es0teric: has joined #ruby
[15:58:42] polishdub: has joined #ruby
[15:59:22] Neo--: has joined #ruby
[16:00:01] dminuoso: has joined #ruby
[16:00:37] blackmes1: has joined #ruby
[16:01:33] douglascorrea: has joined #ruby
[16:01:51] codecop: has joined #ruby
[16:03:06] amclain: has joined #ruby
[16:04:28] mistermocha: has joined #ruby
[16:05:34] tvw: has joined #ruby
[16:07:55] voodoofish430: has joined #ruby
[16:08:04] ullu: has joined #ruby
[16:08:46] whathappens: has joined #ruby
[16:09:18] diegoviola: has joined #ruby
[16:10:23] whathapp_: has joined #ruby
[16:10:46] aep-shoutlet: has joined #ruby
[16:12:16] [Butch]: has joined #ruby
[16:12:30] Kruppe-: has joined #ruby
[16:12:35] B1n4r10: has joined #ruby
[16:15:21] mattwashere: has joined #ruby
[16:15:53] chip_: has joined #ruby
[16:17:18] DaniG2k: has joined #ruby
[16:19:15] Silthias: has joined #ruby
[16:19:45] neo_: has joined #ruby
[16:20:52] tubuliferous: has joined #ruby
[16:21:21] mattwashere: has joined #ruby
[16:24:01] bmurt: has joined #ruby
[16:24:43] yqt: has joined #ruby
[16:25:47] kareeoleez: how do you Ruby dev guys and girls make extra income ?
[16:26:04] dhruvasagar: has joined #ruby
[16:27:03] dminuoso: kareeoleez: The same anyeone else does extra income.
[16:27:12] archaicdemon: work hard, play hard...
[16:27:17] dminuoso: Some don't need extra income, some have a second job, others freelance on their free time
[16:27:30] mistermocha: has joined #ruby
[16:27:52] kareeoleez: dminuoso: I am starting to get pretty cool with Ruby and I wonder If I can make some more money
[16:28:01] kareeoleez: like small projects or help or consulting
[16:29:09] dminuoso: kareeoleez: Im sure there is headhunters or even websites that can get you freelance jobs.
[16:29:55] kareeoleez: like odesk ?
[16:30:00] arthurl: has joined #ruby
[16:30:06] dminuoso: kareeoleez: Get a real job then.
[16:30:08] dminuoso: Or be good.
[16:30:19] kareeoleez: I have one and I am happy with it
[16:30:23] mattwashere: has joined #ruby
[16:30:26] kareeoleez: I just want to make some more money
[16:30:38] tao_: has joined #ruby
[16:31:19] smathy: kareeoleez, what sucks about odesk/upwork?
[16:31:33] roamingdog: has joined #ruby
[16:31:44] mattwashere: has joined #ruby
[16:31:50] howdoi: has joined #ruby
[16:32:02] havenwood: kareeoleez: Any good Ruby brigades in your area? Around here there are always folk looking for Rubyists for all sorts of things.
[16:32:23] macsteps: has joined #ruby
[16:33:15] kareeoleez: havenwood: nope, just looking remotely some people I can trust. And they can trust me of course.
[16:33:26] kareeoleez: or any startups that I could be involved
[16:33:35] Neo--: has joined #ruby
[16:33:54] havenwood: kareeoleez: Participating in meetups or contributing to open source are good ways to build rapport..
[16:34:32] havenwood: Hmm, what's a good remote Ruby meetup?
[16:34:47] kareeoleez: I didn't know they even existed
[16:34:51] kareeoleez: I mean "remote" ones
[16:35:21] havenwood: I've dropped in on at least one, so at least one exists. I know there are remote Ruby confs too.
[16:35:29] havenwood: https://allremoteconfs.com/ruby-2016
[16:36:27] VeryBewitching: has joined #ruby
[16:37:09] kareeoleez: havenwood: nice one. thanks
[16:37:14] leea: has joined #ruby
[16:37:21] havenwood: http://www.rubyflow.com/p/qyajcb-join-a-ruby-remote-meetup
[16:38:49] smathy: Also http://remotemeetup.com/ - although they might have stalled out.
[16:40:21] havenwood: kareeoleez: Or maybe you'd like doing some bounties: https://www.bountysource.com
[16:40:29] mfb2: has joined #ruby
[16:40:31] smathy: slash_nick, ^ remotemeetup.com still going?
[16:40:59] aryaching: has joined #ruby
[16:43:11] nettoweb: has joined #ruby
[16:46:35] tvon: has joined #ruby
[16:50:22] troulouliou_div2: has joined #ruby
[16:52:28] sharkman: has joined #ruby
[16:53:21] tubuliferous: has joined #ruby
[16:53:21] sharkman: system("./make_ssh_connection"), how do i make this command run in background and disassociate (not end when my ruby program ends) not hijack the terminal i run this from
[16:54:25] bb010g: has joined #ruby
[16:54:42] yardenbar: has joined #ruby
[16:56:07] Hyuk: has joined #ruby
[16:56:20] miqlas-H: has joined #ruby
[16:56:41] neo_: has joined #ruby
[16:58:21] douglascorrea: has joined #ruby
[17:00:40] electrostat: has joined #ruby
[17:01:23] harfangk: has joined #ruby
[17:01:43] freerobby: has joined #ruby
[17:03:37] pilne: has joined #ruby
[17:05:28] tAn: has joined #ruby
[17:08:10] electrostat: has joined #ruby
[17:08:17] Devalo: has joined #ruby
[17:09:09] tvon: has joined #ruby
[17:09:23] pawnbox: has joined #ruby
[17:09:29] macsteps: has joined #ruby
[17:11:43] pilne: if i am comfortable with how virtualenv (python) works (and rvm), but would like to switch off of rvm because of how hyperagressive it is with various .files, would i be more comfortable with rbenv (+ bundler), or chruby, ruby-install, and bundler?
[17:13:33] mikecmpbll: has joined #ruby
[17:17:32] sharkman: so i i run spawn("./connect_ssh.sh"), then in the terminal i run ruby it connects my terminal to the ssh destination. i want that run totally in the background
[17:17:43] firstdayonthejob: has joined #ruby
[17:18:07] douglascorrea: has joined #ruby
[17:18:45] hahuang61: has joined #ruby
[17:18:52] MEATCHICKEN: Having trouble stubbing a service
[17:18:58] hxegon: pilne both rbenv and chruby are improvements, but I would suggest trying both out.
[17:19:20] MEATCHICKEN: I have a method in my model that instantiates a new service - how can I make the service return a fake value with rspec/
[17:19:24] stoopidmunkey: has joined #ruby
[17:19:36] pilne: ty smathy, hxegon
[17:21:04] ramfjord: has joined #ruby
[17:21:24] mfb2: has joined #ruby
[17:22:18] DoubleMalt: has joined #ruby
[17:22:25] atmosx: is anyone going to http://euruko2016.org/ ?
[17:22:58] evansbee: has joined #ruby
[17:23:04] neo_: has joined #ruby
[17:23:10] yude: has joined #ruby
[17:25:10] nando293921: has joined #ruby
[17:26:07] mattwashere: has joined #ruby
[17:28:19] c_nick: has joined #ruby
[17:28:50] c_nick: copy all rb files from a folder and its subfolders
[17:29:10] c_nick: FileUtils.cp_r(Dir.glob(src),dest) this wont work
[17:29:51] c_nick: src = "C:/Users/Nathan/Desktop/*.java"
[17:30:45] korzybski: has joined #ruby
[17:31:04] solocshaw: has joined #ruby
[17:31:05] miskatonic: has joined #ruby
[17:32:04] electrostat: has joined #ruby
[17:33:34] rolfb: has joined #ruby
[17:33:39] blandflakes: has joined #ruby
[17:38:50] khelair: has joined #ruby
[17:39:05] Es0teric: has joined #ruby
[17:39:14] c_nick: got it thanks
[17:39:15] chip_: has joined #ruby
[17:39:15] c_nick: has left #ruby: ()
[17:39:24] dc4: has joined #ruby
[17:40:40] araujo_: has joined #ruby
[17:41:41] nankyokusei: has joined #ruby
[17:41:42] aegis3121: has joined #ruby
[17:42:54] aegis3121: has joined #ruby
[17:42:56] jaguarmagenta: has joined #ruby
[17:44:11] shevy: atmosx hmm not me, don't think I'd have time anyway
[17:46:23] ChiefAlexander: has joined #ruby
[17:46:35] l4v2: has joined #ruby
[17:47:14] blackmes1: has joined #ruby
[17:47:32] agit0: has joined #ruby
[17:48:02] hahuang65: has joined #ruby
[17:48:50] ChiefAlexander_: has joined #ruby
[17:48:56] djbkd: has joined #ruby
[17:52:26] memorasus: has joined #ruby
[17:52:27] macsteps: has joined #ruby
[17:56:59] Wildfyr: has joined #ruby
[17:57:33] ThatsNotJack: has joined #ruby
[17:58:49] stoopidmunkey: has joined #ruby
[17:59:10] edwinvdgraaf: has joined #ruby
[18:00:09] ramfjord: There's no idenitity function on object is there... I'm trying to think of the simplest way of checking for an array being all nil without allocating a new array.
[18:00:21] ramfjord: >> [ nil, nil, 1, nil ].index { |i| i }
[18:00:22] ruby[bot]: ramfjord: # => 2 (https://eval.in/598023)
[18:00:25] ramfjord: looks pretty weird
[18:00:44] ramfjord: should probably use "e" not to confuse new ruby devs
[18:01:37] CJKinni: has joined #ruby
[18:04:12] dminuoso: ramfjord: arr.compact.empty?
[18:04:57] dminuoso: ramfjord: or ary.all?(&:nil?)
[18:04:59] futilegames: has joined #ruby
[18:05:13] jmignault: has joined #ruby
[18:05:20] al2o3-cr: ^ yeah this
[18:06:28] ThatsNotJack: has joined #ruby
[18:06:47] jtd: has joined #ruby
[18:09:10] ullu: has joined #ruby
[18:11:32] ramfjord: compact is the allocating new array strategy
[18:11:35] babblebre: has joined #ruby
[18:11:51] ramfjord: though it would be !ary.compact.empty?
[18:12:26] ramfjord: >> [ nil, nil, 1, nil ].all?(&:nil?)
[18:12:27] ruby[bot]: ramfjord: # => false (https://eval.in/598025)
[18:12:29] ramfjord: looks clean
[18:12:37] electrostat: has joined #ruby
[18:12:39] zeroDi: has joined #ruby
[18:14:16] baweaver: >> [ nil, nil, 1, nil ].any? # ramfjord
[18:14:18] ruby[bot]: baweaver: # => true (https://eval.in/598026)
[18:14:56] baweaver: >> [ nil, nil, 1, nil ].none? # ramfjord
[18:14:57] ruby[bot]: baweaver: # => false (https://eval.in/598027)
[18:18:20] ledestin: has joined #ruby
[18:20:29] TheWhip: has joined #ruby
[18:21:16] dminuoso: baweaver: Oh. That is neat.
[18:21:39] baweaver: &ri Enumerable
[18:21:39] `derpy: http://ruby-doc.org/core-2.3.1/Enumerable.html
[18:21:49] baweaver: read through that, there's a lot more in there
[18:21:52] pablo-dinella: has joined #ruby
[18:22:03] baweaver: a lot of the power of Ruby is in that module
[18:22:15] dminuoso: baweaver: Ah wait that is not entirely correct
[18:22:22] dminuoso: >> [ false ].any?
[18:22:23] ruby[bot]: dminuoso: # => false (https://eval.in/598028)
[18:22:31] neo_: has joined #ruby
[18:22:31] spider-mario: has joined #ruby
[18:22:50] dminuoso: So if the need is to check for nil specifically, I guess you won't get around .any? &:nil?
[18:22:52] baweaver: `any?` checks if any elements are true
[18:23:12] codecop: has joined #ruby
[18:23:13] baweaver: so nil only then, I just saw the tail of that convo
[18:23:23] jetpackjoe: has joined #ruby
[18:24:04] electrostat: has joined #ruby
[18:24:08] dn5: has joined #ruby
[18:24:28] dn5: anyone got a working google search result parser gem?
[18:24:29] chouhoulis: has joined #ruby
[18:25:25] bmurt: has joined #ruby
[18:25:27] Hyuk: has joined #ruby
[18:26:03] jackjackdripper: has joined #ruby
[18:28:22] electrostat: has joined #ruby
[18:30:41] arooni: has joined #ruby
[18:30:58] the_drow: has joined #ruby
[18:34:16] xall: has joined #ruby
[18:34:33] electrostat: has joined #ruby
[18:34:53] marr: has joined #ruby
[18:35:21] emiltin: has joined #ruby
[18:35:48] dopamean_: has joined #ruby
[18:36:48] yqt: has joined #ruby
[18:37:15] dn5: nevermind, I just wrote my own
[18:37:30] dn5: quite easily with nokogiri
[18:37:53] dn5: trick is at .css('div.srg')
[18:38:00] dn5: there you've got search results
[18:39:54] ThatsNotJack: has joined #ruby
[18:41:35] SCHAAP137: has joined #ruby
[18:42:57] electrostat: has joined #ruby
[18:44:03] mattwashere: has joined #ruby
[18:44:40] Dimik: has joined #ruby
[18:45:24] electrostat: has joined #ruby
[18:45:29] mdw: has joined #ruby
[18:45:44] al2o3-cr: has joined #ruby
[18:47:46] kies: has joined #ruby
[18:47:51] arooni: has joined #ruby
[18:48:59] nanoz: has joined #ruby
[18:50:02] nettoweb: has joined #ruby
[18:52:45] ma489: has joined #ruby
[18:53:33] Oog: has joined #ruby
[18:53:54] stoopidmunkey: has joined #ruby
[18:54:50] xaxisx: has joined #ruby
[18:56:43] smathy: has joined #ruby
[18:59:53] ekinmur_: has joined #ruby
[19:00:58] ekinmur_: has joined #ruby
[19:01:32] phredus_: has joined #ruby
[19:02:14] m4rCsi: has joined #ruby
[19:02:15] snapcase: has joined #ruby
[19:02:21] marahin: has joined #ruby
[19:02:28] ncthom91: has joined #ruby
[19:03:30] trajing: has joined #ruby
[19:03:53] codex: has joined #ruby
[19:03:54] tokynet: has joined #ruby
[19:04:00] Xeago_: has joined #ruby
[19:04:13] lnx: has joined #ruby
[19:04:22] yfeldblum: has joined #ruby
[19:04:27] RegulationD: has joined #ruby
[19:04:27] atmosx: shevy too bad :-(
[19:04:32] SebastianThorn: has joined #ruby
[19:04:51] pcboy: has joined #ruby
[19:04:53] atmosx: It's near home (well not exactly near, but almost) and a ruby group for a town nearby might go, so I'm thinking of going with them
[19:04:57] Sp4rKy: has joined #ruby
[19:05:11] arnonhongklay: has joined #ruby
[19:07:02] majuscule: how would one go about creating a rubygems mirror for version control?
[19:07:32] tokynet: has joined #ruby
[19:08:00] tokynet: has joined #ruby
[19:08:02] icedragon: has joined #ruby
[19:08:38] zacstewart: has joined #ruby
[19:09:03] dn5: oh fuck google and their encoded website linkls
[19:10:01] bmurt: has joined #ruby
[19:11:29] rdark: has joined #ruby
[19:13:06] jackjackdripper: has joined #ruby
[19:13:17] shevy: atmosx yeah... I guess via train it is not so far away from here too
[19:15:03] nando293921: has joined #ruby
[19:16:05] jgpawletko: has joined #ruby
[19:17:11] blackmes1: has joined #ruby
[19:18:20] dn5: how can I retrieve everything from url= to &ei? https://gist.github.com/dn5/ce07331f0ce5b55f778e3946ce539a33
[19:18:48] dn5: ie getting a substring from a string
[19:19:13] mikecmpbll: has joined #ruby
[19:19:25] dn5: something like string.sub(/.*?=/ ...
[19:20:00] xall: has joined #ruby
[19:20:10] edwinvdgraaf: has joined #ruby
[19:20:21] houhoulis: has joined #ruby
[19:21:24] xall: has joined #ruby
[19:21:26] dn5: this works str.partition('url=').last
[19:21:39] dn5: still need to remove the &ie and everthing else
[19:22:38] emilkarl: has joined #ruby
[19:23:56] dn5: str.partition('url=').last
[19:24:00] agit0: has joined #ruby
[19:24:10] xall: has joined #ruby
[19:24:15] dn5: str.gsub(/&ei[^\s]+/,"")
[19:24:17] dn5: solution :)
[19:24:34] symm-: has joined #ruby
[19:24:38] adam12: Do you just need the URL?
[19:25:00] pawnbox_: has joined #ruby
[19:25:00] adam12: require "cgi"; CGI::parse(your_url)["url"]
[19:25:19] havenwood: dn5: require 'cgi'; require 'uri'; CGI.parse(URI.parse(url).query)['url']
[19:25:31] adam12: >> require "cgi"; CGI::parse("http://google.ca?foo=true&url=http://foobarbaz")["url"]
[19:25:33] ruby[bot]: adam12: # => ["http://foobarbaz"] (https://eval.in/598035)
[19:25:43] dn5: cool.. whats the benchmark comprasio to my solution?
[19:25:48] havenwood: yeah, no need to pull out just the query
[19:26:25] xall: has joined #ruby
[19:27:19] havenwood: dn5: url[/(?<=url=)[^&]+/]
[19:27:28] aegis3121: has joined #ruby
[19:27:59] pLaToOn: has joined #ruby
[19:28:08] dn5: havenwood: cool
[19:28:23] Fernando-Basso: has joined #ruby
[19:28:45] aegis3121: has joined #ruby
[19:28:54] havenwood: pLaToOn: g'mornin'
[19:29:38] slash_nick: smathy: they're still up and running... talks almost weekly now. i believe they're partnering with daily drip (from knewter/jadams)
[19:31:01] smathy: slash_nick, oh cool, last talk on the site (as a youtube video) seems to be the Trailblazer one from April?
[19:32:40] Akuma: has joined #ruby
[19:32:52] jottr: has joined #ruby
[19:33:10] xall: has joined #ruby
[19:33:12] rbennacer: has joined #ruby
[19:34:01] last_staff: has joined #ruby
[19:34:18] nettoweb: has joined #ruby
[19:35:18] tao_: has joined #ruby
[19:35:42] xall: has joined #ruby
[19:36:34] ekinmur: has joined #ruby
[19:37:08] Devalo: has joined #ruby
[19:37:19] Xiti: has joined #ruby
[19:38:57] dn5: finally fucking works
[19:39:01] dn5: smoke break approved
[19:39:36] freerobby: has joined #ruby
[19:40:33] chip_: has joined #ruby
[19:40:53] xall: has joined #ruby
[19:41:38] dc4: has joined #ruby
[19:42:35] nankyokusei: has joined #ruby
[19:43:01] mistermocha: has joined #ruby
[19:44:06] jackjackdripper1: has joined #ruby
[19:44:09] evansbee: has joined #ruby
[19:44:19] futilegames: has joined #ruby
[19:45:19] mattwashere: has joined #ruby
[19:45:23] nettoweb: has joined #ruby
[19:45:38] rodfersou: has joined #ruby
[19:46:53] kirun: has joined #ruby
[19:47:24] mattwashere: has joined #ruby
[19:47:42] tAn: has joined #ruby
[19:54:22] gizmore: has joined #ruby
[19:56:16] xall: has joined #ruby
[19:57:54] arescorpio: has joined #ruby
[19:57:56] whathappens: has joined #ruby
[19:58:07] dionysus69: has joined #ruby
[19:59:11] macsteps: has joined #ruby
[19:59:56] slash_nick: smathy: they've switched to bigmarker, thanks for the heads up i'll check with franze later and see why that is
[20:00:08] xall: has joined #ruby
[20:03:30] RegulationD: has joined #ruby
[20:04:44] mistermocha: has joined #ruby
[20:06:28] ramfjord_: has joined #ruby
[20:06:33] djbkd: has joined #ruby
[20:09:45] ulluh: has joined #ruby
[20:10:57] jenrzzz: has joined #ruby
[20:10:57] jenrzzz: has joined #ruby
[20:14:47] blackgoat: has joined #ruby
[20:15:27] mtkd: has joined #ruby
[20:18:44] yardenbar: has joined #ruby
[20:21:09] neanderslob: has joined #ruby
[20:21:50] xall: has joined #ruby
[20:23:52] Moosashi: has joined #ruby
[20:26:03] karapetyan: has joined #ruby
[20:26:08] xall: has joined #ruby
[20:30:37] adam12: What is everybody's preferred intro to ruby guide? I was pitched this question and it's been ages since I learned Ruby.
[20:33:12] agent_white: I thoroughly enjoy _why's guide. I recommend that, supplemented with Ruby Monks.
[20:33:54] adam12: Why's guide was defacto, but I can't help but wonder if its not very approachable now a days
[20:35:44] r_rios: has joined #ruby
[20:36:11] xall: has joined #ruby
[20:36:34] ur5us: has joined #ruby
[20:36:41] rbennacer: has joined #ruby
[20:37:19] Moosashi: has joined #ruby
[20:38:31] maucar: has joined #ruby
[20:39:18] r_rios: How can I iterate over an Array pair by pair? For example: [1, 2, 3, 4, 5].pairs{|p1, p2| print "(#{p2}, #{p2}) " } # prints (1, 2) (2, 3) (3, 4) (4, 5)
[20:39:50] dhruvasagar: has joined #ruby
[20:39:53] jhack: has joined #ruby
[20:39:59] havenwood: r_rios: each_cons(2)
[20:40:48] havenwood: (in place of `pairs`)
[20:41:08] r_rios: havenwood: Thanks. Is there a "select" version of that method
[20:41:23] DoubleMalt: has joined #ruby
[20:41:32] dc4: has joined #ruby
[20:42:32] adaedra: you can chain
[20:43:06] adaedra: >> [1, 2, 3, 4, 5, 6].each_cons(2).select { |a, _| a.odd? }
[20:43:07] ruby[bot]: adaedra: # => [[1, 2], [3, 4], [5, 6]] (https://eval.in/598056)
[20:43:20] adam12: One of my favourite features.
[20:43:37] adaedra: That's just the way Enumerable works.
[20:43:38] elomatreb: Ruby has hands down the most useful standard library I've ever used
[20:43:58] rbennacer: has joined #ruby
[20:44:18] snowy: has joined #ruby
[20:44:40] rbennacer: has joined #ruby
[20:45:18] havenwood: >> module Enumerable; def pairs &block; each_cons 2, &block end end; [1, 2, 3, 4, 5].pairs { |p1, p2| print "(#{p2}, #{p2}) " }
[20:45:19] ruby[bot]: havenwood: # => (2, 2) (3, 3) (4, 4) (5, 5) nil (https://eval.in/598057)
[20:45:24] dminuoso: has joined #ruby
[20:45:49] havenwood: r_rios: looks like you have p2 twice there ^
[20:47:34] eljimador: has joined #ruby
[20:47:34] B1n4r10: has joined #ruby
[20:55:32] r_rios: Thanks adaedra and havenwood
[20:56:41] workmad3: has joined #ruby
[20:58:05] SCHAAP137: has joined #ruby
[20:58:34] khelair: I'm having a ridiculous question here. I'm working on a machine freshly installed with ruby 2.x and assorted tools. I just got the mysql & mysql2 gems installed, and I was hoping they'd fix my problem
[20:58:52] tummy: has joined #ruby
[20:58:55] khelair: problem being that sqllite is the only database whose configuration examples I'm seeing in the database.yml file
[20:59:07] naftilos76: has joined #ruby
[20:59:14] khelair: which is hampering my ability to follow the example in the ruby for rails book that I'm trying to learn from right now
[20:59:29] khelair: anybody have any suggestions or pointers to helpful information? thanks in advance
[21:01:13] tao_: has joined #ruby
[21:01:30] havenwood: khelair: You can generate your Rails app preconfigured for a different DB or change the conf/database.yml file.
[21:01:54] havenwood: khelair: The #rubyonrails channel is dedicated to Rails.
[21:01:58] havenwood: config/database.yml**
[21:03:11] isberg_: has joined #ruby
[21:03:46] khelair: ah thank you sir
[21:04:23] havenwood: rails new khelair -d mysql
[21:04:29] havenwood: khelair: you're welcome
[21:05:11] khelair: very much appreciated ;)
[21:07:10] dn5: ai, how does one select nested value from JSON.parse()?
[21:07:24] havenwood: dn5: #dig is a nice way
[21:07:33] dn5: example ['parent']['child']
[21:08:12] dn5: havenwood: I think this is rather simple
[21:08:18] dn5: no need for dig
[21:08:29] havenwood: >> [0, 1, {aim: true, nested: {omgwtfbbq: [42]}}].dig 2, :nested, :omgwtfbbq, 0
[21:08:30] ruby[bot]: havenwood: # => 42 (https://eval.in/598071)
[21:08:34] dikaio: has joined #ruby
[21:08:52] dn5: havenwood: thats super nested :P
[21:08:55] smathy: ACTION loves a good wtf BBQ
[21:08:56] havenwood: dn5: dig 'parent', 'child'
[21:08:57] dn5: mine is quite simple
[21:09:10] dn5: havenwood: https://api.stackexchange.com/docs/answers-on-questions#order=desc&sort=activity&ids=12509&filter=default&site=stackoverflow&run=true
[21:09:40] dn5: items -> owner -> reputation
[21:09:51] Moosashi: has joined #ruby
[21:09:55] smathy: dn5, ['parent']['child'] is basically how you do it, so if you're not getting what you expect, maybe you need to make a gist to show what you're trying and getting.
[21:10:14] dn5: smathy: right, thats what I thought .. one second
[21:10:15] smathy: dn5, well the_object['parent']['child'] is.
[21:10:24] havenwood: dn5: dig 'items', 'owner', 'reputation'
[21:10:46] smathy: items[0] havenwood
[21:10:55] havenwood: ah, it's an ary
[21:11:01] havenwood: just glanced
[21:11:15] smathy: Starting to think that's going to be the problem here ;)
[21:11:19] dn5: `[]': no implicit conversion of String into Integer
[21:11:24] havenwood: smathy: rgr
[21:11:31] havenwood: dn5: which one of the owner/reputations do you want?
[21:11:32] smathy: dn5, yep, items is an array.
[21:11:47] dn5: havenwood: first one
[21:11:50] dn5: shall be
[21:11:53] havenwood: dn5: all of them? the first? the last?
[21:11:54] tomphp: has joined #ruby
[21:11:55] smathy: dn5, you'll want something like: foo["items"][0]["owner"]["reputation"]
[21:11:55] hutch34: has joined #ruby
[21:12:03] dn5: smathy: ahhh
[21:12:20] smathy: ...or the dig equivalent.
[21:12:23] havenwood: dn5: or: dig 'items', 0, 'owner', 'reputation'
[21:12:24] havenwood: dn5: if you don't want to return `nil` instead of blowing up if a part is missing
[21:12:25] dn5: that worked
[21:12:28] dn5: smathy:
[21:12:37] B1n4r10: has joined #ruby
[21:12:38] dn5: thank you guys
[21:12:38] smathy: Easy not to notice the array in there.
[21:12:41] dn5: would you mind telling me
[21:12:49] dn5: why its array once I parsed it
[21:13:03] smathy: dn5, what else could it be?
[21:13:28] havenwood: dn5: It just is an Array. That's what it was before it became JSON and that's what it stays parsed out of JSON.
[21:13:45] smathy: dn5, oh right, so the parsing turns it into native ruby objects.
[21:14:27] dn5: ahh makes sense
[21:14:30] havenwood: dn5: Consider: require 'json'; JSON.parse({items: []}.to_json)
[21:14:33] replay: has joined #ruby
[21:16:33] giz|work: has joined #ruby
[21:21:56] firstdayonthejob: has joined #ruby
[21:23:18] ascarter: has joined #ruby
[21:25:58] Gasher: has joined #ruby
[21:27:38] Lucky_ABA: has joined #ruby
[21:34:11] nettoweb: has joined #ruby
[21:35:02] naf: has joined #ruby
[21:37:52] naf_: has joined #ruby
[21:40:10] d0nn1e: has joined #ruby
[21:41:45] naf_: has joined #ruby
[21:43:20] arnonhongklay: has joined #ruby
[21:43:25] nankyokusei: has joined #ruby
[21:43:51] davedev24: has joined #ruby
[21:44:15] jaguarmagenta: has joined #ruby
[21:44:50] davedev24: has joined #ruby
[21:45:29] freerobby: has joined #ruby
[21:46:40] dminuoso: has joined #ruby
[21:48:13] leea: has joined #ruby
[21:49:07] dc4: has joined #ruby
[21:49:45] tAn: has joined #ruby
[21:50:53] jmignault: has joined #ruby
[21:52:56] dn5: is this correct syntax: str.empty? return
[21:53:05] dn5: as in if str is empty then exit the function
[21:53:34] havenwood: dn5: return if str.empty?
[21:53:43] blackmes1: has joined #ruby
[21:54:10] tummy: has joined #ruby
[21:54:15] Parko: has joined #ruby
[21:54:24] havenwood: dn5: or the less-used: str.empty? and return
[21:54:40] dn5: havenwood: not gonna lie, thats beautiful
[21:55:01] dn5: the first solution
[21:55:06] dn5: readable
[21:55:17] dn5: thank you
[21:55:24] whathapp_: has joined #ruby
[21:57:04] ThatsNotJack: has joined #ruby
[21:57:33] workmad3: has joined #ruby
[21:59:38] dhruvasagar: has joined #ruby
[22:00:46] naf: has joined #ruby
[22:01:46] chipotle: has joined #ruby
[22:01:58] rkazak: has joined #ruby
[22:03:09] dikaio: has joined #ruby
[22:03:15] jgpawletko: has joined #ruby
[22:06:11] axl_: has joined #ruby
[22:06:28] jmignault: has joined #ruby
[22:08:12] ncthom91: has joined #ruby
[22:08:19] jgpawletko_: has joined #ruby
[22:08:52] macsteps: has joined #ruby
[22:09:01] heinrich5991: has joined #ruby
[22:09:54] hutch34: has joined #ruby
[22:11:06] karapetyan: has joined #ruby
[22:11:07] SCHAAP137: has joined #ruby
[22:12:25] korzybski: has joined #ruby
[22:12:52] tummy: has joined #ruby
[22:13:44] mattwashere: has joined #ruby
[22:14:46] Moosashi: has joined #ruby
[22:15:40] jgt: has joined #ruby
[22:15:41] naf: has joined #ruby
[22:15:52] pwnd_nsfw: has joined #ruby
[22:15:53] karapetyan: has joined #ruby
[22:16:22] Rodya_: has joined #ruby
[22:17:25] Infra-Red: has joined #ruby
[22:20:04] blandflakes: has joined #ruby
[22:20:14] dn5: ok guys
[22:20:18] dn5: I've got a big issue
[22:20:20] pilne: has joined #ruby
[22:20:26] dn5: I have a case statement
[22:20:31] dn5: in when
[22:20:32] Infra-Red: has joined #ruby
[22:20:34] dn5: i have a regex
[22:20:45] dn5: as in when /\/so .+/
[22:21:02] dn5: that will match literal /so "anything"
[22:21:08] dn5: i need anything
[22:21:12] dn5: no quotes are set
[22:21:28] dn5: oh Im stupid
[22:21:33] dn5: I could just remove first three chars
[22:22:34] bruce_lee: I'm reltively new to ruby, ".*" matches anything, ".+" matches anything but at least one character
[22:22:46] jgpawletko: has joined #ruby
[22:22:47] bruce_lee: ^^as far as I know
[22:22:47] sdothum: has joined #ruby
[22:22:53] dn5: bruce_lee: indeed
[22:23:21] dn5: good to note
[22:23:53] havenwood: http://rubular.com
[22:24:35] dn5: how do I set the when in a stirng
[22:24:40] dn5: as a string*
[22:24:43] dn5: into some variable
[22:25:11] dn5: I need to store it somewhere first before I can use it
[22:26:05] dn5: havenwood: got any idea?
[22:26:09] ledestin: has joined #ruby
[22:26:14] duncannz: has joined #ruby
[22:26:24] havenwood: dn5: I didn't follow what you have and what you want?
[22:26:33] bruce_lee: myStringVar = $1
[22:26:54] havenwood: dn5: Gist an example?
[22:26:56] bruce_lee: first this is needed: /\/so (.+)/
[22:26:59] dn5: havenwood: I have a case statement with when that will match above regex
[22:27:00] shevy: bruce_lee come on!!!
[22:27:03] duncannz: has joined #ruby
[22:27:47] dn5: oh forget it
[22:27:56] dn5: cant think properly
[22:27:58] duncannz: has joined #ruby
[22:28:03] neo_: has joined #ruby
[22:28:24] havenwood: dn5: Showing example data rather than explaining it would probably explain better. Sleep is good!
[22:28:54] havenwood: "it is easier for humans to understand complex data compared with complex logic"
[22:29:10] dn5: havenwood: haha you are right
[22:29:59] Rodya_: has joined #ruby
[22:30:05] dn5: >> str = "/so something" case str when /\/so .+/ puts "Good."
[22:30:06] ruby[bot]: dn5: # => /tmp/execpad-8a9074f4e693/source-8a9074f4e693:2: syntax error, unexpected keyword_case, expecting ke ...check link for more (https://eval.in/598077)
[22:30:20] futilegames: has joined #ruby
[22:30:54] dn5: >> str = "/so something" case str when /\/so .+/ puts "Good." end end
[22:30:56] ruby[bot]: dn5: # => /tmp/execpad-fbde9c15c8f2/source-fbde9c15c8f2:2: syntax error, unexpected keyword_case, expecting ke ...check link for more (https://eval.in/598078)
[22:31:07] dn5: something like that, Im not that good with irb
[22:31:08] dn5: but it works
[22:31:15] dn5: and I figured it out
[22:32:49] axl_: has left #ruby: ()
[22:34:19] zenlot6: has joined #ruby
[22:36:05] dn5: offtopic: Does anyone know of Ox0dea or something like that
[22:36:11] dn5: he was hanging out on this channel
[22:36:13] dn5: for a long time
[22:36:57] havenwood: dn5: yup yup
[22:37:26] dn5: hes a cool guy
[22:37:31] dn5: havent seen him here lately
[22:38:23] solocshaw: has joined #ruby
[22:38:40] jottr: has joined #ruby
[22:40:07] karapetyan: has joined #ruby
[22:40:12] cdg: has joined #ruby
[22:40:33] minimalism: has joined #ruby
[22:41:56] electrostat: has joined #ruby
[22:44:21] shevy: adaedra kicked him and I guess he did not come back again
[22:45:01] electrostat: has joined #ruby
[22:45:34] maucar: has joined #ruby
[22:46:03] pragmatism: has joined #ruby
[22:46:07] dn5: did he deserve it
[22:46:57] dn5: also thats sad to hear, he was one of these I could remember helping everyone no matter what
[22:47:23] dminuoso: has joined #ruby
[22:47:44] shevy: lemme search the channel log
[22:48:04] dn5: thank you
[22:48:49] bmurt: has joined #ruby
[22:50:04] shevy: hmmm the IRC log interface confuses me
[22:50:31] dn5: what is it
[22:50:55] shevy: well I searched for the nick
[22:51:06] shevy: got some results... it appears to be that this one was the last http://irclog.whitequark.org/ruby/2015-05-23#12861454
[22:51:15] shevy: but I am quite sure that this was not the last ... so now I am confused
[22:52:28] rkazak: has joined #ruby
[22:52:31] fuuuuuUCKKKKK: has joined #ruby
[22:52:52] shevy: well I am out of ideas but I am quite sure that this was not the last. I just can't find any more recent ones from #ruby with Ox0dea
[22:53:15] Neobenedict: has joined #ruby
[22:53:41] dn5: interesting
[22:53:43] dn5: somethings fishy
[22:54:19] Radar: !badnick fuuuuuUCKKKKK
[22:54:19] ruby[bot]: +bb fuuuuuUCKKKKK!*@*$#ruby-banned *!*@host109-147-239-143.range109-147.btcentralplus.com$#ruby-banned
[22:54:20] sanjayu: has joined #ruby
[22:54:24] c355E3B: has joined #ruby
[22:54:31] gizless: has joined #ruby
[22:55:17] gizless: has joined #ruby
[22:55:48] gizless: has joined #ruby
[22:56:01] kfrer: has joined #ruby
[22:58:50] Moosashi: has joined #ruby
[22:59:53] solocshaw: has joined #ruby
[23:00:15] leea: has joined #ruby
[23:01:27] giz|work|2: has joined #ruby
[23:01:38] shevy: dn5 hmm ok I guess it's just my memory that was wrong then
[23:02:27] dn5: shevy: hmm
[23:02:33] dn5: I dont know
[23:02:38] Guest433: has joined #ruby
[23:02:48] shevy: it's like Finding Waldo!
[23:03:10] dn5: hahahha
[23:04:27] Radar: http://logs.ryanbigg.com/p/Ox0dea
[23:04:31] skade: has joined #ruby
[23:04:37] hahuang61: has joined #ruby
[23:05:20] fclausen: has joined #ruby
[23:06:37] agent_white: Radar: I may or may not have linked that to shevy as well.
[23:06:49] agent_white: Your little logging subsection is too nice though :)
[23:06:49] shevy: agent_white found waldo
[23:06:59] Radar: agent_white: :)
[23:07:23] shevy: dn5 so agent_white found it there http://logs.ryanbigg.com/ruby?date=2016-05-12#5666753 - my memory was wrong! Ox0dea was active for about +2 more weeks or so
[23:07:49] dn5: shevy: yep Im checking it right now
[23:07:55] shevy: and also I fail with webinterfaces in general
[23:08:25] agent_white: This feels like a murder mystery! weee!
[23:08:28] agent_white: ACTION giggles
[23:08:36] shevy: irclog.whitequark.org was especially weird... "143 pages"... text overflowing onto the next line making it hard to click on the blue links 139 140 141 142 etc...
[23:09:46] tAn: has joined #ruby
[23:10:04] dn5: agent_white: you truly are an agent!
[23:10:08] dn5: feds, we got feds
[23:10:24] dn5: still not a reason to kick him
[23:10:25] agent_white: Nah agent_black hasn't been around lately, luckily.
[23:10:30] dn5: i mean, that man got some respect
[23:11:30] pilne: has joined #ruby
[23:13:09] shevy: I always associate agent_white with the Matrix
[23:13:24] mistermocha: has joined #ruby
[23:14:40] mistermocha: has joined #ruby
[23:15:01] speakingcode: has joined #ruby
[23:19:12] karapetyan: hi, why in array i have not expected vaues?
[23:19:13] karapetyan: https://gist.github.com/karapetyan/cd0ebeb6df967d8eaaea712984e15173
[23:20:22] drbrain: dn5: those are the channel rules
[23:22:38] shevy: karapetyan can you break down what happens
[23:23:10] tossup: has joined #ruby
[23:23:12] nb_bez___: has joined #ruby
[23:23:55] macsteps: has joined #ruby
[23:24:02] unvexp: has joined #ruby
[23:24:42] naf: has joined #ruby
[23:24:47] baweaver: all - if you wish to discuss meta-channel information like bans, please go to #ruby-offtopic
[23:25:19] baweaver: karapetyan: What is your expected input, output, and what happens that is not expected?
[23:25:25] unvexp: has joined #ruby
[23:26:04] mistermocha: has joined #ruby
[23:26:49] karapetyan: shevy: after loop finished "result" array must have "current" variable values for all previous iterations
[23:26:52] karapetyan: https://gist.github.com/karapetyan/cd0ebeb6df967d8eaaea712984e15173#file-excel-rb-L23
[23:27:03] yude: has joined #ruby
[23:27:30] karapetyan: instead i have https://gist.github.com/karapetyan/cd0ebeb6df967d8eaaea712984e15173#file-excel-rb-L24 only last "current variable" value
[23:28:08] pawnbox: has joined #ruby
[23:28:13] tossup: I have a question, I'm new on Ruby and Have downloaded a gems for zip files but are in vendor_ruby folder and when i call her with: > require 'zip' says that "LoadError: cannot load such file -- zip". What's wrong?
[23:28:39] tossup: havenwood: I have a question, I'm new on Ruby and Have downloaded a gems for zip files but are in vendor_ruby folder and when i call her with: > require 'zip' says that "LoadError: cannot load such file -- zip". What's wrong?
[23:29:02] dn5: tossup: did you install the gem globally? also dont repeat your questions
[23:29:08] dn5: and dont ping
[23:31:24] havenwood: tossup: how'd you install the gem? using bundler?
[23:31:31] tossup: Just I installed her with apt "apt install ruby-zip"
[23:32:11] dn5: im leaving you
[23:32:16] dn5: gnight everyone
[23:32:35] tossup: That was wrong?
[23:33:45] tossup: How should be?
[23:34:01] neo_: has joined #ruby
[23:34:07] naf: has joined #ruby
[23:34:21] bhaak: has joined #ruby
[23:34:24] havenwood: tossup: https://github.com/rubyzip/rubyzip
[23:34:25] macsteps: has joined #ruby
[23:34:34] havenwood: tossup: sudo gem install rubyzip
[23:34:35] jmignault: has joined #ruby
[23:34:50] workmad3: has joined #ruby
[23:34:53] havenwood: (if that's the gem you want, actually)
[23:35:07] jhack: has joined #ruby
[23:36:11] tossup: A lot of thanks friends, excuse me, I'm new
[23:36:25] tossup: I resolved it
[23:37:02] havenwood: tossup: welcome!
[23:37:05] postmodern: has joined #ruby
[23:37:10] mistermocha: has joined #ruby
[23:37:12] solocshaw1: has joined #ruby
[23:39:31] moei: has joined #ruby
[23:39:40] karapetyan: any help, folks?)
[23:39:49] nando293921: has joined #ruby
[23:40:24] shevy: karapetyan I have not been able to grasp it either, it may be easier if you can distill it to something easy
[23:40:42] shevy: like "given input -> desired output"
[23:40:52] ulluh: has joined #ruby
[23:41:57] jhack: has joined #ruby
[23:44:17] nankyokusei: has joined #ruby
[23:45:06] skweek: has joined #ruby
[23:47:37] ruby[bot]: -b *!*@gateway/web/freenode/ip.93.91.194.11$#ruby-banned
[23:47:40] Es0teric: has joined #ruby
[23:48:09] dminuoso: has joined #ruby
[23:49:30] ensyde: has joined #ruby
[23:49:50] karapetyan: shevy: https://repl.it/C71K
[23:50:06] koooge: has joined #ruby
[23:50:19] tossup: Then if I import for example the Library of base64 and i want to see the methods of that class how do it? For example on Python: > import base64 and then dir(base64) that show me all the base64 functions
[23:50:58] tossup: On ruby how would be?
[23:51:14] karapetyan: generate_names should return array ["B","C","D","E","F"], instead i got ["F","F","F","F","F"]
[23:51:41] zeroDi: has joined #ruby
[23:54:42] solocshaw: has joined #ruby
[23:54:55] karapetyan: shevy: is problem described well?
[23:57:42] jmignault: has joined #ruby
[23:59:43] leea: has joined #ruby