« Back to channel list

#ruby - 03 December 2017

« Back 1 day Forward 1 day »
[00:01:01] kinbiko: has joined #ruby
[00:02:16] jrabe: has joined #ruby
[00:05:29] kapil___: has joined #ruby
[00:05:39] goyox86: has joined #ruby
[00:08:37] |ifei5good: has joined #ruby
[00:09:00] jxv: has joined #ruby
[00:09:32] |ifei5good: has joined #ruby
[00:11:05] i32inf: has joined #ruby
[00:11:34] voldemar: has joined #ruby
[00:14:34] Cohedrin: has joined #ruby
[00:14:59] rendekarf: has joined #ruby
[00:15:08] rfdavid: has joined #ruby
[00:15:10] alveric: has joined #ruby
[00:18:16] rendekarf: has left #ruby: ("Leaving")
[00:20:52] waveprop: has joined #ruby
[00:21:31] ctrlaltdev: has joined #ruby
[00:22:00] voldemar: has joined #ruby
[00:24:20] cdg: has joined #ruby
[00:24:49] bkxd: has joined #ruby
[00:28:12] voldemar: has joined #ruby
[00:29:30] bkxd_: has joined #ruby
[00:38:12] bkxd: has joined #ruby
[00:39:12] astronavt: has joined #ruby
[00:39:50] kinbiko: has joined #ruby
[00:39:59] voldemar: has joined #ruby
[00:42:15] jtdoncas_: has joined #ruby
[00:49:06] ur5us: has joined #ruby
[00:49:29] voldemar: has joined #ruby
[00:53:39] houhoulis: has joined #ruby
[00:54:12] muelleme: has joined #ruby
[00:56:14] voldemar: has joined #ruby
[00:56:57] i32inf: has joined #ruby
[01:08:05] voldemar: has joined #ruby
[01:10:18] enterprisey: has joined #ruby
[01:18:42] apparition: has joined #ruby
[01:23:00] voldemar: has joined #ruby
[01:24:34] truenito: has joined #ruby
[01:25:30] cdg: has joined #ruby
[01:31:58] bkxd: has joined #ruby
[01:33:25] cschneid: has joined #ruby
[01:34:11] ur5us: has joined #ruby
[01:35:19] voldemar: has joined #ruby
[01:41:10] truenito1: has joined #ruby
[01:46:50] astronavt: has joined #ruby
[01:48:05] voldemar: has joined #ruby
[01:54:54] muelleme: has joined #ruby
[02:00:03] thinkpad: has joined #ruby
[02:02:10] voldemar: has joined #ruby
[02:03:13] mim1k: has joined #ruby
[02:04:21] ahrs: has joined #ruby
[02:04:28] i32inf: has joined #ruby
[02:08:04] bkxd: has joined #ruby
[02:11:20] nowhere_man: has joined #ruby
[02:12:15] voldemar: has joined #ruby
[02:18:00] voldemar: has joined #ruby
[02:22:25] christiandsg: has joined #ruby
[02:23:22] jnyw: has joined #ruby
[02:26:18] rouge: has joined #ruby
[02:29:08] charliesome: has joined #ruby
[02:31:15] bkxd: has joined #ruby
[02:32:01] mikecmpbll: has joined #ruby
[02:32:05] voldemar: has joined #ruby
[02:33:47] bkxd: has joined #ruby
[02:35:57] bkxd: has joined #ruby
[02:36:03] christiandsg: has joined #ruby
[02:36:51] bkxd: has joined #ruby
[02:39:23] gizmore|2: has joined #ruby
[02:39:33] safetypin: has joined #ruby
[02:42:41] bmurt: has joined #ruby
[02:44:30] oetjenj: has joined #ruby
[02:48:17] xcesariox: has joined #ruby
[02:48:42] oetjenj: has joined #ruby
[02:50:02] safetypin: has joined #ruby
[02:50:09] mfb2: has joined #ruby
[02:51:18] shinnya: has joined #ruby
[02:53:59] kobain: has joined #ruby
[02:56:13] d^sh: has joined #ruby
[02:57:08] bkxd: has joined #ruby
[03:00:16] cadillac_: has joined #ruby
[03:00:57] bmurt: has joined #ruby
[03:02:30] voldemar: has joined #ruby
[03:04:24] lexruee: has joined #ruby
[03:04:55] sspreitz: has joined #ruby
[03:05:29] kinbiko: has joined #ruby
[03:06:10] millz: has joined #ruby
[03:08:19] voldemar: has joined #ruby
[03:11:29] blackwind_123: has joined #ruby
[03:15:58] kinbiko: has joined #ruby
[03:16:30] voldemar: has joined #ruby
[03:22:44] i32inf: has joined #ruby
[03:23:25] kinbiko: has joined #ruby
[03:25:11] voldemar: has joined #ruby
[03:28:29] cadillac_: has joined #ruby
[03:30:45] kinbiko: has joined #ruby
[03:32:51] orbyt_: has joined #ruby
[03:35:40] voldemar: has joined #ruby
[03:38:09] kinbiko: has joined #ruby
[03:44:14] konsolebox: has joined #ruby
[03:44:40] voldemar: has joined #ruby
[03:46:18] safetypin: has joined #ruby
[03:46:33] Guest15148: has joined #ruby
[03:47:13] Guest15148: Hi every one
[03:47:26] Guest15148: I have a question for you
[03:47:49] Guest15148: do every project on github , that have a Gemfile is a ruby project ?
[03:48:35] baweaver: Not necessarily. It only means that it has some Ruby dependencies.
[03:49:09] baweaver: That said, how one qualifies something as a Ruby project is a bit up to interpretation
[03:49:13] baweaver: Rails projects are most certainly Ruby based but tend to have far more CSS / JS / HTML than actual Ruby code
[03:49:21] baweaver: So the short answer is: it depends
[03:49:49] kinbiko: has joined #ruby
[03:49:50] nofxx: has joined #ruby
[03:50:42] Guest15148: So is their other way to say if a project is a ruby project ?
[03:53:05] voldemar: has joined #ruby
[03:56:00] baweaver: Guest15148: why the interest?
[03:56:14] baweaver: I mean, is a Ruby project one which has Ruby in it?
[03:56:21] baweaver: or perhaps one that is primarily Ruby?
[03:56:28] baweaver: or one built with primarily Ruby tools?
[03:56:39] baweaver: It gets to be vague after a certain point
[03:57:06] Guest15148: yes primarily Ruby
[03:57:09] kinbiko: has joined #ruby
[03:58:17] nofxx1: has joined #ruby
[03:58:18] Guest15148: but even if they do not have ruby as the primary language(on github) as you said
[03:59:36] cschneid: has joined #ruby
[04:02:40] voldemar: has joined #ruby
[04:03:38] mim1k: has joined #ruby
[04:04:39] kinbiko: has joined #ruby
[04:05:22] safetypin: has joined #ruby
[04:05:58] raul782: has joined #ruby
[04:09:10] voldemar: has joined #ruby
[04:14:57] uZiel: has joined #ruby
[04:15:15] voldemar: has joined #ruby
[04:15:47] blackwind_123: has joined #ruby
[04:17:43] RickHull: Guest15148: if a project is 90% C, 5% Bash, and 5% Ruby, would you consider it a Ruby project?
[04:17:50] RickHull: it's open to interpretation
[04:17:51] ledestin: has joined #ruby
[04:18:20] cschneid: has joined #ruby
[04:18:59] RickHull: Guest15148: what is the significance of whether a project is considered a "Ruby project"? is there some larger goal?
[04:19:57] ResidentBiscuit: has joined #ruby
[04:20:38] PresidentBiscuit: has joined #ruby
[04:22:56] kinbiko: has joined #ruby
[04:26:37] Guest15148: RickHull: I don't know about the percentage
[04:27:45] Guest15148: could we say for example if the percentage of ruby files is < x % than it is not a ruby project ?
[04:27:56] RickHull: in general, no
[04:28:08] RickHull: it's open to interpretation -- there are no rules
[04:28:12] RickHull: it's not a well-defined category
[04:28:19] Guest15148: the goal is to study the ruby community on github
[04:28:34] RickHull: I would decide on a % threshold
[04:28:54] RickHull: and you should be able to query github for projects which are > 50% ruby code
[04:29:17] Guest15148: i found some ruby project with only 23% !
[04:29:30] RickHull: how do you know it's a ruby project?
[04:29:49] kinbiko: has joined #ruby
[04:29:52] Guest15148: this is the question
[04:29:57] Guest15148: ah manually ?
[04:30:06] RickHull: you probably want to come up with a scoring function
[04:30:10] voldemar: has joined #ruby
[04:30:42] RickHull: here are some good indicators: 1. % of code which is ruby (maybe ignore html / css in this calculation)
[04:30:54] RickHull: 2. if there is a Gemfile or *.gemspec in project root
[04:31:21] RickHull: 3. if there is a Rakefile in project root
[04:31:42] RickHull: 3. if the README mentions ruby or gem or bundler
[04:32:09] RickHull: 4. if github considers it a ruby project
[04:32:37] RickHull: e.g. https://github.com/rickhull?utf8=%E2%9C%93&tab=repositories&q=&type=source&language=ruby
[04:33:34] RickHull: I would start with #4 -- you should be able to get this info on per-repo basis from the github API
[04:34:00] Guest15148: but there is some projects that have Gemfile/Rakefile but are not ruby project , (for ex : https://github.com/RestKit/RestKit )
[04:34:31] Guest15148: yes I took all the ones that have ruby as first language
[04:34:34] RickHull: github does not consider a ruby project
[04:34:47] RickHull: er, does not consider it -- RestKit -- a ruby project
[04:35:10] Guest15148: now i for the others that have some ruby files, I want to say if they are ruby project or not
[04:35:46] Guest15148: filtring by Gemfile/Rakfile, give some projects that are not ruby p
[04:35:55] konsolebox: has joined #ruby
[04:36:01] RickHull: I would first split all github repos into: github does/doesn't consider it a ruby project
[04:36:17] RickHull: then look for disqualifiers in each group
[04:36:19] kinbiko: has joined #ruby
[04:36:37] RickHull: so if github does consider it a ruby project, maybe it really isn't according to e.g. my indicators 1-3
[04:36:50] RickHull: and if github doesn't consider it a ruby project, maybe it really is according to 1-3
[04:37:17] RickHull: but likely the original split will give you way more data to chew on than you can handle
[04:38:31] gix: has joined #ruby
[04:39:38] Guest15148: I have 102579 projects that have some ruby files, but ruby is not primary language on github
[04:41:23] RickHull: so now score them according to indicators 1-3
[04:41:56] Guest15148: Could a ruby project not having Gemfile/Rakfile/.gemspec files
[04:42:12] RickHull: e.g. https://github.com/rickhull/traveller_rpg
[04:42:18] blackwind_123: has joined #ruby
[04:42:26] RickHull: though it will have two of those soon :)
[04:42:50] konsolebox: has joined #ruby
[04:43:11] RickHull: you will probably want to have a filter that takes filenames and decides if it is code based on file extension
[04:43:29] RickHull: e.g. ignore *.txt *.html *.css *.md
[04:43:41] RickHull: for calculating which percentage of code is ruby
[04:43:44] voldemar: has joined #ruby
[04:44:04] RickHull: or just use github's calc
[04:44:18] RickHull: not sure how it works
[04:45:01] RickHull: classification is hard, let's go machine learning ;)
[04:45:25] Guest15148: maybe the files sizes for each language
[04:46:27] xlegoman: has joined #ruby
[04:48:15] kinbiko: has joined #ruby
[04:49:08] raul782: has joined #ruby
[04:55:19] nchambers: has joined #ruby
[04:55:27] voldemar: has joined #ruby
[04:55:44] kinbiko: has joined #ruby
[04:57:49] Guest15148: RickHull: Tnks
[04:59:02] RickHull: good luck :)
[05:01:35] christiandsg: has joined #ruby
[05:01:53] Cohedrin: has joined #ruby
[05:03:04] kinbiko: has joined #ruby
[05:09:25] voldemar: has joined #ruby
[05:10:26] kinbiko: has joined #ruby
[05:11:47] lizard2010: has joined #ruby
[05:17:41] kinbiko: has joined #ruby
[05:20:35] c0ncealed: has joined #ruby
[05:21:12] safetypin: has joined #ruby
[05:23:40] voldemar: has joined #ruby
[05:25:00] kinbiko: has joined #ruby
[05:26:55] jamesaxl: has joined #ruby
[05:29:17] voldemar: has joined #ruby
[05:32:25] kinbiko: has joined #ruby
[05:33:51] bmurt: has joined #ruby
[05:34:51] bkxd: has joined #ruby
[05:38:25] konsolebox: has joined #ruby
[05:38:30] kinbiko: has joined #ruby
[05:39:40] voldemar: has joined #ruby
[05:43:40] kapil___: has joined #ruby
[05:45:34] Technodrome: has joined #ruby
[05:50:04] mfb2: has joined #ruby
[05:50:47] mfb2_: has joined #ruby
[05:51:17] kapil___: I have a = [ [ 1, 2, 3], [ 4, 5, 6] ] b = [ A, B, C, D, E, F] I want c = [ [ { A: 1 }, { B: 2 }, { C: 3 } ], [ { D: 4 }, { E : 5 }, { F: 6 } ]
[05:51:26] kapil___: How can I do it?
[05:51:35] kinbiko: has joined #ruby
[05:52:02] voldemar: has joined #ruby
[05:59:02] kinbiko: has joined #ruby
[05:59:30] voldemar: has joined #ruby
[06:03:32] christiandsg: has joined #ruby
[06:04:13] mim1k: has joined #ruby
[06:06:52] nickjj_: has joined #ruby
[06:08:58] kinbiko: has joined #ruby
[06:12:51] bkxd: has joined #ruby
[06:13:57] bkxd: has joined #ruby
[06:14:30] voldemar: has joined #ruby
[06:14:59] kinbiko: has joined #ruby
[06:18:33] tobiasvl: kapil___: do what?
[06:18:47] tobiasvl: oh sorry, didn't see that "I want" part
[06:20:27] ruby[bot]: -bb urk187!*@*$#ruby-fix-your-connection *!*@pool-98-113-93-25.nycmny.fios.verizon.net$#ruby-fix-your-connection
[06:21:21] uZiel: has joined #ruby
[06:22:25] kinbiko: has joined #ruby
[06:24:42] kapil___: plz help on my above question.
[06:24:51] mjolnird: has joined #ruby
[06:26:17] bkxd: has joined #ruby
[06:28:00] voldemar: has joined #ruby
[06:34:00] konsolebox: has joined #ruby
[06:35:22] kinbiko: has joined #ruby
[06:37:51] RickHull: kapil___: start with b.zip a.flatten
[06:38:02] plexigras: has joined #ruby
[06:38:24] RickHull: well, maybe that isn't the best first step -- but it can give you an idea
[06:39:08] bkxd: has joined #ruby
[06:39:58] RickHull: kapil___: is this a homework question? also I see you are asking in multiple channels
[06:40:07] kapil___: its not in shape i want
[06:40:10] voldemar: has joined #ruby
[06:40:38] kapil___: no i must need it to go ahed in my project.
[06:41:08] shinnya: has joined #ruby
[06:41:39] kapil___: https://www.irccloud.com/pastebin/HQCVBnBw/
[06:41:40] ruby[bot]: kapil___: as I told you already, please use https://gist.github.com
[06:42:55] kinbiko: has joined #ruby
[06:46:30] kapil___: RickHull: Any idea how to do this?
[06:49:18] bkxd: has joined #ruby
[06:49:30] RickHull: sure. result = []; b.zip(a.flatten).each { |(k, v)| # ...
[06:50:15] kinbiko: has joined #ruby
[06:52:09] kapil___: but what's next?
[06:52:20] kapil___: https://repl.it/repls/AwkwardMonumentalEskimodog
[06:52:49] RickHull: >> a = [ [ 1, 2, 3], [ 4, 5, 6] ]; b = [ 'A', 'B', 'C', 'D', 'E', 'F']; [b.zip(a.flatten).reduce([]) { |memo, (k,v)| memo << { k => v } }]
[06:52:50] ruby[bot]: RickHull: # => [[{"A"=>1}, {"B"=>2}, {"C"=>3}, {"D"=>4}, {"E"=>5}, {"F"=>6}]] (https://eval.in/912188)
[06:53:13] RickHull: kapil___: why aren't you using gist for pastes?
[06:54:05] voldemar: has joined #ruby
[06:54:57] kapil___: https://gist.github.com/kapilpipaliya/05745f889ed233f95721ef6fd076fbac
[06:57:40] kinbiko: has joined #ruby
[06:58:55] Cohedrin: has joined #ruby
[06:59:01] konsolebox: has joined #ruby
[07:00:39] uZiel: has joined #ruby
[07:04:34] voldemar: has joined #ruby
[07:06:35] ur5us: has joined #ruby
[07:11:34] kinbiko: has joined #ruby
[07:12:06] konsolebox: has joined #ruby
[07:15:34] voldemar: has joined #ruby
[07:16:10] aupadhye: has joined #ruby
[07:17:13] lexruee: has joined #ruby
[07:18:47] mikecmpbll: has joined #ruby
[07:18:48] cschneid: has joined #ruby
[07:18:58] kinbiko: has joined #ruby
[07:24:17] konos5: has joined #ruby
[07:25:21] konos5_: has joined #ruby
[07:26:20] kinbiko: has joined #ruby
[07:27:18] mtkd: has joined #ruby
[07:27:35] konsolebox: has joined #ruby
[07:28:07] voldemar: has joined #ruby
[07:29:21] KeyJoo: has joined #ruby
[07:30:18] kapil___: i just want to add each b element in appropriate a.
[07:30:56] kapil___: sorry not seen your reduce example
[07:31:24] RickHull: >> a = [ [ 1, 2, 3], [ 4, 5, 6] ]; b = [ 'A', 'B', 'C', 'D', 'E', 'F']; [b.zip(a.flatten).reduce([]) { |memo, (k,v)| memo + [{ k => v }] }]
[07:31:25] ruby[bot]: RickHull: # => [[{"A"=>1}, {"B"=>2}, {"C"=>3}, {"D"=>4}, {"E"=>5}, {"F"=>6}]] (https://eval.in/912189)
[07:31:45] RickHull: (my previous example was mutating memo, which is bad form)
[07:31:54] blackwind_123: has joined #ruby
[07:34:01] kapil___: thanks, now i want result in form of object a.
[07:35:06] RickHull: the fun part is figuring it out!
[07:36:21] RickHull: you probably won't be using flatten
[07:37:40] voldemar: has joined #ruby
[07:39:59] kapil___: i am not expart can you write it?
[07:40:11] kinbiko: has joined #ruby
[07:41:11] kapil___: looking cool.. learned new methods..
[07:41:16] yeticry: has joined #ruby
[07:41:49] konsolebox: has joined #ruby
[07:47:39] kinbiko: has joined #ruby
[07:48:49] RickHull: def c(a, b); result = []; a.each { |ary| result << []; ary.each { |i| b_idx = (result.length - 1) * ary.length + result.last.length; result.last << { b[b_idx] => i } } }; result
[07:48:52] cschneid: has joined #ruby
[07:49:04] RickHull: something like that is a way to step through it. play around with it
[07:51:21] mfb2: has joined #ruby
[07:52:33] kapil___: thanks a lot its working...
[07:52:48] voldemar: has joined #ruby
[07:54:01] kapil___: can you explain it?
[07:54:32] RickHull: a.each { |ary| -- we will iterate over the contents of a -- which is 2 arrays
[07:55:17] RickHull: ary.each { |i| -- iterate over each array
[07:55:35] cdg: has joined #ruby
[07:55:36] RickHull: so the first time this runs, i will be 1, then 2, then 3
[07:55:49] RickHull: then we calculate how to get the b value
[07:55:54] RickHull: we figure out the b_idx
[07:56:10] cschneid: has joined #ruby
[07:56:13] RickHull: then we make a hash with a single key -- the b value based on b_idx
[07:56:19] RickHull: with a value of i
[07:56:25] RickHull: (which came from a)
[07:56:40] RickHull: and we accumulate those in result, which will match the structure of a
[07:58:03] kapil___: understanding it. thanks a lot..
[08:01:33] kinbiko: has joined #ruby
[08:03:04] voldemar: has joined #ruby
[08:04:32] mim1k: has joined #ruby
[08:05:21] nofxx: has joined #ruby
[08:09:00] kinbiko: has joined #ruby
[08:11:08] cschneid: has joined #ruby
[08:11:34] voldemar: has joined #ruby
[08:13:16] bkxd: has joined #ruby
[08:13:57] rabajaj: has joined #ruby
[08:16:23] kinbiko: has joined #ruby
[08:19:14] voldemar: has joined #ruby
[08:21:10] odinsbane: has joined #ruby
[08:23:00] guille-moe: has joined #ruby
[08:23:44] kinbiko: has joined #ruby
[08:25:50] pdcawley: has joined #ruby
[08:26:14] pdcawley: has left #ruby: ()
[08:27:05] voldemar: has joined #ruby
[08:30:44] yabbes: has joined #ruby
[08:30:53] kinbiko: has joined #ruby
[08:32:10] Xano__: has joined #ruby
[08:34:16] odinsbane: darix: I have a 3.22 rails app, and if I want to upgrade to 4.2, it is recommended that I go through 4.0 first. 4.0 doesn't work with ruby 2.4 though. So, it is a bit of a catch 22.
[08:35:30] bkxd: has joined #ruby
[08:36:11] konsolebox: has joined #ruby
[08:36:53] voldemar: has joined #ruby
[08:38:15] kinbiko: has joined #ruby
[08:42:53] voldemar: has joined #ruby
[08:43:00] rippa: has joined #ruby
[08:44:37] kapil___: RickHull: can you explain ? b_idx = (result.length - 1) * ary.length + result.last.length;
[08:45:40] kinbiko: has joined #ruby
[08:46:10] konsolebox: has joined #ruby
[08:48:08] RickHull: b_idx needs to go 0..5
[08:48:19] voldemar: has joined #ruby
[08:48:29] RickHull: but since we choose a's structure, we have two loops, nested
[08:48:57] RickHull: the outer loop, if we had an idx, would be 0 then 1
[08:49:08] RickHull: the inner loop, the idx would go 0..2
[08:49:24] RickHull: how can we get 0..5 from 0..1 and 0..2
[08:49:39] kapil___: i understand it.
[08:49:56] RickHull: 0..1 * 3 + 0..2 yields 0..5
[08:50:41] RickHull: I am calculating the outer and inner idx from result's length
[08:51:00] kapil___: so we not need an index
[08:51:03] baweaver: Is that the real data?
[08:51:13] RickHull: but it could be provided directly by e.g. a.each.with_index { |ary, outer_idx| ary.each.with_index { i, inner_idx|
[08:51:17] baweaver: there may well be a simpler way depending on what you're actually doing here.
[08:51:19] InfinityFye: has joined #ruby
[08:51:35] RickHull: I believe it :)
[08:51:40] baweaver: especially if it involves ActiveRecord somehow
[08:51:42] kapil___: the real data is very big
[08:51:56] kapil___: B is active record
[08:52:01] baweaver: What's the shape of the data or the code that gets it?
[08:52:32] baweaver: Note that it will make it a lot easier for us to help you if you open with what the actual code is
[08:52:49] kapil___: I want to loop through all active record column. and add extra columns between it i defined it in yaml file array
[08:52:59] kinbiko: has joined #ruby
[08:53:35] baweaver: what's the end game on this one?
[08:53:35] reber: has joined #ruby
[08:54:09] kapil___: because that fields are calculated columns. i want generator to generate fields for it
[08:54:19] tobiasvl: http://xyproblem.info
[08:54:51] kapil___: no i want to explain you
[08:54:54] voldemar: has joined #ruby
[08:55:01] baweaver: and why do you want the calculated fields generated?
[08:55:02] baweaver: what are you attempting to do with them>
[08:55:08] baweaver: I'm only asking questions to try and get to what your problem is
[08:55:27] kapil___: I want to arrange columns in grid.
[08:55:37] kapil___: so i defined a grind in yaml file
[08:55:38] dionysus70: has joined #ruby
[08:55:45] baweaver: you ask us very specific questions related to why you did something when there may be a much simpler way about 5-10 decisions before you got to that point
[08:55:51] kapil___: i want to take each row from yaml file .
[08:56:22] baweaver: Why a YAML file? Are you doing this for your views?
[08:57:02] baweaver: and is this done for each row?
[08:57:03] kapil___: I made a generator to generate view. i need to define grid row and how many columns in each row in yaml file
[08:57:10] uZiel: has joined #ruby
[08:57:31] baweaver: chances are you don't need that
[08:57:47] baweaver: Can you show us the code you use to generate this in a gist?
[09:00:24] kinbiko: has joined #ruby
[09:00:57] kapil___: https://gist.github.com/kapilpipaliya/f2f82849ab9da53bd8defc4a42404492
[09:03:42] mim1k: has joined #ruby
[09:05:29] christiandsg: has joined #ruby
[09:07:45] kinbiko: has joined #ruby
[09:09:02] kapil___: 1. I want to add some columns to active record columns.
[09:09:14] n13z: has joined #ruby
[09:09:16] kapil___: 2. I want to add grid like data for them
[09:09:29] voldemar: has joined #ruby
[09:10:45] ShekharReddy: has joined #ruby
[09:11:47] baweaver: It seems like you're conflating about 3-4 different techs and doing things very very oddly
[09:12:27] baweaver: honestly it would take a very long time to understand everything you're doing here and why you're likely doing it
[09:12:37] TomyLobo2: has joined #ruby
[09:13:38] cdg: has joined #ruby
[09:13:50] baweaver: The best idea is to take a few steps back. You're making this exceptionally more complicated than it needs to be
[09:14:28] kapil___: ok. you are right.
[09:15:02] baweaver: Rails supplies data as JSON. React consumes the data as JSON. React then makes the table and the virtual attributes (totals)
[09:15:03] cdg_: has joined #ruby
[09:15:04] kapil___: I made it complex but can u understand above. is it not good
[09:15:06] kinbiko: has joined #ruby
[09:15:52] kapil___: but i want to add columns between
[09:16:02] baweaver: that would be a virtual attribute
[09:16:03] kapil___: virtual columns
[09:16:11] baweaver: one that is not in the database, but is generated from its data
[09:17:06] kapil___: i want to write somewhere in generator to generate fieds for it
[09:17:21] baweaver: How are the fields calculated?
[09:17:26] bkxd: has joined #ruby
[09:17:30] baweaver: What is the simplest way you can express it?
[09:18:01] baweaver: I'm going to leave you with that because you really do need to go through some of this on your own
[09:18:03] kapil___: suppose i have qty and pcs . i want a virtual column after pcs, called weight
[09:18:19] kapil___: sorry total pcs = qty * pcs
[09:18:40] cdg: has joined #ruby
[09:18:47] marr: has joined #ruby
[09:22:35] kinbiko: has joined #ruby
[09:22:37] voldemar: has joined #ruby
[09:28:05] bkxd: has joined #ruby
[09:29:54] kinbiko: has joined #ruby
[09:31:28] mtkd: has joined #ruby
[09:32:50] iamarun: has joined #ruby
[09:34:32] muelleme: has joined #ruby
[09:35:00] voldemar: has joined #ruby
[09:37:19] kinbiko: has joined #ruby
[09:40:40] voldemar: has joined #ruby
[09:44:33] kinbiko: has joined #ruby
[09:46:58] pdcawley: has joined #ruby
[09:47:46] d^sh: has joined #ruby
[09:48:07] voldemar: has joined #ruby
[09:49:30] bkxd: has joined #ruby
[09:51:52] kinbiko: has joined #ruby
[09:55:46] i32inf: has joined #ruby
[09:57:19] voldemar: has joined #ruby
[09:57:46] claudiuinberlin: has joined #ruby
[09:59:09] TomyLobo2: I wanna generate spreadsheet column names (A..Z, then AA and so on). Apparently 'A'..'ZZZZ' is adequate for that. Now, how do I pluck an item from the middle of that?
[09:59:20] kinbiko: has joined #ruby
[09:59:42] TomyLobo2: i mean without generating the entire thing until that point
[09:59:59] TomyLobo2: >> ('A'..'ZZZZ').first(27).last
[10:00:01] ruby[bot]: TomyLobo2: # => "AA" (https://eval.in/912207)
[10:00:36] bkxd: has joined #ruby
[10:03:46] Emmanuel_Chanel: has joined #ruby
[10:05:51] voldemar: has joined #ruby
[10:06:44] kinbiko: has joined #ruby
[10:11:19] konsolebox: has joined #ruby
[10:11:21] bkxd: has joined #ruby
[10:12:25] govg: has joined #ruby
[10:13:02] tobiasvl: TomyLobo: what about this
[10:13:03] tobiasvl: >> ('A'..'ZZZZ').lazy.class; first(27).last
[10:13:04] ruby[bot]: tobiasvl: # => undefined method `first' for main:Object (NoMethodError) ...check link for more (https://eval.in/912208)
[10:13:10] tobiasvl: >> ('A'..'ZZZZ').lazy.first(27).last
[10:13:19] ruby[bot]: tobiasvl: # => "AA" (https://eval.in/912209)
[10:13:24] tobiasvl: sorry, pasted an itermediate thing I had in irb first
[10:13:49] kinbiko: has joined #ruby
[10:14:06] TomyLobo: >> ('A'..'ZZZZ').lazy.first(27).class
[10:14:07] ruby[bot]: TomyLobo: # => Array (https://eval.in/912210)
[10:14:15] TomyLobo: is that still lazy?
[10:16:51] tobiasvl: well, no, it's not STILL lazy, but the first enumerator was lazy so it only yielded the first 27
[10:17:12] tobiasvl: but those first 27 aren't lazy, they have been yielded
[10:18:53] voldemar: has joined #ruby
[10:21:10] kinbiko: has joined #ruby
[10:22:05] nicesignal: has joined #ruby
[10:26:25] voldemar: has joined #ruby
[10:28:30] kinbiko: has joined #ruby
[10:35:54] kinbiko: has joined #ruby
[10:36:45] Cohedrin: has joined #ruby
[10:39:35] voldemar: has joined #ruby
[10:40:00] InfinityFye: has left #ruby: ("Leaving")
[10:43:05] bkxd: has joined #ruby
[10:43:41] TomyLobo: tobiasvl, are you saying that is not what happens without the .lazy?
[10:49:34] clemens3: has joined #ruby
[10:50:48] miskatonic: has joined #ruby
[10:52:21] mfb2: has joined #ruby
[10:54:41] voldemar: has joined #ruby
[10:55:45] konsolebox: has joined #ruby
[10:56:34] _sfiguser: has joined #ruby
[11:01:59] i32inf: has joined #ruby
[11:03:40] sameerynho: has joined #ruby
[11:03:51] _sfiguser: has left #ruby: ("Leaving")
[11:05:00] biberu: has joined #ruby
[11:05:23] voldemar: has joined #ruby
[11:06:05] Cohedrin: has joined #ruby
[11:08:47] csk157: has joined #ruby
[11:09:07] tobiasvl: TomyLobo: yes
[11:10:25] TomyLobo: tobiasvl, so you're saying that ('A'..'ZZZZ').first(27) generates the entire range and then only returns the first 27?
[11:10:39] TomyLobo: I'm asking because that does sound like a bad approach to things
[11:11:45] charliesome: has joined #ruby
[11:14:40] kinbiko: has joined #ruby
[11:15:44] nadie: has joined #ruby
[11:16:11] bkxd: has joined #ruby
[11:16:34] voldemar: has joined #ruby
[11:17:28] naprimer4: has joined #ruby
[11:30:20] voldemar: has joined #ruby
[11:30:29] lexruee: has joined #ruby
[11:33:09] zautomata1: has joined #ruby
[11:35:38] despai: has joined #ruby
[11:35:59] mtkd: has joined #ruby
[11:37:41] bkxd: has joined #ruby
[11:38:35] voldemar: has joined #ruby
[11:39:33] mohabaks: has joined #ruby
[11:40:10] KeyJoo: has joined #ruby
[11:41:26] mohabaks: has joined #ruby
[11:43:29] bkxd: has joined #ruby
[11:46:52] voldemar: has joined #ruby
[11:46:58] konsolebox: has joined #ruby
[11:49:25] nowhere_man: has joined #ruby
[11:51:34] mikecmpbll: has joined #ruby
[11:53:18] quobo: has joined #ruby
[11:56:32] tobiasvl: well that's why lazy exists
[11:57:51] bkxd: has joined #ruby
[11:58:00] voldemar: has joined #ruby
[12:04:50] tomphp: has joined #ruby
[12:04:58] pdcawley: has joined #ruby
[12:05:14] pdcawley: has left #ruby: ()
[12:07:37] goyox86: has joined #ruby
[12:10:03] despai: has joined #ruby
[12:10:50] voldemar: has joined #ruby
[12:12:15] linduxed: has joined #ruby
[12:17:17] rouge: has joined #ruby
[12:17:59] mohabaks: has joined #ruby
[12:20:50] i32inf: has joined #ruby
[12:26:20] cadillac_: has joined #ruby
[12:28:19] GodFather: has joined #ruby
[12:29:13] GodFather: has joined #ruby
[12:31:31] goyox86_: has joined #ruby
[12:32:34] dinfuehr: has joined #ruby
[12:35:41] tAn: has joined #ruby
[12:41:47] apparition: has joined #ruby
[12:44:50] pdcawley: has joined #ruby
[12:45:00] kinbiko: has joined #ruby
[12:45:59] mohabaks: has joined #ruby
[12:49:53] n13z: has joined #ruby
[12:52:55] mfb2: has joined #ruby
[12:58:35] kitsunenokenja: has joined #ruby
[13:00:18] despai_: has joined #ruby
[13:00:39] stealth[]: has joined #ruby
[13:03:21] jhass: anyone wants to guess how this interacts with Ruby's GC? https://blog.nelhage.com/post/transparent-hugepages/
[13:06:02] stealth[]: has joined #ruby
[13:06:28] guardianx: has joined #ruby
[13:07:07] christiandsg: has joined #ruby
[13:11:31] shinnya: has joined #ruby
[13:13:05] gnufied: has joined #ruby
[13:14:57] charliesome: has joined #ruby
[13:18:09] despai: has joined #ruby
[13:19:55] goepsilongo: has joined #ruby
[13:23:02] tao_: has joined #ruby
[13:24:27] livcd: has joined #ruby
[13:31:38] ctrlaltdev: has joined #ruby
[13:32:34] ibraheem4: has joined #ruby
[13:33:16] csk157: has joined #ruby
[13:33:23] despai_: has joined #ruby
[13:33:59] guille-moe: has joined #ruby
[13:36:45] Blaze_Boy: has joined #ruby
[13:38:45] halt: has joined #ruby
[13:40:38] mtkd: has joined #ruby
[13:47:37] despai: has joined #ruby
[13:56:04] despai_: has joined #ruby
[13:56:40] ibraheem4: has left #ruby: ()
[13:57:26] BTRE: has joined #ruby
[14:04:50] AnoHito: has joined #ruby
[14:17:47] despai: has joined #ruby
[14:22:21] miskatonic: has joined #ruby
[14:22:48] bmurt: has joined #ruby
[14:22:58] despai: has joined #ruby
[14:26:51] elphe: has joined #ruby
[14:32:36] despai: has joined #ruby
[14:34:27] csk157: has joined #ruby
[14:34:44] Asher1: has joined #ruby
[14:34:58] mim1k: has joined #ruby
[14:38:01] sepp2k: has joined #ruby
[14:44:37] charliesome: has joined #ruby
[14:52:48] bmurt: has joined #ruby
[14:54:02] truenito: has joined #ruby
[15:00:55] goyox86_: has joined #ruby
[15:01:02] KeyJoo: has joined #ruby
[15:02:37] chocoelho: has joined #ruby
[15:06:55] john__: has joined #ruby
[15:09:10] gr33n7007h: has joined #ruby
[15:11:44] voldemar: has joined #ruby
[15:13:08] cdg: has joined #ruby
[15:15:47] muelleme: has joined #ruby
[15:22:40] alex``: has joined #ruby
[15:28:52] bmurt: has joined #ruby
[15:29:28] dviola: has joined #ruby
[15:30:45] TomyLobo: >> (1..10000000000000000000000000000000000).first(3)
[15:30:51] ruby[bot]: TomyLobo: I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
[15:31:03] TomyLobo: okay, this returns instantly in pry
[15:31:16] TomyLobo: >> (1..100).first(3)
[15:31:22] ruby[bot]: TomyLobo: I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
[15:31:25] TomyLobo: ah, the bot is down
[15:31:55] havenwood: 1.upto(Float::INFINITY).first(3) #=> [1, 2, 3]
[15:32:25] havenwood: Written nicer as: 1.step.first(3)
[15:33:15] TomyLobo: yeah, well tobiasvl was telling me that first(1) would generate everything in a range and then return the first element
[15:33:45] TomyLobo: i would think that would cause a significant delay with a range covering 10000000000000000000000000000000000 integers
[15:34:21] havenwood: TomyLobo: It doesn't turn the whole Range into an Array.
[15:34:56] havenwood: TomyLobo: If you did a #map or #select, etc, it would. In that case #lazy would come in handy.
[15:35:19] TomyLobo: first yields, so lazy.first is useless, right?
[15:35:43] havenwood: TomyLobo: yeah, but you could #take
[15:36:02] havenwood: 1.step.lazy.map(&:abs2).take(3) #=> #<Enumerator::Lazy: ...>
[15:36:22] TomyLobo: what i want is the nth element of a range
[15:36:24] havenwood: 1.step.lazy.map(&:abs2).first(3) #=> [1, 4, 9]
[15:36:28] havenwood: TomyLobo: ah
[15:38:27] jxv: has joined #ruby
[15:38:30] TomyLobo: hmm, enumerators dont seem to have a "last" method
[15:38:43] safetypin: has joined #ruby
[15:39:05] TomyLobo: i guess they can only be enumerated in order
[15:41:41] truenito: has joined #ruby
[15:41:48] xlegoman: has joined #ruby
[15:43:24] lexruee: has joined #ruby
[15:51:23] despai: has joined #ruby
[15:53:25] isec: has joined #ruby
[15:53:53] mfb2: has joined #ruby
[15:53:58] Lyubo1: has joined #ruby
[15:55:10] voldemar: has joined #ruby
[15:55:40] christiandsg: has joined #ruby
[15:55:46] safetypin: has joined #ruby
[15:57:01] meadmoon: has joined #ruby
[15:59:20] truenito: has joined #ruby
[15:59:27] uZiel: has joined #ruby
[16:01:54] chocoelho: has joined #ruby
[16:02:01] dminuoso: havenwood: 1.step should have an awesome syntax like (1..)
[16:02:16] dminuoso: or more generally (1, 2..)
[16:03:01] dminuoso: [1, 2..] would work too, wouldnt mind having lazy arrays
[16:03:30] jhass: somehow I never needed .step in the real world though
[16:03:32] marr: has joined #ruby
[16:03:52] jhass: was only handy in challenges so far
[16:03:55] hello_dave: has joined #ruby
[16:06:52] dminuoso: jhass: It's actually a quite powerful abstraction
[16:07:19] dminuoso: 1.step(by: 2) is amazing for generating odd numbers
[16:07:26] dminuoso: or 2.step(by: 2) for even ones
[16:08:59] NL3limin4t0r: has joined #ruby
[16:13:54] TomyLobo: is anyone aware of a way to efficiently dump a 38 MB json string into an mssql TEXT column using tiny_tds?
[16:14:16] TomyLobo: remote database, or i would use openrowset or something
[16:15:16] TomyLobo: usually i'd use a prepared statement, but TinyTds::Client has no "prepare" method
[16:15:34] bmurt: has joined #ruby
[16:16:50] dminuoso: TomyLobo: What would a prepared statement help you with?
[16:17:14] dminuoso: All a prepared statement does is safe you re-parsing the query and generating a query plan.
[16:17:51] dminuoso: Would this 38 MiB string go into a single tuple?
[16:23:38] TomyLobo: it goes straight into the openjson() function, whose result then gets saved into a table
[16:24:21] TomyLobo: dminuoso, are you sure that's what a prepared statement does? that sounds a little inefficient
[16:24:52] TomyLobo: if it gets escaped and interpolated into the query and such
[16:26:17] minimalism: has joined #ruby
[16:27:32] TomyLobo: client.prepare('SELECT [key], value as value_json into savegame from OPENJSON(?)').execute(json) # basically what i'd do if prepared statements were available
[16:27:42] isec: has joined #ruby
[16:27:45] dminuoso: TomyLobo: You can usually create templated prepared statements that have placeholders (which incidentally can lead to inefficient query plans because the optimizer does not have all the information available)
[16:28:45] dminuoso: TomyLobo: But that is somewhat orthogonal to your problem.
[16:31:32] dminuoso: TomyLobo: Does the data go into a single row or not?
[16:32:13] TomyLobo: no, but that is not what you want to know :)
[16:32:42] TomyLobo: openjson turns that one parameter into n rows
[16:32:49] TomyLobo: it parses the top-level object basically
[16:33:18] TomyLobo: but what goes in is a single value
[16:34:07] TomyLobo: i could move the openjson to a separate statement, so that in the first statement, everything does go into a single row
[16:34:11] TomyLobo: if that changes anything
[16:35:21] csk157: has joined #ruby
[16:35:59] TomyLobo: client.prepare('SELECT ? as json into savegame_json').execute(json) # like that, or something similar
[16:37:40] dminuoso: TomyLobo: What would a prepared statement help you with exactly?
[16:37:52] dminuoso: Preparing a statement and immediately executing it is relatively pointless on its own.
[16:38:16] dminuoso: The whole idea of prepared statements is for queries that can't afford to re-parse or rebuild a new query plan.
[16:38:48] TomyLobo: well i would be more than happy if regular statements had support for placeholders and now that you mention it, i never checked whether they do
[16:39:09] dminuoso: (Say because you are hammering the database with the same query with a high frequency, or perhaps building the query plan is expensive (high degrees of join will do that)
[16:39:31] Asher: has joined #ruby
[16:39:51] dminuoso: I know it's sometimes abused for interpolation and sql escaping because the libraries suck and don't support it themselves.
[16:40:28] TomyLobo: ./savetodb.rb:14:in `execute': wrong number of arguments (given 2, expected 1) (ArgumentError)
[16:40:28] TomyLobo: client.execute("SELECT [key], value as value_json into savegame from OPENJSON(?)", json)
[16:42:08] TomyLobo: my point is kinda that parameters dont really get inserted into some kind of string, but that parser makes a note of the placeholder and takes data from the corresponding parameter instead of parsing it from the sql query string
[16:42:17] TomyLobo: the parser*
[16:42:50] uZiel: has joined #ruby
[16:43:00] TomyLobo: and with a 38 MB string, escaping and parsing the string can already be significantly slower than not doing it
[16:43:52] chocoelho: has joined #ruby
[16:43:56] dminuoso: TomyLobo: Is the performance of this relevant? Is losing a few hundred milliseconds make you lose any sleep?
[16:44:32] TomyLobo: also, using placeholders is doing it properly
[16:44:35] dminuoso: Because loading 38MiB from JSON into the database does not sound like something you would do frequently anyway. And if this is so performance critical, well go native and dont do this with some bizarre and badly written database adapter.
[16:44:48] dminuoso: Pick a proper database adapter then.
[16:45:25] mtkd: has joined #ruby
[16:45:37] TomyLobo: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-connect-query-ruby well microsoft suggests this one :)
[16:48:17] dminuoso: Pick a proper database then.
[16:49:04] dminuoso: TomyLobo: The code suggests that there is support for it in tiny_tds
[16:49:22] darix: also do the parsing and json querying in the DB
[16:49:35] dminuoso: darix: He is doing the parsing in the DB.
[16:50:36] dminuoso: TomyLobo: Oh actually no. It seems the underlying library has no support for it.
[16:51:04] TomyLobo: https://technet.microsoft.com/en-us/library/ms378754(v=sql.105).aspx the jdbc driver supports prepared statements, so it's not the database that is the problem.
[16:51:48] orbyt_: has joined #ruby
[16:52:09] dminuoso: TomyLobo: If the database forces you to use jdbc in order to gain access to sensible features, I'd say the database is a problem.
[16:52:09] TomyLobo: (also, why microsoft uses their own, horrible doc generator for java is beyond me)
[16:52:28] TomyLobo: dminuoso, the odbc driver is probably fine too
[16:53:00] TomyLobo: actually, why dont i use that... let me try
[16:53:09] despai: has joined #ruby
[16:56:06] TomyLobo: i even remember doing that once on a rubyinstaller ruby... so long ago ^^
[16:59:55] TomyLobo: i can only get to the source of that thing tomorrow... for now, escapes \o/
[17:00:46] i32inf: has joined #ruby
[17:02:31] TomyLobo: takes a good chunk of time...
[17:05:46] TomyLobo: yeah this takes more than a minute at least, so it's not usable. Since I've never tried it with prepared statements, I dont know if they'd improve the situation, though :)
[17:06:21] TomyLobo: might just be that the azure db is slow
[17:07:46] dn`_: has joined #ruby
[17:07:48] Blaze_Boy: has left #ruby: ("ERC (IRC client for Emacs 25.3.1)")
[17:10:00] techn1cs: has joined #ruby
[17:10:00] techn1cs: has joined #ruby
[17:11:36] despai: has joined #ruby
[17:12:32] FahmeF: has joined #ruby
[17:13:07] i32inf: has joined #ruby
[17:13:52] jtdoncas_: has joined #ruby
[17:27:46] miskatonic: has joined #ruby
[17:35:47] biox: has joined #ruby
[17:37:06] biox: has joined #ruby
[17:37:20] mohabaks: has joined #ruby
[17:39:41] csk157: has joined #ruby
[17:42:41] toogley: has joined #ruby
[17:43:07] biox: has joined #ruby
[17:44:06] toogley: I've created this Rakefile: https://github.com/neomutt/neomutt.github.io/blob/9bef0c7e0eeea7c95e6a3d651ce0937739423d28/Rakefile but rake throws an error saying "`block in <top (required)>'" (full log: https://travis-ci.org/neomutt/neomutt.github.io/builds/310932291?utm_source=github_status&utm_medium=notification )
[17:44:16] toogley: can someone explain me that error message?
[17:44:25] cdg: has joined #ruby
[17:44:30] toogley: https://stackoverflow.com/questions/6330657/what-does-top-required-mean-in-a-ruby-stack-trace is not really useful in that case
[17:46:51] csk157: has joined #ruby
[17:47:16] despai: has joined #ruby
[17:48:12] Xeago: has joined #ruby
[17:49:56] nowhere_man: has joined #ruby
[17:50:51] Xeago: has joined #ruby
[17:51:30] voldemar: has joined #ruby
[17:54:29] mfb2: has joined #ruby
[17:57:10] Xeago: has joined #ruby
[17:58:46] dminuoso: toogley: Is it possible that rake will abort if a shell command returns non-0 exit code?
[17:59:44] Technodrome: has joined #ruby
[18:01:10] toogley: dminuoso: hm, i try to investiagate. but then the error message wouldn't make sense
[18:01:14] dminuoso: toogley: it does.
[18:01:42] dminuoso: Well, I'd spect some Command failed with status (1): [nc -z localhost 2345...] at least
[18:01:58] dminuoso: But the <top ...> part makes sense, as the blocks being invoked are defined at top level scope.
[18:02:10] dminuoso: There's no classes, modules or defined functions involved.
[18:02:15] yqt: has joined #ruby
[18:02:42] ahurst: has joined #ruby
[18:02:46] ahurst: has left #ruby: ()
[18:02:56] dminuoso: toogley: https://gist.github.com/dminuoso/7b8578ee5e872fde9b720119de062ded this might be more obvious.
[18:03:20] dminuoso: It's just a block that appears in top level scope.
[18:03:32] despai: has joined #ruby
[18:05:24] selim: has joined #ruby
[18:06:14] Lyubo1: has joined #ruby
[18:07:40] Dimik: has joined #ruby
[18:11:12] cdg: has joined #ruby
[18:11:55] cschneid: has joined #ruby
[18:16:12] Xeago: has joined #ruby
[18:24:56] guille-moe: has joined #ruby
[18:34:52] goyox86: has joined #ruby
[18:36:18] NL3limin4t0r: has joined #ruby
[18:46:34] ogres: has joined #ruby
[18:48:45] Axy: has joined #ruby
[18:48:45] Axy: has joined #ruby
[18:51:06] ltem: has joined #ruby
[18:53:03] jtdoncas_: has joined #ruby
[18:53:24] Mia: has joined #ruby
[18:53:28] i8igmac: has joined #ruby
[18:54:45] i8igmac: im working with net-ssh. im trying to duplicate this client command from ssh
[18:54:53] i8igmac: ssh -f user@host 'uname -a'
[18:55:09] i8igmac: ssh -f user@host 'ping google.com'
[18:56:46] i8igmac: ssh -f user@host 'ping google.com > /dev/null'
[18:57:20] i8igmac: this will connect to the host, run a command in the background then disconnect from the host
[18:57:35] i8igmac: any ideas how this could be done with net-ssh
[18:58:27] dminuoso: i8igmac: Yes. It's done by looking at the documentation.
[18:58:51] i8igmac: well, i looked. i didnt see anything on forking exec
[18:59:02] hrg: has joined #ruby
[18:59:26] kies: has joined #ruby
[19:00:06] i8igmac: the only way i could background a process is using a separate application like screen
[19:00:15] despai: has joined #ruby
[19:00:51] dminuoso: i8igmac: There's various things you can do. The simplest solution would to just be using shell features () and &
[19:01:05] dminuoso: Or & and disown
[19:01:30] dminuoso: i.e. ssh.exec "(foo &)"
[19:02:12] dminuoso: If you need to track this (perhaps with a PID file) then either do it in raw sh, or you need to move the code to the remote server.
[19:02:49] dminuoso: i8igmac: Oh wait that should have been (setsid foo &)
[19:03:03] gix-: has joined #ruby
[19:03:04] i8igmac: yes, i have seen these kinds of examples
[19:03:05] dminuoso: Or foo & disown
[19:03:47] i8igmac: these examples depend on applications that may not exist
[19:05:23] dminuoso: i8igmac: disown at least is provided by sh/bash/zsh
[19:05:39] dminuoso: so (foo & disown) will get the job done
[19:06:42] dminuoso: Or mmm no I think disown is not enough, you may have to nohup it
[19:07:14] dminuoso: bah thats just disgusting
[19:08:29] dminuoso: i8igmac: nohup seems to be the simplest rigid solution (though that behavior on SIGHUP is not pretty)
[19:08:51] i8igmac: yah, thanks
[19:13:07] despai: has joined #ruby
[19:15:18] ozcanesen: has joined #ruby
[19:21:07] wilbert_: has joined #ruby
[19:27:50] alex``: has joined #ruby
[19:31:47] s3nd1v0g1us: has joined #ruby
[19:32:04] r0nin: has joined #ruby
[19:36:33] csk157: has joined #ruby
[19:43:09] uZiel: has joined #ruby
[19:46:41] nowhere_man: has joined #ruby
[19:47:53] mim1k: has joined #ruby
[19:48:48] Xiti: has joined #ruby
[19:54:57] Qommand0r: has joined #ruby
[19:56:24] gix: has joined #ruby
[19:58:43] despai: has joined #ruby
[19:59:48] Qommand0r: has joined #ruby
[20:01:45] tuelz: has joined #ruby
[20:03:04] JaccoP: has joined #ruby
[20:04:03] waveprop: has joined #ruby
[20:09:10] pdcawley: has joined #ruby
[20:09:27] pdcawley: has left #ruby: ()
[20:14:11] dinfuehr: has joined #ruby
[20:14:36] Exhiled: has joined #ruby
[20:15:01] wilbert_: has joined #ruby
[20:17:14] armando: has joined #ruby
[20:18:40] goyox86_: has joined #ruby
[20:21:17] cdg: has joined #ruby
[20:28:21] nowhere_man: has joined #ruby
[20:29:00] gbaptista: has joined #ruby
[20:30:02] TomyLobo: has joined #ruby
[20:30:08] KeyJoo: has joined #ruby
[20:30:35] rouge: has joined #ruby
[20:35:43] KeyJoo: has joined #ruby
[20:35:53] Cohedrin: has joined #ruby
[20:42:09] john__: has joined #ruby
[20:43:49] jamesaxl: has joined #ruby
[20:44:14] ozcanesen: has joined #ruby
[20:44:56] guille-moe: has joined #ruby
[20:45:13] tomphp: has joined #ruby
[20:50:55] ramfjord: has joined #ruby
[20:52:05] nowhereman: has joined #ruby
[20:53:25] friday: has joined #ruby
[20:55:25] mfb2: has joined #ruby
[20:58:05] JaccoP: has joined #ruby
[21:00:58] yabbes: has joined #ruby
[21:02:06] safetypin: has joined #ruby
[21:02:17] chocoelho: has joined #ruby
[21:03:39] TomyLobo: DBI.connect("DBI:ODBC:#{datasource}", "#{usr}","#{pwd}") gives me DBI::InterfaceError: Unable to load driver 'ODBC' (underlying error: uninitialized constant DBI::DBD::ODBC). I did "gem install dbi" and "gem install dbd-odbc"
[21:03:54] TomyLobo: I can only assume I am doing something wrong
[21:04:04] TomyLobo: however, what that is escapes me
[21:04:48] TomyLobo: http://gordonotspanish.blogspot.de/2010/02/resolved-uninitialized-constant.html this page is probably outdated. it suggests "require 'odbc'", which doesnt find anything either, and neither does "require 'dbd/odbc'"
[21:04:59] TomyLobo: or "require 'dbd-odbc'"
[21:09:08] TomyLobo: i was missing "gem install ruby-odbc", apparently
[21:15:25] goyox86_: has joined #ruby
[21:15:27] npgm: has joined #ruby
[21:19:19] voldemar: has joined #ruby
[21:21:28] thyRootest: has joined #ruby
[21:23:19] mikecmpbll: pretty dumb question but it's late and i'm tired :D if i have an each loop inside a while loop, what's the easiest way to move onto the next iteration of the while loop from in the each iteration
[21:26:17] tobiasvl: mikecmpbll: that's not really possible, but maybe you're looking for "break"? that'll break out of the "each" loop
[21:26:37] mikecmpbll: yeah, doh. means i have to complicate the code more than i'd like
[21:27:43] mikecmpbll: the break makes the iterator return nil so i need to check for that case then `next` the external loop
[21:29:34] sepp2k1: has joined #ruby
[21:29:55] Exagone313: has joined #ruby
[21:30:17] safetypin: has joined #ruby
[21:32:22] gbaptista: has joined #ruby
[21:32:27] skweek: has joined #ruby
[21:37:11] dminuoso: mikecmpbll: You can use catch/throw as a clutch for breaking out of deeply nested constrol structures.
[21:37:30] dminuoso: It's equivalent to goto, so use appropriately careful.
[21:39:26] sundhell: has joined #ruby
[21:39:43] safetypin: has joined #ruby
[21:40:03] dminuoso: I'd probably prefer this over some some; do_abort = true; break;
[21:48:24] mim1k: has joined #ruby
[21:50:49] sameerynho: has joined #ruby
[21:53:25] gbaptista: has joined #ruby
[21:59:24] goyox86: has joined #ruby
[22:00:25] jsaak: has joined #ruby
[22:00:26] mjolnird: has joined #ruby
[22:01:14] goyox86___: has joined #ruby
[22:06:10] mahlon: has joined #ruby
[22:10:10] kitsunenokenja: has joined #ruby
[22:12:58] mtkd: has joined #ruby
[22:13:07] kitsunenokenja: has left #ruby: ()
[22:13:27] DTZUZO: has joined #ruby
[22:13:58] armyriad: has joined #ruby
[22:18:31] r0nin: has joined #ruby
[22:29:36] ShalokShalom: has joined #ruby
[22:31:12] elphe: has joined #ruby
[22:31:26] csk157: has joined #ruby
[22:33:22] SirOliver: has joined #ruby
[22:33:32] nofxx: has joined #ruby
[22:33:48] ExtremeBunny25: has joined #ruby
[22:35:19] trezen: has joined #ruby
[22:36:11] kitsunenokenja: has joined #ruby
[22:41:04] silvermine: has joined #ruby
[22:55:39] mson: has joined #ruby
[22:56:00] r0nin: has joined #ruby
[22:57:54] Azure: has joined #ruby
[22:58:09] veeti: has joined #ruby
[22:59:36] quobo: has joined #ruby
[23:02:24] romain_t: has joined #ruby
[23:02:45] ramfjord: has joined #ruby
[23:03:17] jxv: has joined #ruby
[23:05:08] webguynow: has joined #ruby
[23:10:17] GodFather: has joined #ruby
[23:10:48] GodFather_: has joined #ruby
[23:12:16] _main_: has joined #ruby
[23:14:24] _main_: has joined #ruby
[23:14:42] Azure: has joined #ruby
[23:18:53] carnegie: has joined #ruby
[23:19:37] i32inf: has joined #ruby
[23:19:52] despai: has joined #ruby
[23:28:47] trezen: has left #ruby: ("Ex-Chat")
[23:32:43] carnegie_: has joined #ruby
[23:35:01] csk157: has joined #ruby
[23:38:58] nicesignal: has joined #ruby
[23:44:47] p0p0pr37: has joined #ruby
[23:44:48] p0p0pr37: has joined #ruby
[23:47:11] ShalokShalom: has joined #ruby
[23:47:57] ShalokShalom: has joined #ruby
[23:48:46] jnyw: has joined #ruby
[23:48:55] mim1k: has joined #ruby
[23:58:53] rouge: has joined #ruby