« Back to channel list

#ruby - 18 April 2016

« Back 1 day Forward 1 day »
[00:01:57] BSaboia: has joined #ruby
[00:02:58] sdothum: has joined #ruby
[00:02:59] tristanp_: has joined #ruby
[00:04:58] OTORelic2: has joined #ruby
[00:06:18] tristanp: has joined #ruby
[00:09:00] Moblin: has joined #ruby
[00:09:36] marxarelli: has joined #ruby
[00:10:04] ghr: has joined #ruby
[00:11:07] elifoster: has joined #ruby
[00:19:14] CloCkWeRX: has joined #ruby
[00:28:04] tristanp_: has joined #ruby
[00:32:20] tristanp: has joined #ruby
[00:34:06] al2o3-cr: has joined #ruby
[00:35:11] al2o3-cr: has joined #ruby
[00:35:59] al2o3-cr: has joined #ruby
[00:36:10] newjersey: has joined #ruby
[00:37:33] malcolmva: has joined #ruby
[00:40:30] al2o3-cr: has joined #ruby
[00:40:55] newjersey: has joined #ruby
[00:43:35] tristanp_: has joined #ruby
[00:46:21] tristanp: has joined #ruby
[00:47:47] hxegon: has joined #ruby
[00:49:11] tildes: has joined #ruby
[00:49:20] matthew0: has joined #ruby
[00:52:03] Musashi007: has joined #ruby
[00:52:46] william3: has joined #ruby
[00:54:44] tristanp: has joined #ruby
[00:54:45] ur5us: has joined #ruby
[00:56:01] joneshf-laptop: has joined #ruby
[00:59:53] CloCkWeRX: has left #ruby: ()
[01:00:21] zrl_: has joined #ruby
[01:00:23] al2o3-cr: has joined #ruby
[01:01:38] Dry_Lips: has joined #ruby
[01:01:39] Dry_Lips: has joined #ruby
[01:02:03] troter__________: has joined #ruby
[01:02:27] jpterry: has joined #ruby
[01:03:05] bhorn1|away: has joined #ruby
[01:03:14] csmb: has joined #ruby
[01:03:24] matthew0: has joined #ruby
[01:06:49] al2o3-cr: has joined #ruby
[01:08:32] olivierjanss: has joined #ruby
[01:09:26] ensyde: has joined #ruby
[01:10:27] Yiota: has joined #ruby
[01:11:32] Channel6: has joined #ruby
[01:13:55] GinoMan2440: has joined #ruby
[01:14:22] william3: has joined #ruby
[01:16:30] Cohedrin_: has joined #ruby
[01:17:25] IrishGringo_: has joined #ruby
[01:22:35] hxegon: has joined #ruby
[01:24:55] ekinmur: has joined #ruby
[01:26:28] goodroot: has joined #ruby
[01:27:08] ebookclic: has joined #ruby
[01:27:12] william3: has joined #ruby
[01:29:30] ebookclic: has left #ruby: ()
[01:30:57] spastorino: has joined #ruby
[01:34:59] houhoulis: has joined #ruby
[01:39:48] aurum_infide_: has joined #ruby
[01:41:28] sdothum: has joined #ruby
[01:45:40] Madplatypus: has joined #ruby
[01:45:41] CloCkWeRX: has joined #ruby
[01:46:11] DarkBushido: has joined #ruby
[01:46:11] DarkBushido: has joined #ruby
[01:48:39] nitrix-: has joined #ruby
[01:49:35] jokester: has joined #ruby
[01:52:04] IrishGringo: has joined #ruby
[01:52:09] AdamMeghji_: has joined #ruby
[01:54:08] shai: has joined #ruby
[01:54:19] baweaver: has joined #ruby
[01:55:50] shai: hi :) I wanted to test if the script is currently running past midnight (even by a fraction of a second) and before 6am (even by a fraction of a second). how can I do that? would "t.hour > 0 && t.hour < 6" suffice for testing this against Time.new ?
[01:56:15] shai: or would that only check against the hour, and not seconds, milliseconds, epoc etc?
[02:05:11] A124: has joined #ruby
[02:06:27] Cohedrin: has joined #ruby
[02:09:45] flashpoint9: has joined #ruby
[02:10:09] glacius: has left #ruby: ("http://quassel-irc.org - Chat comfortably. Anywhere.")
[02:10:50] zzach: has joined #ruby
[02:11:06] havenwood: shai: That'd be 1AM 'till before 5AM.
[02:11:21] BrunoSaboia: has joined #ruby
[02:12:01] danielpclark: has joined #ruby
[02:12:38] shai: havenwood, that's my problem. how else would I do it? maybe: "(0..6).cover? t.hour" for testing this against Time.new?
[02:13:34] stannard: has joined #ruby
[02:13:39] arescorpio: has joined #ruby
[02:14:03] havenwood: shai: There's a nanosecond at midnight that you'll probably manage better by disregarding. :P
[02:14:27] shai: havenwood, i don't follow ...
[02:15:04] Radar: shai: t.hour >= 0 ?
[02:15:12] Radar: Because you want it to run between midnight.
[02:15:29] Radar: t.hour > 0 would only work if t.hour is greater than 0, so it'd eval to true at 1am
[02:16:10] havenwood: shai: `t.hour < 6` means anything before 6AM, including the single nanosecond where it's midnight exactly
[02:17:11] bklane: has joined #ruby
[02:17:16] shai: so: t.hour >= 0 && t.hour < 6 ?
[02:17:24] havenwood: shai: I just mean leave that nanosecond be, since checking for #hour will take that nanosecond.
[02:17:28] havenwood: shai: Drop the first part.
[02:18:01] havenwood: shai: You can't have a negative hour.
[02:18:05] shai: so just: < 6 ?
[02:18:36] shai: havenwood, Time.new < 6 ?
[02:18:42] sonne: has joined #ruby
[02:18:44] havenwood: shai: The hour.
[02:18:49] shai: right ..
[02:19:00] shai: t.hour < 6
[02:19:23] havenwood: shai: That handles 'till 6.
[02:19:38] havenwood: Not including 6AM itself.
[02:19:41] shai: That would catch anything past midnight 'till 6am
[02:19:47] shai: yea, that works.
[02:20:00] tjbiddle: has joined #ruby
[02:20:19] havenwood: shai: Rails has more helper methods for time.
[02:20:21] shai: and if I later want to change it to 23-6? t.hour >= 23 && t.hour < 6 ?
[02:21:42] shai: havenwood, ^^
[02:21:44] havenwood: shai: yeah, for 11PM exactly to before 6AM
[02:22:29] shai: havenwood, ok .. this is brilliant! you've been super helpful :) you too Radar :)
[02:22:48] shai: i really appreciate it! thanks!
[02:23:05] havenwood: shai: you're welcome, happy coding!
[02:25:05] beawesomeinstead: has joined #ruby
[02:25:07] BSab: has joined #ruby
[02:27:32] gmci: has joined #ruby
[02:33:13] aurum_infide___: has joined #ruby
[02:34:41] dfdnatural: has joined #ruby
[02:36:19] altair118: has joined #ruby
[02:39:20] braincra-: has joined #ruby
[02:43:47] duncannz: has joined #ruby
[02:44:27] duncannz: has left #ruby: ()
[02:45:09] Ropeney: has joined #ruby
[02:45:49] d3d1rty: has joined #ruby
[02:46:31] Yiota: has joined #ruby
[02:47:39] d3d1rty: has left #ruby: ()
[02:49:44] nanoyak: has joined #ruby
[02:51:10] altair118: has joined #ruby
[02:53:10] nettoweb: has joined #ruby
[02:54:05] flashpoint9: has joined #ruby
[02:56:19] duncannz: has joined #ruby
[02:58:05] OTORelic2: has joined #ruby
[03:00:33] hxegon: has joined #ruby
[03:02:41] elifoster: has joined #ruby
[03:07:32] LoneHerm_: has joined #ruby
[03:07:53] Channel6: has joined #ruby
[03:09:00] SilverKey: has joined #ruby
[03:12:42] braincras: has joined #ruby
[03:14:37] darkf_: has joined #ruby
[03:21:55] diegoviola: has joined #ruby
[03:26:19] pwnd_nsfw: has joined #ruby
[03:28:09] pawnbox: has joined #ruby
[03:28:14] Trynemjoel: has joined #ruby
[03:30:10] cibs: has joined #ruby
[03:32:05] SirCmpwn: has joined #ruby
[03:35:55] nettoweb: has joined #ruby
[03:37:57] jackjackdripper: has joined #ruby
[03:38:57] M-shine: has joined #ruby
[03:40:56] diego1: has joined #ruby
[03:40:59] Coldblackice_: has joined #ruby
[03:41:38] diego1: has joined #ruby
[03:42:49] ruby-lang097: has joined #ruby
[03:43:18] ruby243: has joined #ruby
[03:45:01] jackjackdripper: has joined #ruby
[03:45:05] william3: has joined #ruby
[03:45:47] Maletor: has joined #ruby
[03:46:36] A5101: has joined #ruby
[03:47:03] toretore: has joined #ruby
[03:47:11] gix: has joined #ruby
[03:47:15] baweaver: has joined #ruby
[03:48:19] bklane: has joined #ruby
[03:53:57] ur5us: has joined #ruby
[03:58:25] OTORelic2: has joined #ruby
[03:59:27] jaguarmagenta: has joined #ruby
[04:05:33] ur5us_: has joined #ruby
[04:07:26] SilverKey: has joined #ruby
[04:08:28] shevy: baweaver lol
[04:08:41] shevy: that dam logs
[04:11:12] kareeoleez: has joined #ruby
[04:12:47] lxsameer: has joined #ruby
[04:15:32] yfeldblum: has joined #ruby
[04:16:13] stannard: has joined #ruby
[04:17:07] Mon_Ouie: has joined #ruby
[04:17:48] benlieb: has joined #ruby
[04:19:30] BTRE: has joined #ruby
[04:20:29] Olipro_: has joined #ruby
[04:21:18] CloCkWeRX: has joined #ruby
[04:21:22] bronson: has joined #ruby
[04:22:00] rfv: has joined #ruby
[04:22:01] jhill: has joined #ruby
[04:22:22] Amnez777: has joined #ruby
[04:22:55] kareeole_: has joined #ruby
[04:23:31] rbennacer: has joined #ruby
[04:23:44] PedramT: has joined #ruby
[04:24:22] rbennacer: has joined #ruby
[04:25:17] rbennacer: has joined #ruby
[04:26:23] Alina-malina: has joined #ruby
[04:29:03] ur5us: has joined #ruby
[04:31:54] tax: has joined #ruby
[04:32:02] pikajude: has joined #ruby
[04:32:16] Maletor: has joined #ruby
[04:33:45] rrichardsr3: has joined #ruby
[04:33:58] hxegon: has joined #ruby
[04:37:30] PedramT: has joined #ruby
[04:40:58] tubuliferous: has joined #ruby
[04:42:26] bklane: has joined #ruby
[04:43:15] marcdel: has joined #ruby
[04:43:46] MagePsycho_: has joined #ruby
[04:46:41] william3: has joined #ruby
[04:47:40] terlar: has joined #ruby
[04:52:38] Flaim: has joined #ruby
[04:52:44] Flaim: evenin folks
[04:53:40] Flaim: i'm getting an error when installing gitlab.. not sure if it's a gitlab error or a ruby error.
[04:54:41] Flaim: Could not find gem 'devise-two-factor (~> 2.0.0)' in any of the gem sources
[04:54:42] Flaim: listed in your Gemfile or available on this machine.
[04:56:27] toretore: Flaim: gist Gemfile
[04:57:18] navneet: has joined #ruby
[04:57:49] Flaim: i have not used ruby or installed any ruby apps previously (to my knowledge) so I'm not certain where I would find such a thing.
[04:59:20] toretore: how are you installing gitlab?
[05:00:23] Flaim: ubuntu sources
[05:00:28] Flaim: found it in /usr/share/gitlab
[05:00:33] Flaim: https://gist.github.com/goodwid/5163d1bfefe872a1143077d923af0336
[05:02:35] toretore: what are you doing when you get the error?
[05:03:08] Flaim: attempting to complete the installation w/ apt-get
[05:03:22] toretore: what does that mean exactly?
[05:03:29] Flaim: it stopped previously to initiate a manual setup of letsencrypt.
[05:03:48] Flaim: then i restart it again w/ 'apt-get install gitlab'
[05:04:08] Flaim: which restarts the install script
[05:04:26] toretore: that gemfile probably has 200 gems including dependencies :/ i'd be surprised if everything just worked
[05:04:28] djbkd_: has joined #ruby
[05:04:55] toretore: can you gist the entire output of the apt-get install?
[05:05:30] tildes: has joined #ruby
[05:06:07] Flaim: sure, standby
[05:06:26] toretore: couldn't you use this instead? http://doc.gitlab.com/omnibus/docker/
[05:07:13] toretore: i find docker to be a much tidier method of packaging large apps with so many dependent components like this
[05:07:43] Flaim: https://gist.github.com/goodwid/cb4ff873274ef6139ed62c3affe48ff1
[05:08:36] Flaim: I could, yes. that would not however aid me in troubleshooting ruby problems in the future :)
[05:10:07] toretore: device-two-factor exists, so it shouldn't give you that error https://rubygems.org/gems/devise-two-factor
[05:10:54] astrobunny: has joined #ruby
[05:10:55] BtcBen: has joined #ruby
[05:11:01] toretore: tbh i wouldn't even bother trying to install something like this directly
[05:11:10] toretore: it's bound to be problematic
[05:11:28] toretore: distributing ruby "apps" is a messy affair
[05:11:38] toretore: and docker solves that
[05:12:00] Flaim: true that
[05:13:55] toretore: and then you have an extra level on top with apt, so you can't see what's really going on, making it harder to debug
[05:14:18] Devalo: has joined #ruby
[05:14:52] yfeldblum: has joined #ruby
[05:15:06] smathy: has joined #ruby
[05:16:40] smathy: has joined #ruby
[05:16:47] Esya: has joined #ruby
[05:18:43] djbkd_: has joined #ruby
[05:21:23] altair118: has joined #ruby
[05:23:52] william3: has joined #ruby
[05:24:53] navneet: has joined #ruby
[05:29:27] madgen: has joined #ruby
[05:30:02] rbennacer: has joined #ruby
[05:30:45] aurum_infide: has joined #ruby
[05:36:20] Flaim: has left #ruby: ()
[05:37:21] agent_white: has joined #ruby
[05:38:31] tvw: has joined #ruby
[05:39:40] rbennacer: has joined #ruby
[05:45:44] lacrosse: has joined #ruby
[05:46:45] navneet_: has joined #ruby
[05:46:50] yfeldblum: has joined #ruby
[05:47:10] skweek: has joined #ruby
[05:50:48] BtcBen: has joined #ruby
[05:56:43] Infra-Red: has joined #ruby
[05:59:21] william3: has joined #ruby
[05:59:53] mark2: has joined #ruby
[06:00:42] jackjackdripper: has joined #ruby
[06:00:50] mark_66: has joined #ruby
[06:01:19] dionysus69: has joined #ruby
[06:03:25] Cohedrin_: has joined #ruby
[06:07:12] kareeoleez: has joined #ruby
[06:07:40] Infra-Red: has joined #ruby
[06:11:56] fedexo: has joined #ruby
[06:13:24] edwinvdgraaf: has joined #ruby
[06:13:54] tAn: has joined #ruby
[06:15:47] noServic1: has joined #ruby
[06:15:58] aganov: has joined #ruby
[06:17:21] marcdel: has joined #ruby
[06:17:40] stannard: has joined #ruby
[06:17:50] rbennacer: has joined #ruby
[06:19:11] ss_much: has joined #ruby
[06:20:15] pandaant: has joined #ruby
[06:20:27] bklane: has joined #ruby
[06:22:11] skweek: has joined #ruby
[06:22:27] rbennacer: has joined #ruby
[06:24:09] PedramT: has joined #ruby
[06:24:22] skweek: has joined #ruby
[06:25:46] dede: has joined #ruby
[06:27:06] pawnbox: has joined #ruby
[06:27:25] solars: has joined #ruby
[06:28:17] william3: has joined #ruby
[06:29:50] pawnbox: has joined #ruby
[06:33:17] aurum_infide_: has joined #ruby
[06:33:44] matt_d: Arcaire: lol
[06:39:36] krzkrz: has joined #ruby
[06:40:57] tAn: has joined #ruby
[06:41:37] noService: has joined #ruby
[06:44:17] ur5us: has joined #ruby
[06:44:51] diegoaguilar: has joined #ruby
[06:45:46] madgen: has joined #ruby
[06:46:01] rbennacer: has joined #ruby
[06:49:16] diegoaguilar: has joined #ruby
[06:53:38] diegoaguilar: has joined #ruby
[06:53:46] codecop: has joined #ruby
[06:54:06] codecop_: has joined #ruby
[06:55:57] rbennacer: has joined #ruby
[06:57:40] lomex: has joined #ruby
[06:58:35] william3: has joined #ruby
[07:00:33] Gasher: has joined #ruby
[07:01:30] biberu: has joined #ruby
[07:01:40] raeoks: has joined #ruby
[07:02:02] PedramT_: has joined #ruby
[07:05:28] Gasher^: has joined #ruby
[07:10:37] pawnbox: has joined #ruby
[07:11:55] brunto: has joined #ruby
[07:11:57] kits: has joined #ruby
[07:13:49] marxarelli: has joined #ruby
[07:14:45] Xeago: has joined #ruby
[07:15:07] rbennacer: has joined #ruby
[07:19:48] Couch: has joined #ruby
[07:20:59] aurum_infide: has joined #ruby
[07:21:52] vondruch: has joined #ruby
[07:22:17] LadyElusive: how does one go about performing a static installation of ruby?
[07:22:44] Infra-Red: has joined #ruby
[07:23:46] Infra-Red: has joined #ruby
[07:28:03] anisha: has joined #ruby
[07:28:17] antgel: has joined #ruby
[07:29:05] tenzan: has joined #ruby
[07:31:58] toretore: LadyElusive: what do you mean by static?
[07:32:17] noService: has joined #ruby
[07:32:57] andikr: has joined #ruby
[07:33:29] LadyElusive: meaning non-shared libraries
[07:34:08] ferr: has joined #ruby
[07:38:04] dgncn: has joined #ruby
[07:38:25] nando293921: has joined #ruby
[07:42:25] bruno-: has joined #ruby
[07:43:10] jaruga__: has joined #ruby
[07:45:32] joonty: has joined #ruby
[07:46:12] eatsfoobars: has joined #ruby
[07:46:48] tAn: has joined #ruby
[07:48:27] yfeldblum: has joined #ruby
[07:50:00] aufi: has joined #ruby
[07:50:24] navneet: has joined #ruby
[07:52:17] krzkrz: has joined #ruby
[07:53:00] eatsfoobars`: has joined #ruby
[07:54:31] DoubleMalt: has joined #ruby
[07:55:42] TvL: has joined #ruby
[08:02:10] TheHodge: has joined #ruby
[08:02:23] the_drow: has joined #ruby
[08:02:23] OTORelic2: has joined #ruby
[08:02:31] marr: has joined #ruby
[08:02:34] rbr: has joined #ruby
[08:03:13] pawnbox: has joined #ruby
[08:03:17] tagaulap: has joined #ruby
[08:05:51] rbr: has joined #ruby
[08:06:12] mikecmpbll: has joined #ruby
[08:09:30] whiteline: has joined #ruby
[08:10:00] araujo: has joined #ruby
[08:10:13] tuelz3: has joined #ruby
[08:11:27] nobitanobi: has joined #ruby
[08:12:53] bokayio: has joined #ruby
[08:13:18] tabakhase: has joined #ruby
[08:14:29] terlar: has joined #ruby
[08:18:47] manveru: LadyElusive: you mean a static ruby executable?
[08:19:17] stannard: has joined #ruby
[08:19:55] manveru: best to ask some folks that have done embedded ruby... but i think it's only possible with mruby, which isn't fully compatible with MRI :|
[08:20:50] rbr: has joined #ruby
[08:21:14] manveru: or https://github.com/phusion/traveling-ruby which simply bundles dependencies...
[08:21:29] jackdaniel: does ruby have an official spec, or MRI is a reference implementation?
[08:22:00] manveru: jackdaniel: there's an ISO standard for some parts of 1.9, afaicr
[08:22:47] LadyElusive: https://wiki.gentoo.org/wiki/Chroot
[08:22:50] jackdaniel: but it's not what's used?
[08:22:53] manveru: there's also the rubyspec project... but not sure where it is these days
[08:22:58] LadyElusive: wrong chan, sorry
[08:23:43] manveru: LadyElusive: you could always build ruby using nix, to make sure your linked libs are immutable
[08:23:50] jackdaniel: I'm reading right now http://rubinius.com/2014/12/31/matz-s-ruby-developers-don-t-use-rubyspec/ , where author states, that he drops the project due to mri implementation ignoring it (I've just started reading it)
[08:24:00] LadyElusive: manveru, nix?
[08:24:16] manveru: LadyElusive: http://nixos.org/nix/
[08:24:34] manveru: jackdaniel: ah right, i wasn't around much during that time :)
[08:26:55] pawnbox: has joined #ruby
[08:27:06] shredding: has joined #ruby
[08:27:20] drptbl: has joined #ruby
[08:29:01] jhass: jackdaniel: https://github.com/ruby/spec it's very active still though
[08:29:33] dn`_: has joined #ruby
[08:30:26] Elysia: Are IDE questions appropriate in this channel?
[08:31:18] tobiasvl: Elysia: I'd say "just ask", who knows until we hear the specific question
[08:31:29] rbennacer: has joined #ruby
[08:32:02] william3: has joined #ruby
[08:32:19] Elysia: I've been looking for a tool for ruby that sort of analyses rubydocs, but it seems RubyMine does nothing with comments before a method. In PHPStorm/Intelij you can use /** to have the IDE autocomplete a bit of documentation it knows, but I can't find such function within RubyMine
[08:32:25] Pumukel: has joined #ruby
[08:32:35] karapety_: has joined #ruby
[08:32:43] Elysia: it leads to me inconsisitently documenting my code at the very least, and was wondering if anyone has something like this integrated in their workflow
[08:33:10] jackdaniel: jhass: thanks
[08:33:39] shevy: Elysia don't know if many people use IDEs in ruby; in vim you can sort of enable this quite easily
[08:33:59] hk238: has joined #ruby
[08:34:26] shevy: you can get documentation via ri on the commandline; you can also enable this via ruby code, such as: RDoc::RI::Driver.process_args()
[08:36:39] pawnbox: has joined #ruby
[08:36:48] rbennacer: has joined #ruby
[08:37:38] senayar: has joined #ruby
[08:37:38] senayar: has joined #ruby
[08:38:21] rubyaw: has joined #ruby
[08:40:43] karapetyan: has joined #ruby
[08:41:01] karapetyan: has joined #ruby
[08:41:30] Elysia: ri is nice, but I think what I want is more along the lines of yard
[08:42:07] Elysia: and yeah, I haven't really tried vim's support for ruby yet, I often find the comfort of an IDE nice.
[08:42:50] jaguarmagenta: has joined #ruby
[08:43:05] shevy: I don't use vim myself, I settled for editors that allow me to be lazy
[08:43:08] bruno-: has joined #ruby
[08:43:22] Elysia: which are those? Atom? :P
[08:45:02] william3: has joined #ruby
[08:46:56] Xeago: has joined #ruby
[08:52:11] manveru: shevy: lazier than vim... what universe do you live in? :P
[08:52:14] Elysia: anyhow - as far as RubyMine is concerned, it only completes the tags, but doesn't seem to autogenerate snippets, or hint that documentation is missing
[08:52:38] Elysia: I guess I'll have to do with some hybrid monstrosity of using the terminal with my IDE :P
[08:53:23] yeticry: has joined #ruby
[08:53:43] mdw: has joined #ruby
[08:55:47] rbennacer: has joined #ruby
[08:58:03] sepp2k: has joined #ruby
[08:58:05] crayfishx: has joined #ruby
[08:58:41] shevy: manveru notepad++!!! sorta
[08:59:13] shevy: Elysia I actually haven't tested atom yet, havenwood seems to like it so that is a plus - havenwood can't be wrong!
[08:59:29] shevy: there is also sublime, which I have tested only briefly; jhass likes it so that is a plus
[08:59:32] Elysia: Atom's got some pretty good things going for it
[09:00:05] manveru: why would you use an editor that has trouble opening files larger than 4MB...
[09:00:08] Elysia: but the comfort of an IDE is something I've been preferring for larger projects, I don't know how well text editors do that
[09:00:37] Elysia: manveru: if your code is 4 MB in one file, maybe you've got a problem bigger than your editor :P
[09:00:56] manveru: if all your editor can edit is code, there's some issue :P
[09:01:11] Elysia: well I'm not expecting it to edit images
[09:01:45] manveru: what about xml/json/csv/whatever dumps, log files and the like?
[09:02:33] manveru: editing large files is a solved problem for about 40 years...
[09:02:44] Elysia: if this is about atom in particular, I remember that being horrible in earlier versions of atom
[09:02:54] Elysia: but it's supposedly improved a lot in the stable releases
[09:03:29] manveru: it still won't run in my terminal and it's still in JS though :P
[09:03:33] OTORelic2: has joined #ruby
[09:04:37] Elysia: ACTION hasn't used Atom a lot lately, considering he still has the Jetbrains family of IDEs at his leisure
[09:05:04] shevy: manveru don't let those XML files grow!!!
[09:05:31] shevy: some weeks ago, I actually found out that you can edit files on github
[09:05:34] shevy: that is a cool feature :)
[09:05:46] Elysia: shevy: sort of, it leads to a lot of bad things though :P
[09:06:05] manveru: at least protect your master branch :)
[09:06:09] platzhirsch: has joined #ruby
[09:06:12] shevy: Elysia yeah... it's not an IDE after all ;P
[09:06:35] shevy: but in theory, my thinking was like "cool... now I can update ruby-gnome old code in the browser!"
[09:07:35] nofxx: has joined #ruby
[09:08:11] manveru: i use it mostly to update things like docs and readmes
[09:08:14] drptbl_: has joined #ruby
[09:08:22] manveru: since it has the markdown preview, which is nice
[09:08:58] Elysia: yeah, it's good for quick fixes
[09:09:37] Elysia: I tend to appreciate it less when I see a pull request by some random guy that changes one character in some readme, though
[09:10:20] bollullera: has joined #ruby
[09:11:23] madgen: has joined #ruby
[09:12:59] moei: has joined #ruby
[09:13:53] bmf: has joined #ruby
[09:14:21] Alina-malina: has joined #ruby
[09:14:25] Amnez777: has joined #ruby
[09:14:46] rbennacer: has joined #ruby
[09:15:18] al2o3-cr: has joined #ruby
[09:16:09] DanyC: has joined #ruby
[09:18:26] poerror: has joined #ruby
[09:18:53] skislak: has joined #ruby
[09:19:12] last_staff: has joined #ruby
[09:22:21] chagel: has joined #ruby
[09:22:35] watersoul: has joined #ruby
[09:24:18] rbennacer: has joined #ruby
[09:26:00] poerror: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[09:28:48] kszarlej: has joined #ruby
[09:29:49] kszarlej: hey guys! I use Rails. Is there any possibility to make Rails ActiveRecord log in pure json so I can forward its logs to logstash?
[09:30:01] BtcBen: has joined #ruby
[09:30:07] kszarlej: I use logstashlogger but still many of the activejob logs are in plaintext
[09:30:16] kszarlej: I assume activerecord has its own logger
[09:30:32] rbr: has joined #ruby
[09:31:10] manveru: ?rails kszarlej
[09:31:10] ruby[bot]: kszarlej: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[09:31:41] neanderslob: has joined #ruby
[09:33:38] kszarlej: czy /j #RubyOnRails
[09:35:28] evidex: has joined #ruby
[09:40:50] Xeago: has joined #ruby
[09:41:40] navneet: has joined #ruby
[09:44:09] pawnbox: has joined #ruby
[09:44:20] bruno-: has joined #ruby
[09:46:23] A124: has joined #ruby
[09:46:33] krzkrz: has joined #ruby
[09:47:23] workmad3: has joined #ruby
[09:51:16] nettoweb: has joined #ruby
[09:53:39] baweaver: has joined #ruby
[09:53:52] Chagel_: has joined #ruby
[09:55:16] karapetyan: has joined #ruby
[09:57:51] Seich: has joined #ruby
[09:58:05] yfeldblum: has joined #ruby
[09:59:48] lightheaded: has joined #ruby
[10:00:17] ocbtec: has joined #ruby
[10:02:17] navneet: has joined #ruby
[10:03:41] TvL: has joined #ruby
[10:04:58] ICantCook: has joined #ruby
[10:07:22] rippa: has joined #ruby
[10:11:46] bollullera: has joined #ruby
[10:13:52] poerror: has joined #ruby
[10:20:26] karapetyan: has joined #ruby
[10:20:55] stannard: has joined #ruby
[10:21:57] shevy: Elysia does RubyMine have some terminal embedded btw? geany has it, sorta, with vte embedded. It's not really an IDE though, just a lightweight editor
[10:22:58] tuelz3: has joined #ruby
[10:23:47] bronson: has joined #ruby
[10:29:03] karapetyan: has joined #ruby
[10:31:20] bigkevmcd: has joined #ruby
[10:33:35] pawnbox: has joined #ruby
[10:33:39] navneet: has joined #ruby
[10:33:40] unshadow: has joined #ruby
[10:35:23] LoneHerm_: has joined #ruby
[10:36:38] unshadow: A qustion for you people. I have a class where one methos is looping and waiting for incoming connections. lets call it "server" for our example. When I do server.loop the class will block (ofcurse) which is fine, but, I want the class to respond to server.stop and\or server.reload etc.. how can I tell Kernel.loop to check if there are calls to the class before looping another time ? I also tried to do
[10:36:44] unshadow: fork do; the loop; end but it wont work, the class is still unresponsive
[10:38:59] navneet_: has joined #ruby
[10:40:00] Mon_Ouie: You could set a flag when you call #stop and just check the value of that flag before each iteration
[10:40:22] Mon_Ouie: Don't forget that you need some form of IPC (e.g. pipes) if you need to communicate to the process you created using fork
[10:41:48] william3: has joined #ruby
[10:41:49] Spondyl: has joined #ruby
[10:41:50] unshadow: Mon_Ouie: The flag is a good idea, thanks :)
[10:42:23] pawnbox: has joined #ruby
[10:43:32] jaguarmagenta: has joined #ruby
[10:43:32] rodfersou: has joined #ruby
[10:45:24] bruno-: has joined #ruby
[10:46:50] mikeiniowa: has joined #ruby
[10:47:27] navneet: has joined #ruby
[10:51:04] pandaant: has joined #ruby
[10:51:27] navneet: has joined #ruby
[10:52:49] PedramT: has joined #ruby
[10:57:02] pawnbox: has joined #ruby
[10:57:20] bkxd: has joined #ruby
[10:58:24] webus: has joined #ruby
[10:58:44] krzkrz: has joined #ruby
[10:59:15] navneet_: has joined #ruby
[10:59:47] arlek_: has joined #ruby
[11:00:46] Xeago: has joined #ruby
[11:00:51] Keltia_: has joined #ruby
[11:01:00] navneet_: has joined #ruby
[11:01:17] mozzarel1: has joined #ruby
[11:01:34] diprotic: has joined #ruby
[11:01:34] diprotic: has joined #ruby
[11:01:43] RIK: has joined #ruby
[11:02:01] paulgrmn1: has joined #ruby
[11:02:09] acerna_: has joined #ruby
[11:02:22] kapowaz_: has joined #ruby
[11:02:24] deeprave_: has joined #ruby
[11:02:25] navneet__: has joined #ruby
[11:02:28] jpinnix________: has joined #ruby
[11:02:31] deepak_: has joined #ruby
[11:02:32] jmcc__________: has joined #ruby
[11:02:45] Utkarsh: has joined #ruby
[11:02:48] manveru_: has joined #ruby
[11:03:05] Arcaire_: has joined #ruby
[11:03:13] fn2187_: has joined #ruby
[11:03:14] pelegreno_: has joined #ruby
[11:03:39] audiodude_: has joined #ruby
[11:03:45] nwhirschfeld_: has joined #ruby
[11:03:49] jtd_: has joined #ruby
[11:03:50] tonini_: has joined #ruby
[11:04:08] deavidsedice: has joined #ruby
[11:04:11] stryek: has joined #ruby
[11:04:12] ltd: has joined #ruby
[11:04:12] bitemyap1: has joined #ruby
[11:04:14] Karunamon|2: has joined #ruby
[11:04:19] Sigma01: has joined #ruby
[11:04:22] tvsutton_: has joined #ruby
[11:04:23] tommylommykins: has joined #ruby
[11:04:25] valeri_uF0: has joined #ruby
[11:04:27] perryh: has joined #ruby
[11:04:27] perryh: has joined #ruby
[11:04:28] drbrain_: has joined #ruby
[11:04:28] ec\_: has joined #ruby
[11:04:28] code_[BNC]: has joined #ruby
[11:04:29] janelleb_: has joined #ruby
[11:04:32] bakingbread: has joined #ruby
[11:04:37] brunto: has joined #ruby
[11:04:37] rickmasta: has joined #ruby
[11:04:37] irick: has joined #ruby
[11:04:43] hinbody_: has joined #ruby
[11:04:44] thomasfedb_: has joined #ruby
[11:04:44] xsdg_: has joined #ruby
[11:04:48] jterra_: has joined #ruby
[11:04:48] bnagy: has joined #ruby
[11:04:51] dostoyev1ky: has joined #ruby
[11:04:51] slash_ni1k: has joined #ruby
[11:04:52] trollface: has joined #ruby
[11:04:55] swistak35_: has joined #ruby
[11:04:58] peterhu_: has joined #ruby
[11:05:00] cfloare_: has joined #ruby
[11:05:00] droptone_: has joined #ruby
[11:05:05] nlsun_: has joined #ruby
[11:05:05] Phtm: has joined #ruby
[11:05:05] tabakhase__: has joined #ruby
[11:05:09] pocketprotector-: has joined #ruby
[11:05:10] mg^^: has joined #ruby
[11:05:17] kloeri__: has joined #ruby
[11:05:21] Edward123: has joined #ruby
[11:05:26] lyro`: has joined #ruby
[11:05:29] atmosx_alt: has joined #ruby
[11:05:30] arthurnn_: has joined #ruby
[11:05:42] navneet: has joined #ruby
[11:05:42] v1n: has joined #ruby
[11:05:43] OTORelic2: has joined #ruby
[11:05:45] unsymbol_: has joined #ruby
[11:05:48] scottschecter_: has joined #ruby
[11:07:02] helpa-bot: has joined #ruby
[11:07:06] mmasaki: has joined #ruby
[11:07:07] rheddry: has joined #ruby
[11:07:20] pocketprotector: has joined #ruby
[11:07:36] g3funk: has joined #ruby
[11:07:45] skakri: has joined #ruby
[11:07:57] pipework: has joined #ruby
[11:08:01] jabreity_: has joined #ruby
[11:08:04] M-mistake: has joined #ruby
[11:08:15] gf3: has joined #ruby
[11:08:23] Bilge: has joined #ruby
[11:08:32] Elysia: shevy: yeah, it's got a terminal. But if you're editing on windows, you might as well stab yourself in the knee
[11:08:32] cgfbee: has joined #ruby
[11:08:46] Elysia: so I often just use the git bash
[11:09:02] helpa: has joined #ruby
[11:09:32] navneet_: has joined #ruby
[11:09:32] zenguy_pc: has joined #ruby
[11:09:49] Fire-Dragon-DoL: has joined #ruby
[11:10:05] callumacrae: has joined #ruby
[11:10:19] riceandbeans: has joined #ruby
[11:10:35] Elysia: I am hopeless without `ls' :<
[11:10:48] n008f4g_: has joined #ruby
[11:11:27] Elysia: it's the first command I use when I boot up my terminal (well, aside from cd), and the last command I use before shutting down!
[11:11:28] jzigmund_: has joined #ruby
[11:11:34] saltsa: has joined #ruby
[11:11:35] william3: has joined #ruby
[11:11:56] Morrolan: has joined #ruby
[11:12:04] kent\n: has joined #ruby
[11:12:05] DenSchub: has joined #ruby
[11:12:13] speakingcode: has joined #ruby
[11:12:18] G: has joined #ruby
[11:13:33] optimaleatscout_: has joined #ruby
[11:14:15] mroth: has joined #ruby
[11:14:18] adaedra: Powershell provides it
[11:14:52] GodFather: has joined #ruby
[11:16:47] shortdudey123: has joined #ruby
[11:17:04] err_ok: has joined #ruby
[11:18:22] Caelum: has joined #ruby
[11:18:30] karapetyan: has joined #ruby
[11:18:50] freerobby: has joined #ruby
[11:18:55] william3: has joined #ruby
[11:19:01] spectra: has joined #ruby
[11:19:34] terlar: has joined #ruby
[11:19:37] thermistor: has joined #ruby
[11:19:53] Elysia: I think it doesn't work on powershell terminals, i've not tried personally
[11:20:18] gnufied: has joined #ruby
[11:20:18] Elysia: so long as I can use git commands i'll be satisfies
[11:21:53] Weavel: has joined #ruby
[11:21:57] ljames: has joined #ruby
[11:22:00] johnmilton: has joined #ruby
[11:23:31] waxxy: has joined #ruby
[11:25:13] Papierkorb: has joined #ruby
[11:25:18] lsmola: has joined #ruby
[11:25:58] senayar: has joined #ruby
[11:26:33] okdas: has joined #ruby
[11:26:33] okdas: has joined #ruby
[11:26:43] Hobbyboy: has joined #ruby
[11:26:44] gregf: has joined #ruby
[11:26:45] krasnus: has joined #ruby
[11:26:46] iamvery: has joined #ruby
[11:27:41] yo61_: has joined #ruby
[11:27:52] norc: has joined #ruby
[11:27:55] norc: Hi. I need some ideas.
[11:28:09] vondruch: has joined #ruby
[11:28:29] Shidash: has joined #ruby
[11:28:36] norc: One of my projects has both mechanize and savon as a dependency because it pulls in both ntlm-http and rubyntlm, creating bad blood when it comes to version checks.
[11:28:42] ryotarai: has joined #ruby
[11:29:16] norc: Err. Well *because* of that dependency it requires the latter 2 packages.
[11:29:27] Thai_: has joined #ruby
[11:29:37] norc: Should I go about and shoot someone to relieve my stress?
[11:31:15] zapata: has joined #ruby
[11:31:48] ldnunes: has joined #ruby
[11:32:09] nettoweb: has joined #ruby
[11:32:32] Raphal: has joined #ruby
[11:32:43] joneshf-laptop: has joined #ruby
[11:33:03] karapetyan: has joined #ruby
[11:33:38] bruce_lee: has joined #ruby
[11:33:39] bruce_lee: has joined #ruby
[11:34:52] heyimwill: has joined #ruby
[11:34:53] n008f4g_: has joined #ruby
[11:35:40] waxxy: has joined #ruby
[11:36:56] pawnbox: has joined #ruby
[11:38:21] sdothum: has joined #ruby
[11:38:57] shevy: call it mechon
[11:39:26] jaruga___: has joined #ruby
[11:40:11] karapetyan: has joined #ruby
[11:42:12] poerror: has joined #ruby
[11:42:25] jaruga___: has joined #ruby
[11:42:35] blaxter: has joined #ruby
[11:42:58] rbr: has joined #ruby
[11:43:40] dionysus69: has joined #ruby
[11:46:51] Ebok: has joined #ruby
[11:47:05] NovapaX: has joined #ruby
[11:48:20] vondruch: has joined #ruby
[11:49:05] aep_: has joined #ruby
[11:49:48] JakFrist: has joined #ruby
[11:49:57] senayar: has joined #ruby
[11:51:22] GinoMan2440_: has joined #ruby
[11:51:24] norc: On a serious note: https://gist.github.com/norc/c01e481ca375782ec6df09a81c39fad8 Requiring gems like this, why does my application A not require C?
[11:51:49] poerror: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[11:52:17] jhass: because C is probably not not specified in C's gemspec
[11:52:32] jhass: Gemfile's of dependencies are irrelevant
[11:52:58] jhass: in B's gemspec I mean
[11:53:27] teoric: has joined #ruby
[11:53:32] jhass: mmh and I think A's Bundler.require will only require the direct dependencies of A anyway
[11:53:38] workmad3: ^ was about to add that
[11:54:07] norc: jhass: So the dependency chains only work within gemspec?
[11:54:10] workmad3: `Bundler.require` only automatically pulls in direct dependencies, not transitive dependencies
[11:54:59] baweaver: has joined #ruby
[11:55:13] gregf_: telnet localhost 3007
[11:55:15] jhass: and since gemspec's don't support git sources, you'll have to redeclare it in A anyway
[11:55:23] gregf_: oops :/ wrong chat
[11:57:09] norc: jhass: Okay great, while that is far from being pretty that works for me.
[11:57:18] workmad3: norc: within a gem, a Gemfile is generally only useful for things like setting a git source for a dependency listed in the gemspec so you can do things like prepare support for unreleased gems prior to a full rubygems release
[11:57:37] norc: workmad3: Ah that makes sense.
[11:57:52] william3: has joined #ruby
[11:57:55] workmad3: norc: basically, if you have a dependency, list it in the gemspec... if you have a place to get the dependency from, also list it in the Gemfile
[11:57:56] navneet: has joined #ruby
[11:57:58] jhass: I also see benefit in having reproducable (CI) builds, hence I favor checking in the .lock for my gems too
[11:58:10] norc: workmad3: Or I guess it could be sensible for an application like a rails app when you want to lock specific gems.
[11:58:38] workmad3: jhass: I flip-flop on that front... on the one hand, good for reproducible, on the other hand, it could lead to not noticing breaks in newly installed versions
[11:58:47] norc: In the end the real solution is to fix this obsolete mechanize gem to no longer use a badly outdated gem.
[11:59:02] workmad3: norc: Gemfile in a gem and Gemfile in an app fill different purposes :)
[11:59:09] norc: workmad3: Right.
[11:59:11] norc: https://github.com/norc/mechanize/commit/19d85cf6a92a4c4d87c23501c0f3b941d41adf96
[11:59:22] norc: But here we go, suddenly mechanize plays nicely again. :)
[11:59:26] jhass: workmad3: yes I reckon that, but then you can cache and use --deployment, so it also gives faster builds
[12:00:09] stannard: has joined #ruby
[12:00:29] jhass: and since breaking deps wasn't a pain point for me (i also use gemnasium to notify me of updates) I take those advantages
[12:00:57] workmad3: jhass: yeah, at the moment I'm on a check-in Gemfile.lock at least for internal gems
[12:01:07] workmad3: jhass: I'd probably re-evaluate that if I ever had any public gems :)
[12:01:26] jhass: I only have public ones for now :P
[12:01:54] nobitanobi: has joined #ruby
[12:01:56] norc: jhass: Though I would really like a way for gemspec being able to use git for gems.
[12:02:08] workmad3: norc: not a responsibility for gemspecs...
[12:02:25] vondruch: has joined #ruby
[12:02:26] jhass: well the core of the issue is that Gemfile and gemspec are still two separate things...
[12:02:46] navneet: has joined #ruby
[12:02:50] gagrio: has joined #ruby
[12:02:56] norc: Because one is for bundler, and the other is for building a gem, eh?
[12:03:18] jhass: yes, but the core functionality of bundler is already moving into rubygems
[12:03:20] workmad3: norc: a gemspec simply lists dependencies and versions, it makes no stance on to where a gem should be found
[12:04:11] tjvc: has joined #ruby
[12:04:11] tjvc: has joined #ruby
[12:05:13] BrunoSaboia: has joined #ruby
[12:06:53] szulak_: has joined #ruby
[12:06:57] manveru: in the end, Gemfiles still depend on gemspecs, so you can't really get rid of either :(
[12:07:48] tjvc: has joined #ruby
[12:07:48] tjvc: has joined #ruby
[12:10:31] synthroid: has joined #ruby
[12:10:59] crameth: has joined #ruby
[12:11:09] kobain: has joined #ruby
[12:13:09] n008f4g_: has joined #ruby
[12:14:36] OTORelic2: has joined #ruby
[12:15:25] IrishGringo: has joined #ruby
[12:15:45] jhass: it's rather a question of what you consider the scope of rubygems to be
[12:17:11] shevy: we can merge bundler and gem into ...
[12:17:14] bosnianboy: has joined #ruby
[12:17:44] joonty: has joined #ruby
[12:18:00] jhass: for example supporting building a gem from git (and then git dependencies in turn would be easy)
[12:18:29] william3: has joined #ruby
[12:19:17] Shashikant86: has joined #ruby
[12:23:00] shredding: has joined #ruby
[12:23:19] pawnbox: has joined #ruby
[12:26:21] sgambino: has joined #ruby
[12:27:08] madgen: has joined #ruby
[12:28:49] yeticry: has joined #ruby
[12:29:51] Evans: has joined #ruby
[12:31:23] aufi: has joined #ruby
[12:33:34] chagel: has joined #ruby
[12:34:40] eljimmy: has joined #ruby
[12:34:44] patrick_star: has joined #ruby
[12:35:24] tuelz3: has joined #ruby
[12:37:00] myntcake: has joined #ruby
[12:38:41] Gasher: has joined #ruby
[12:38:50] madgen: has joined #ruby
[12:41:48] newjersey: has joined #ruby
[12:42:01] Alina-malina: has joined #ruby
[12:44:17] jaguarmagenta: has joined #ruby
[12:44:48] bosnianboy: thanks nickjj (with a slight delay) that article helped me a lot :)
[12:46:20] bruno-: has joined #ruby
[12:46:21] nickjj: bosnianboy, "slight"
[12:46:56] bosnianboy: TTL didn't exceed :D
[12:47:07] Dicki: has joined #ruby
[12:48:49] elusiveother: has joined #ruby
[12:48:50] elusiveother: has joined #ruby
[12:50:24] Xeago: has joined #ruby
[12:51:26] Dicki: has left #ruby: ()
[12:52:00] constantinexvi: has joined #ruby
[12:52:08] Shashikant86: has joined #ruby
[12:54:09] yeticry: has joined #ruby
[12:55:06] bmn: has joined #ruby
[12:55:57] william3: has joined #ruby
[12:57:31] Xeago: has joined #ruby
[12:57:34] ramortegui: has joined #ruby
[12:57:36] diegoaguilar: has joined #ruby
[12:57:42] djbkd_: has joined #ruby
[12:59:47] aegis3121: has joined #ruby
[13:01:28] cdg: has joined #ruby
[13:02:00] sid_fules: has joined #ruby
[13:02:57] navneet: has joined #ruby
[13:05:40] Xeago: has joined #ruby
[13:06:45] kriskropd: has joined #ruby
[13:07:24] xue: has joined #ruby
[13:08:37] newdan: has left #ruby: ()
[13:09:33] ChiefAlexander: has joined #ruby
[13:11:00] araujo: has joined #ruby
[13:11:12] Xeago: has joined #ruby
[13:11:14] ekinmur: has joined #ruby
[13:11:16] manveru: ACTION just wished bundler would go die in a hurry :P
[13:11:22] Alina-malina: has joined #ruby
[13:11:27] Amnez777: has joined #ruby
[13:11:55] norc: manveru: Why the hate for bundler?
[13:12:06] Alina-malina: has joined #ruby
[13:13:06] manveru: because trying to get a correct dependency tree with all the groups is a major PITA
[13:13:06] araujo: has joined #ruby
[13:14:21] stannard: has joined #ruby
[13:14:28] malconis: has joined #ruby
[13:14:36] jhass: is that bundler's fault though? What could it do better?
[13:14:37] Rasi: has joined #ruby
[13:15:12] manveru: why on earth does `Bundler.setup('default', 'production')` try to find a gemspec for a gem in the test group
[13:16:05] jhass: because you didn't install --without test ?
[13:16:41] mustmodify___: has left #ruby: ()
[13:16:48] flashpoint9: has joined #ruby
[13:17:07] manveru: i never installed the test gems in the first place, and i don't run install on the production machine
[13:17:41] jhass: huh, you don't?
[13:17:43] jhass: you should
[13:17:49] sid_fules: has joined #ruby
[13:17:53] rbennacer: has joined #ruby
[13:17:59] manveru: no, i can't
[13:18:09] jhass: don't check in vendor/bundle from a --path run
[13:18:20] snowy: has joined #ruby
[13:18:22] LudoF: has joined #ruby
[13:18:43] jhass: (nor a --deployment run)
[13:18:53] jhass: if you have no network, that's what bundle package is for
[13:19:31] AlexJakeGreen: has joined #ruby
[13:19:38] drptbl: has joined #ruby
[13:19:53] manveru: well, thanks
[13:20:08] northrup: has joined #ruby
[13:20:11] krzkrz: has joined #ruby
[13:20:26] manveru: i spent the last week digging around bundler internals to figure out a good way to get the correct url for each source and the group of each non-development dependency
[13:21:05] gagrio: has joined #ruby
[13:21:27] jhass: I don't want to miss bundlers feature set but I wouldn't miss its codebase, yeah
[13:21:47] jhass: that's why I wish for rubygems to take over its feature set
[13:21:50] manveru: bundler features are fine, but i'm doing immutabel deployments
[13:21:58] manveru: *immutable
[13:22:31] manveru: and it's really not happy in that environment :P
[13:23:58] manveru: i'm adding gemfile group support to the nix bundlerEnv
[13:24:13] nobitanobi: has joined #ruby
[13:24:35] tax: has joined #ruby
[13:24:45] manveru: but apparently the only thing group are good for is reducing startup times a bit
[13:25:00] manveru: you still need those gemspecs around for some reason
[13:25:36] hxegon: has joined #ruby
[13:25:46] PedramT: has joined #ruby
[13:26:08] someish: has joined #ruby
[13:26:08] manveru: for example we have `metric_fu` as a development dependency, that in turn needs reek -> unparser -> abstract_type
[13:26:19] jhass: mmh, not IME (and I kinda contributed by default optional groups, so I played around a fair bit there)
[13:26:25] aegis3121: has joined #ruby
[13:26:54] manveru: and if i try to `ruby -rbundler -e 'Bundler.setup("default")'` it complains about not finding abstract_type in any sources
[13:26:58] jhass: well you do need them for resolving the lock
[13:27:10] jhass: which will always happen unless you --deployment
[13:27:24] jhass: not sure about bundle package there
[13:27:35] manveru: so i tried writing a smaller Gemfile.lock without the dependencies that are in groups i don't need
[13:27:47] manveru: but then bundler starts bitching about having the lock out of sync
[13:28:00] manveru: even with BUNDLER_FROZEN set
[13:28:16] jhass: really? sounds like some bug potential there
[13:29:14] jhass: mh otoh it wouldn't be too unreasonable to do an offline check between the Gemfile and Gemfile.lock
[13:29:25] jhass: so if you patch the .lock by hand you should keep the Gemfile in sync by hand too
[13:29:33] manveru: not by hand
[13:29:50] manveru: i wrote a subclass of Bundler::Dsl for that
[13:30:03] jhass: basically the resolver ignores groups because --with / --without shall not affect the resolution
[13:30:46] jhass: but I can't imagine why you'd need the spec's other than computing a new resolution or installing
[13:31:08] jhass: and if frozen is set computing a new resolution should abort
[13:31:30] jhass: but then it's been some time (a year or so) since I was that deep in the internals
[13:32:22] manveru: i guess i'd be happy if people didn't use the Bundler API directly and relied on RUBYLIB instead :P
[13:32:31] manveru: but well, not much i can change ther
[13:34:22] Xeago_: has joined #ruby
[13:34:48] siaW: has joined #ruby
[13:35:17] william3: has joined #ruby
[13:36:20] jhass: peeking at the changelog, maybe relevant "add --frozen support to bundle package"
[13:36:30] jhass: (for 1.12.pre.2)
[13:36:42] manveru: yeah, that's what BUNDLER_FROZEN does
[13:36:49] manveru: or Bundler.settings[:frozen]
[13:37:11] Nilium: has joined #ruby
[13:37:14] GodFather: has joined #ruby
[13:37:15] manveru: it's nice so bundler doesn't try to write a new lockfile every time you call it :P
[13:37:27] xMopxShell: has joined #ruby
[13:38:26] manveru: also for some reason it always tries to make .bundle/config if you just look at the general direction of bundler ;P
[13:38:53] spider-mario: has joined #ruby
[13:39:28] sgambino: has joined #ruby
[13:40:09] Waqas: has joined #ruby
[13:42:22] crank1988: has joined #ruby
[13:43:36] `tim`: has joined #ruby
[13:44:02] Aviio: has joined #ruby
[13:44:31] Yiota: has joined #ruby
[13:45:01] Waqas: has joined #ruby
[13:46:29] shadeslayer: has joined #ruby
[13:47:25] bruno-: has joined #ruby
[13:47:44] Infra-Red: has joined #ruby
[13:49:26] godzillaenlacasa: has joined #ruby
[13:49:43] ChiefAlexander: has joined #ruby
[13:50:35] shevy: bundler loves you!
[13:51:59] gregf: has joined #ruby
[13:53:16] chagel: has joined #ruby
[13:53:33] Macaveli: has joined #ruby
[13:53:49] snowy: has joined #ruby
[13:55:08] Yiota: has joined #ruby
[13:56:43] SirFunk: has joined #ruby
[13:57:24] Gasher: has joined #ruby
[13:57:24] Kallis: has joined #ruby
[13:57:28] LoneHerm_: has joined #ruby
[13:58:33] william3: has joined #ruby
[13:59:07] wlanboy: has joined #ruby
[13:59:54] Mon_Ouie: has joined #ruby
[14:00:38] karmatr0n: has joined #ruby
[14:01:39] Xeago: has joined #ruby
[14:01:45] centrx: has joined #ruby
[14:03:12] Nuck: has joined #ruby
[14:03:20] \13k: has joined #ruby
[14:05:03] tuelz3: has joined #ruby
[14:05:40] idletask: has joined #ruby
[14:06:19] SilverKey: has joined #ruby
[14:07:28] Infra-Red: has joined #ruby
[14:08:56] valeri_ufo: has joined #ruby
[14:11:58] jokester: has joined #ruby
[14:12:43] workmad3: has joined #ruby
[14:16:31] william3: has joined #ruby
[14:18:22] OTORelic2: has joined #ruby
[14:18:50] banister: has joined #ruby
[14:19:20] djbkd_: has joined #ruby
[14:20:00] joonty: has joined #ruby
[14:22:41] marr: has joined #ruby
[14:23:46] Xeago: has joined #ruby
[14:23:47] RegulationD: has joined #ruby
[14:24:31] zast: has joined #ruby
[14:25:35] rbennacer: has joined #ruby
[14:25:52] drptbl: has joined #ruby
[14:26:19] dionysus69: help with git please, is this a correct way to pull specific commit from remote >? git fetch someRemoteOrigin master:32e23e5682323d143895e4db98a51ef887de7bd9
[14:26:20] tvon: has joined #ruby
[14:27:27] norc: dionysus69: Aside from the fact that you hit the wrong channel, yes.
[14:27:43] norc: dionysus69: git fetch origin acbd:refs/remotes/origin/your-commit
[14:28:10] dionysus69: what is acbd:refs/remote/origin/your-commit?
[14:28:21] kareeole_: has joined #ruby
[14:28:38] dionysus69: I know wrong channel, sorry :) :D
[14:28:48] norc: dionysus69: It fetches the commit acbd and necessary ancestors and storing it as origin/your-commit (as a remote)
[14:28:58] SilverKey: has joined #ruby
[14:29:14] norc: Although I think there is a newer way/
[14:29:34] xaxisx: has joined #ruby
[14:30:33] dionysus69: ok I ll go to git channel :D
[14:30:52] norc: dionysus69: There is also git fetch --depth=1 which does something along the way.
[14:31:01] rbennacer: has joined #ruby
[14:31:07] norc: Yeah better idea. ;)
[14:32:06] rbennacer: has joined #ruby
[14:32:51] darkxploit: has joined #ruby
[14:34:12] colegatron: has joined #ruby
[14:34:23] Xeago: has joined #ruby
[14:34:55] Coldblackice_: has joined #ruby
[14:35:05] OTORelic2: has joined #ruby
[14:38:16] dhollinger: has joined #ruby
[14:40:35] karapetyan: has joined #ruby
[14:43:18] xaxisx: has joined #ruby
[14:43:37] callen92: has joined #ruby
[14:43:44] lkba: has joined #ruby
[14:43:45] hxegon: has joined #ruby
[14:44:10] ahammond: has joined #ruby
[14:44:33] yardenbar: has joined #ruby
[14:44:55] pawnbox: has joined #ruby
[14:45:05] jaguarmagenta: has joined #ruby
[14:45:58] aupadhye: has joined #ruby
[14:46:14] CausaMortis: has joined #ruby
[14:46:33] pawnbox: has joined #ruby
[14:47:39] callen92: has joined #ruby
[14:51:07] chagel: has joined #ruby
[14:51:55] william3: has joined #ruby
[14:52:31] Bish: does somebody know how to turn of the mail gems openssl certificate check?
[14:52:44] shayan: has joined #ruby
[14:52:48] Bish: i tried delivery_method nil,openssl_verify_mmode:'none'
[14:52:53] Bish: but didn't work :(
[14:54:15] polishdub: has joined #ruby
[14:54:40] Xeago: has joined #ruby
[14:55:46] Bish: >> require 'mail'; Mail.new { to:"hi@ho.de",from:"peter@peter.de" }.deliver
[14:55:47] ruby[bot]: Bish: # => cannot load such file -- mail (LoadError) ...check link for more (https://eval.in/555452)
[14:56:01] heinrich5991: has joined #ruby
[14:56:06] adaedra: that's a gem, no?
[14:56:10] Bish: yeah it is
[14:56:27] pawnbox: has joined #ruby
[14:56:38] sepp2k: has joined #ruby
[14:59:09] Xeago: has joined #ruby
[14:59:20] Bish: weird, it worked when using Mail.defaults do ... end, but not doing it in the mail
[14:59:23] Bish: while im doing that all the time
[14:59:28] Bish: weird weird
[14:59:40] jhass: Bish: first of all, let's make sure you understand what you're trying to do, what's the underlying issue?
[15:00:32] ujjain: Can I have a custom error message instead of Execution expired of the ruby timeout gem?
[15:00:52] toretore: you can give it a custom exception (class?)
[15:01:42] brent__: has joined #ruby
[15:01:44] Bish: jhass: i set up and self-signed ceritficate for my mail server
[15:01:51] toretore: http://www.rubydoc.info/stdlib/timeout/Timeout#timeout-class_method
[15:01:57] Bish: which resulted in the mail gem not being able to send, because it doesn't accept the certificate
[15:02:19] jhass: Bish: why?
[15:02:19] Bish: Mail.defaults do delivery_method nil,openssl_verify_mode:'none' end <= solves the problem
[15:02:46] Bish: Mail.new do ... delivery_method nil,openssl_verify_mode:'none' ... end.deliver <= doesn't
[15:03:06] Bish: jhass: probably because the hostname doesn't fit, but i actually don't care about ssl, because thats local email transmission
[15:03:09] Xeago: has joined #ruby
[15:03:42] jhass: Bish: https://letsencrypt.org/ http://www.wosign.com/english/freessl.htm https://www.startssl.com/
[15:03:52] jhass: if you don't care about encryption, just skip it
[15:04:02] Bish: well, people are using the mail server
[15:04:12] Bish: but the ruby code, connects to localhost, so THERE i don't care
[15:04:14] jhass: one more reason to actually care about it
[15:04:21] workmad3: Bish: if you're doing local delivery, you typically have a non-smtp method available
[15:04:38] Bish: well, i certainly have, but the mail gem does want to use ssl
[15:04:51] workmad3: Bish: the mail gem can use a system `sendmail` binary instead of smtp
[15:04:55] jhass: yeah I wouldn't do TLS on localhost anyway, misconfigured mailserver IMO
[15:05:19] Bish: the mailserver is fine with plain connections, the ruby gem wants ssl
[15:05:50] jhack: has joined #ruby
[15:06:06] Bish: doesn't matter much, does it?
[15:06:11] Bish: i mean, for the matter
[15:06:12] toretore: Mail.new{ delivery_method nil } won't set anything
[15:06:21] Bish: toretore: well, it does
[15:06:32] Devalo: has joined #ruby
[15:06:48] Bish: well, atleast if nil is "smtp"
[15:07:06] workmad3: toretore: it's `delivery_method nil, openssl_verify_mode: 'none`
[15:07:17] jhass: https://github.com/mikel/mail/blob/master/lib/mail/network/delivery_methods/smtp.rb#L25
[15:07:18] workmad3: (just badly formatted in Bish's example)
[15:07:20] toretore: https://github.com/mikel/mail/blob/master/lib/mail/message.rb#L258
[15:07:25] Bish: workmad3: guess he is still right, because Mail.new does create a mail with a certain delivery_method
[15:07:42] Bish: and Mail.defaults do { ... } does set the defaults for a certain delivery method
[15:07:51] toretore: it's one of those "i want to be both a getter and a setter" methods
[15:07:51] Bish: confusimg imho
[15:08:01] treehug88: has joined #ruby
[15:08:04] n008f4g_: has joined #ruby
[15:08:52] workmad3: Bish: `delivery_method :sendmail` could work, or `delivery_method :smtp, enable_starttls_auto: false` (and make sure you're connecting to port 25, assuming your SMTP server allows unencrypted connections on 25 but not on 587)
[15:09:34] workmad3: Bish: tbh, almost everything about email gets confusing at some point :)
[15:09:43] madgen: has joined #ruby
[15:10:50] rkazak: has joined #ruby
[15:10:55] Bish: yeah smtp is a huge load of .
[15:11:02] smathy: has joined #ruby
[15:11:11] joseph: has joined #ruby
[15:11:14] lxsameer: has joined #ruby
[15:13:18] SilverKey: has joined #ruby
[15:13:52] Xeago: has joined #ruby
[15:14:25] ssiris: has joined #ruby
[15:14:30] tuelz3: has joined #ruby
[15:14:51] hobodave: has joined #ruby
[15:15:35] Balzrael: has joined #ruby
[15:16:04] karmatr0n: has joined #ruby
[15:17:21] the_drow: has joined #ruby
[15:17:27] k13nox: has joined #ruby
[15:18:02] poguez_: has joined #ruby
[15:18:41] t-richards: has joined #ruby
[15:22:05] kareeoleez: has joined #ruby
[15:23:22] heinrich5991: has joined #ruby
[15:24:08] smathy: Pfft... 501 HELO/EHLO argument invalid.
[15:25:32] Aviio: has joined #ruby
[15:25:38] adaedra: ACTION puts smathy into a postfix queue
[15:25:48] elifoster: has joined #ruby
[15:27:10] charliesome: has joined #ruby
[15:28:12] smathy: ACTION retries for the next 4 days
[15:28:24] tabakhase: has joined #ruby
[15:30:06] rbennacer: has joined #ruby
[15:30:16] adaedra: You need 4 days to readjust a mental map?
[15:32:40] freerobby: has joined #ruby
[15:35:27] charliesome: has joined #ruby
[15:36:20] ixti: has joined #ruby
[15:37:04] smathy: adaedra, no, just a joke referring to the default delivery failure retry period.
[15:37:15] smathy: ...sheesh, here I was thinking I was talking to an SMTP endpoint.
[15:37:32] adaedra: Of course, but I found it funny to cross-discuss with #RoR
[15:37:57] dionysus69: has joined #ruby
[15:38:20] aufi: has joined #ruby
[15:38:23] tAn: has joined #ruby
[15:38:34] symm-: has joined #ruby
[15:39:21] madgen: has joined #ruby
[15:39:22] smathy: Oh, damnit, I lost track.
[15:39:41] smathy: ACTION has very tightly defined channel silos
[15:39:52] brent__: inject vs reduce, which si preferred? and why would there be 2 seemingly identical methods
[15:40:07] baweaver: has joined #ruby
[15:40:21] lxsameer: has joined #ruby
[15:40:39] bokayio: has joined #ruby
[15:40:40] aegis3121: brent__ so people from different backgrounds can more quickly get started, I believe, is at least part of the philosophy behind that
[15:40:49] adaedra: They're the same, brent__, they're aliases
[15:40:51] aegis3121: same reason for #collect/#map, #find/#select.
[15:40:59] aegis3121: select...? that doesn't soudn right
[15:41:19] aegis3121: ya no. #collect and #map are the same, though...
[15:41:34] paultreny: has joined #ruby
[15:42:20] csaunders: has joined #ruby
[15:42:49] ramfjord: has joined #ruby
[15:42:50] brent__: is one preferred?
[15:42:59] solocshaw: has joined #ruby
[15:43:08] aegis3121: https://github.com/bbatsov/ruby-style-guide
[15:43:18] smathy: brent__, no.
[15:43:23] aegis3121: " Prefer map over collect, find over detect, select over find_all, reduce over inject and size over length. "
[15:43:49] aegis3121: If you're following Rubocop and its style guide
[15:44:14] shevy: long live the style guide!
[15:44:44] greenhat: has joined #ruby
[15:46:00] smathy: brent__, and aliases are usually there to conform to developer expectations - like how `map` is there for the devs coming from Perl and FPs whereas `collect` is from Smalltalk and was also in Prototype.js
[15:46:31] eljimador: has joined #ruby
[15:47:11] smathy: brent__, I'm sure there is an analogous reason behind inject/reduce I'm just not aware of that one.
[15:47:11] solocshaw: has joined #ruby
[15:47:13] [Butch]: has joined #ruby
[15:47:30] chrisarcand: Same reasoning. reduce is the higher order function, inject is from smalltalk.
[15:47:40] Yiota: has joined #ruby
[15:47:42] Shashikant86: has joined #ruby
[15:48:00] synthroid: has joined #ruby
[15:48:10] swills: has joined #ruby
[15:48:14] chrisarcand: Wherein Ruby tries to make everyone happy and welcomed from other languages and honestly just makes it more confusing for newcomers, IMO.
[15:48:22] raeoks: has joined #ruby
[15:48:24] brent__: i found all the aliases a confusing part of initially learnign ruby syntax
[15:48:51] chrisarcand: You and most people, I think ;)
[15:49:17] brent__: i was doing java before ruby and was like "why are they throwing multiple ways to do the same thing at me!"
[15:49:47] jackjackdripper: has joined #ruby
[15:49:49] Xeago: has joined #ruby
[15:50:05] smathy: brent__, hence your "...but please for the love of God tell me which one is preferred?!?!?!" question ;)
[15:50:32] aegis3121: The Style guide usually tells you if one is preferred. If not, use whatever your heart desires.
[15:50:41] smathy: I came from Perl, so I'm just happy to have aliases that aren't just punctuation.
[15:50:56] brent__: indeed, i think i found myself using both randomly w/ no rhyme or reason
[15:50:58] smathy: Heh, I came from Perl so, style guide, HA!
[15:51:07] jobewan: has joined #ruby
[15:51:17] smathy: brent__, oh yeah, *that's* definitely not preferred ;)
[15:51:39] brent__: i figured, just couldn't remember which was preferred
[15:51:57] brent__: i'll remember to look to the style guide
[15:52:05] charliesome: has joined #ruby
[15:52:09] william3: has joined #ruby
[15:53:06] jobewan: has joined #ruby
[15:53:28] bradleyprice: has joined #ruby
[15:57:30] eatsfoobars: has joined #ruby
[15:57:37] tubuliferous: has joined #ruby
[15:58:03] Cohedrin: has joined #ruby
[15:59:06] SilverKey: has joined #ruby
[15:59:21] n008f4g_: has joined #ruby
[16:00:43] bronson: has joined #ruby
[16:00:45] freerobby: has joined #ruby
[16:00:54] bigkevmcd: has joined #ruby
[16:01:04] amclain: has joined #ruby
[16:01:05] flashpoint9: has joined #ruby
[16:01:14] nfk|laptop: has joined #ruby
[16:01:16] hobodave_: has joined #ruby
[16:03:06] s00pcan: has joined #ruby
[16:03:13] etehtsea: has joined #ruby
[16:03:16] matp: has joined #ruby
[16:03:22] Cohedrin_: has joined #ruby
[16:04:08] rubyaw: has joined #ruby
[16:05:15] nobitanobi: has joined #ruby
[16:05:44] Yiota: has joined #ruby
[16:06:08] bradleyprice: has joined #ruby
[16:06:13] karapetyan: has joined #ruby
[16:07:10] nobitanobi: has joined #ruby
[16:07:27] pietr0: has joined #ruby
[16:07:34] PedramT: has joined #ruby
[16:07:38] dhollinger: has joined #ruby
[16:07:57] acidrainfall: has joined #ruby
[16:08:26] acidrainfall: Just a quick question. I'm creating an array in a method with Array.new - if I rerun the method, does Array.new also clear it out so it's an empty array again?
[16:09:03] adaedra: no, it's a new array
[16:09:12] JoshL: has joined #ruby
[16:09:28] mlakewood: has joined #ruby
[16:09:47] adaedra: Also, if you want an empty array, just use `[]`
[16:09:47] acidrainfall: then... the answer is yes?
[16:09:57] acidrainfall: What's the difference between new and empty?
[16:10:03] adaedra: I misread.
[16:10:36] adaedra: Array.new won't touch existing arrays, if it's your question.
[16:10:43] acidrainfall: Right, that's my question.
[16:10:58] adaedra: But if you've a method with `@array = Array.new`, @array is rewritten at each call.
[16:11:05] apeiros: has joined #ruby
[16:11:19] acidrainfall: Good to know I'll go look that up
[16:12:22] hxegon: has joined #ruby
[16:12:28] acidrainfall: Stupid. Google won't search @.
[16:12:34] Renich: has joined #ruby
[16:12:46] adaedra: @array is an instance variable.
[16:13:01] `tim`: has joined #ruby
[16:13:09] acidrainfall: yeah I knew that much
[16:13:26] acidrainfall: it's aight I just pulled up a scope section this will help
[16:14:07] IrishGringo: has joined #ruby
[16:14:33] mlakewood: has left #ruby: ()
[16:15:04] stunder001: has joined #ruby
[16:16:07] jenrzzz: has joined #ruby
[16:16:08] jenrzzz: has joined #ruby
[16:16:20] stunder: has joined #ruby
[16:16:59] davedev24: has joined #ruby
[16:17:09] jrafanie: has joined #ruby
[16:17:24] Log1x: has joined #ruby
[16:17:24] Log1x: has joined #ruby
[16:17:31] Infra-Red: has joined #ruby
[16:17:38] Cyrus: has joined #ruby
[16:19:28] SCHAAP137: has joined #ruby
[16:19:34] davedev24: has joined #ruby
[16:20:28] joonty: has joined #ruby
[16:21:10] jackjackdripper: has joined #ruby
[16:22:34] cschneid: has joined #ruby
[16:22:38] jhass: acidrainfall: Array#clear will empty an existing array
[16:22:52] jhass: Array.new creates a new one
[16:23:30] cschneid: I have an array that I'd like to sort normally, except if it contains "X", I need "X" to bubble to front, and "Y" bubbles to just behind "X", or front if x isn't there. Is there a non-terrible way to write this kind of sort_by{} function? Or is there a smoother way?
[16:23:52] karapetyan: has joined #ruby
[16:24:06] icedp: has joined #ruby
[16:24:33] adaedra: It's rather by sort {} here
[16:25:09] adaedra: You can fake the comparaison to always put X as first inside the block, and normal comparaison if no X is in the comparaison
[16:25:20] chosen1: has joined #ruby
[16:25:33] acidrainfall: jhass: is that preferable to array = [] ?
[16:25:38] cschneid: thats what I was figuring, but I'd have to account for the priority things in both the first & second key, and it'd end up being a fair bit of if statements
[16:25:39] acidrainfall: I'm completely fine with that
[16:25:58] jhass: acidrainfall: I wouldn't say so, technically equivalent but stylewise [] is preferred to Array.new
[16:26:09] acidrainfall: Oh, I wasn't aware of that second bit
[16:26:17] acidrainfall: Why, out of curiosity?
[16:26:24] workmad3: adaedra: `sort_by { |item| item == "X" ? [2, item] : (item == "Y" ? [1, item] : [0, item]) }`
[16:26:25] jhass: shorter I guess?
[16:26:30] adaedra: Shorter, I'd say.
[16:26:33] workmad3: erro, cschneid even
[16:26:39] adaedra: workmad3: fix your damn tab key.
[16:26:55] jhass: workmad3: mmh, dunno creating a two element array for each item?
[16:27:25] Yeomra_: has joined #ruby
[16:27:36] cschneid: oh, sort_by doesn't work like I thought. Man, I use too many languages on a regular basis
[16:27:42] bigkevmcd: has joined #ruby
[16:27:44] workmad3: jhass: kinda depends on the size of the way, but I'd class it as 'non-terrible' at least :)
[16:27:51] workmad3: *of the array
[16:27:58] workmad3: wtf is wrong with my typing this evening? :/
[16:28:08] cschneid: the list will be short, 10 items or so
[16:28:39] adaedra: cschneid: not the best way, but you could also remove the X, sort the array, unshift the X.
[16:28:58] cschneid: hmm, not terrible. `.delete()` is plenty quick
[16:29:00] smathy: acidrainfall, same reason `foo = ""` is preferred to `foo = String.new` because we're not Java devs ;)
[16:29:05] decoponio: has joined #ruby
[16:29:11] jhass: dunno, I think I'd ["X", "Y", *arr.sort - ["X", "Y"]] if arr.include? "X"
[16:29:24] jhass: you'd need to branch for the "Y" bit anyway
[16:29:42] jhass: since "Y" shouldn't go to front if there's no "X" if I got it right
[16:29:47] adaedra: ah yes, there are two things to put on top
[16:29:56] workmad3: jhass: it should... 'front if x isn't there'
[16:29:58] cschneid: ideally I'd write this so there can be N things to put up front :)
[16:30:11] jhass: oh, misread that
[16:30:22] workmad3: basically it's X > Y > <normal ordering>
[16:30:37] cschneid: workmad3: right, and skipping X or Y if they weren't present in the original
[16:31:11] cschneid: which is awkward. I'll go write the generic solution elsewhere, and then use it. Was hoping I could one-liner it, but talking it through, it's complex enough to go do right
[16:31:19] adaedra: cschneid: can there be multiple X or Y?
[16:31:34] cschneid: adaedra: no, the list is unique
[16:31:39] cschneid: items in the list rather
[16:32:20] TomyLobo: has joined #ruby
[16:32:35] adaedra: [X, Y].map { |e| array.delete e }.compact + array.sort
[16:32:52] baweaver: has joined #ruby
[16:33:41] adaedra: maybe better in two instructions tho, modifying and reading the array in the same instruction is not the best thing to do I think
[16:33:44] cschneid: then `if Y was deleted, unshift` `if X was deleted, unshift`
[16:33:55] adaedra: no, no need for that
[16:34:09] bigkevmcd: has joined #ruby
[16:34:18] adaedra: in the first part, it will collect X and Y IF it finds the elements, and then eleminate the nils if not found
[16:34:24] workmad3: cschneid: the other option would be something like this: https://gist.github.com/workmad3/03caeae0ecfc38adb2ddf66ee830271e
[16:34:25] cschneid: yep, misread :)
[16:34:27] acidrainfall: smathy: Haha that's fair
[16:34:35] acidrainfall: I just saw Array.new in the ruby documentation on the Array type
[16:34:51] adaedra: Literals are often preferred
[16:34:58] acidrainfall: "" being a literal?
[16:35:04] adaedra: {} over Hash.new, [] over Array.new, "" over String.new
[16:35:11] workmad3: (oops, -1 in the right case, updated gist)
[16:35:21] cschneid: workmad3: right, that's where I started which grows pretty ugly when you add thing #3 or 4 to sort on. This is a UI helper in rails, we want to bubble up known-important things to the front, then let the dynamic stuff just be sorted after
[16:35:57] workmad3: cschneid: hmm... sounds like you're really reaching the point where you want a proper search/indexer that lets you boost values
[16:36:23] fmcgeough: has joined #ruby
[16:36:51] snowy: has joined #ruby
[16:37:02] diegoaguilar: has joined #ruby
[16:37:16] ellimist747: has joined #ruby
[16:37:35] Yiota: has joined #ruby
[16:37:41] cschneid: not really, this is a one-off. We only have room in our UI for ~7 sorta-dynamic items, we know 2-3 are always relevant, then we want to just show the rest we can.
[16:37:55] cschneid: thanks a ton for helping me think through this - there are a few options here. Now to implement one of them
[16:39:57] dionysus69: has joined #ruby
[16:40:54] bigkevmcd: has joined #ruby
[16:40:56] joseph: has joined #ruby
[16:41:07] Guest38: has joined #ruby
[16:41:08] banister: has joined #ruby
[16:42:03] workmad3: cschneid: ah ok :) in that case, you could probably adjust the `sort` block so that you had an array of 'important' items, like this: https://gist.github.com/workmad3/03caeae0ecfc38adb2ddf66ee830271e
[16:43:00] workmad3: (in larger arrays, you could cache the results of the `include?` calls too, so you don't call them up to twice each)
[16:43:15] cschneid: workmad3: yep, that's the direction I was going
[16:43:49] bradleyprice: has joined #ruby
[16:43:51] lxsameer: has joined #ruby
[16:43:58] Infra-Red: has joined #ruby
[16:45:47] jaguarmagenta: has joined #ruby
[16:47:10] bigkevmcd: has joined #ruby
[16:48:49] lkba_: has joined #ruby
[16:49:03] MagePsycho_: has joined #ruby
[16:51:12] ramfjord: has joined #ruby
[16:52:10] karapetyan: has joined #ruby
[16:52:12] rbennacer: has joined #ruby
[16:52:34] terlar: has joined #ruby
[16:53:09] Cohedrin: has joined #ruby
[16:53:15] rbennacer: has joined #ruby
[16:53:47] bigkevmcd: has joined #ruby
[16:54:05] rabbel: has joined #ruby
[16:57:34] ChiefAlexander: has joined #ruby
[16:59:37] madgen: has joined #ruby
[16:59:42] bigkevmcd: has joined #ruby
[16:59:52] Xeago: has joined #ruby
[17:01:19] william3: has joined #ruby
[17:02:39] GodFather: has joined #ruby
[17:03:20] aegis3121: has joined #ruby
[17:03:37] eljimmy: has joined #ruby
[17:03:42] deavid: has joined #ruby
[17:04:43] tamole: has joined #ruby
[17:05:21] steve: has joined #ruby
[17:05:34] LiquidInsect: has joined #ruby
[17:07:29] jenrzzz: has joined #ruby
[17:07:29] jenrzzz: has joined #ruby
[17:08:05] lomex: has joined #ruby
[17:08:07] acidrainfall: has left #ruby: ()
[17:11:21] EdwardIII: has joined #ruby
[17:15:17] william3: has joined #ruby
[17:16:59] `tim`: has joined #ruby
[17:19:14] Ebok: has joined #ruby
[17:19:45] blaxter: has joined #ruby
[17:20:33] printk: has joined #ruby
[17:20:45] printk: has left #ruby: ()
[17:21:16] Computergeek01: has joined #ruby
[17:21:42] poerror: has joined #ruby
[17:21:51] tildes: has joined #ruby
[17:22:49] nerium: has joined #ruby
[17:24:16] Gasher: has joined #ruby
[17:24:18] steve: has joined #ruby
[17:24:45] stunder: has joined #ruby
[17:26:42] mustmodify: has joined #ruby
[17:28:09] Paradox: has joined #ruby
[17:28:39] bigkevmcd: has joined #ruby
[17:29:24] boontdustie: has joined #ruby
[17:29:26] Synthead: has joined #ruby
[17:29:32] mustmodify: need a sanity check. I'm writing a microservice to receive UDP messages from GPS devices, persist the locations, and to provide a very small http API ( last position for a device, all positions between x and y for a device. ) So I have the UDP part working... now I'm starting to add to the db. I haven't used any ORMs other than ActiveRecord. Should I just bite the bullet and install Rails? Dev time will be much faster... just quickly thinking about it... l
[17:29:41] jenrzzz: has joined #ruby
[17:29:41] jenrzzz: has joined #ruby
[17:29:44] SilverKey: has joined #ruby
[17:29:54] mustmodify: I was initially thinking about sinatra
[17:30:35] solars: has joined #ruby
[17:31:33] hk238: has joined #ruby
[17:32:14] mustmodify: down side to rails is that it takes up a ton of memory and I don't need most of what Rails provides.
[17:32:24] mustmodify: I guess I could use just ActiveRecord...
[17:34:02] rubyaw: has joined #ruby
[17:34:40] baweaver: has joined #ruby
[17:34:46] ramfjord: has joined #ruby
[17:37:32] mustmodify: and now that I'm thinking about it, this isn't really relational data. So this might be a good candidate for experimenting with a nosql db.
[17:38:04] danielpclark: has joined #ruby
[17:38:06] jhass: Sequel & Sinatra are fine and fast to learn for this if you want to keep the relational data
[17:38:40] jhass: s/data/dbms/
[17:38:59] _blizzy_: has joined #ruby
[17:39:09] havenwood: mustmodify: I vote Roda with Sequel. :)
[17:39:53] jhass: as for specialized DBs for that kind... idk possibly RDD? not sure it'd scale well for many devices though
[17:40:04] havenwood: mustmodify: Or live on the wild side with YDBM :P http://ruby-doc.org/stdlib/libdoc/yaml/rdoc/YAML/DBM.html
[17:40:56] mostlybadfly: has joined #ruby
[17:41:31] jhass: er, RRD I mean, the other way around :P
[17:42:05] phpwebdev: has joined #ruby
[17:43:08] bradleyprice: has joined #ruby
[17:43:25] boontdus`: has joined #ruby
[17:44:11] flashpoint9: has joined #ruby
[17:45:06] KensoDev: has joined #ruby
[17:45:27] n008f4g_: has joined #ruby
[17:45:55] jenrzzz: has joined #ruby
[17:46:34] jud: has joined #ruby
[17:47:20] nanoz: has joined #ruby
[17:47:57] codecop: has joined #ruby
[17:48:22] dfockler: has joined #ruby
[17:48:53] ramfjord: has joined #ruby
[17:49:58] ChiefAlexander: has joined #ruby
[17:50:43] nofacade: has joined #ruby
[17:53:27] ahammond: has joined #ruby
[17:56:32] `tim`: has joined #ruby
[17:57:11] baweaver: has joined #ruby
[17:58:57] ramfjord: has joined #ruby
[18:00:45] Dimik: has joined #ruby
[18:01:01] jrafanie: has joined #ruby
[18:01:03] B1n4r10: has joined #ruby
[18:02:34] MagePsycho_: has joined #ruby
[18:03:03] bronson: has joined #ruby
[18:04:08] rcvalle: has joined #ruby
[18:04:09] DotKite: has joined #ruby
[18:05:57] DotKite: anyone know why [1,1,2,3].permutation(4).to_a would generate duplicates? I get two elements that read [1,1,2,3] in the result.
[18:06:08] mdw: has joined #ruby
[18:06:10] DotKite: among others
[18:06:39] benzrf: DotKite: i would assume that Array#permutation permutes the array ignoring the specific elements
[18:07:05] benzrf: so there's the identity permutation and the swap-first-two permutation
[18:07:22] benzrf: in this case they happen to produce the same result when applied, but that's not something the method cares about
[18:10:47] karapetyan: has joined #ruby
[18:12:04] yfeldblum: has joined #ruby
[18:12:49] aegis3121: has joined #ruby
[18:13:14] sid_fules: has joined #ruby
[18:14:03] borodin: has joined #ruby
[18:14:43] smathy: DotKite, it's a weird place to have that method, permutation *should* be on the Set class, not on Array.
[18:14:57] smathy: ...in which case duplicate members wouldn't be an issue.
[18:15:39] DotKite: thanks smathy, I'll try that out
[18:15:41] borodin: I'm trying to build a yaml lookup function like so: ConfigTools.lookup("system/aws/auth/secret_key") which would load a yaml file and find the value given. This is closest to what I need: http://stackoverflow.com/questions/14829462/search-check-values-in-yaml-document-with-ruby but it assumes you know the keys at runtime. But my function would not know the keys at runtime
[18:15:49] smathy: DotKite, no, it doesn't exist.
[18:15:51] borodin: seems like a function prople have already solved if I ask around
[18:16:04] smathy: DotKite, I meant that ruby *should* have Set#permutation not Array#permutation.
[18:16:25] DotKite: smthy, ah i see
[18:16:26] d10n-work: has joined #ruby
[18:16:27] pawnbox: has joined #ruby
[18:16:54] borodin: I could receive that string and split it on a delimiter, but then I'd need some way of crawling the tree and keeping track of where I've been, within a loop
[18:17:14] smathy: DotKite, my point is that the concept of permutation is related to a set, it's not well defined how it should act when applied to an object which can contain duplicate members.
[18:17:28] smathy: ...totally undefined really.
[18:18:46] ekinmur: has joined #ruby
[18:18:46] DotKite: smathy, then how would you go about generating all permutations of an array of characters?
[18:19:02] DotKite: where elements could be identical
[18:19:08] Xeago: has joined #ruby
[18:19:51] Xeago: has joined #ruby
[18:20:50] dfockler: also a mathematical set doesn't have a specific order
[18:21:27] william3: has joined #ruby
[18:23:23] tamole: has joined #ruby
[18:23:28] SilverKey: has joined #ruby
[18:23:35] Waqas: has joined #ruby
[18:24:00] Waqas: has joined #ruby
[18:24:03] dfockler: also probably why the Set class doesn't have any sort methods either
[18:24:19] Waqas: has joined #ruby
[18:24:27] al2o3-cr: has joined #ruby
[18:25:03] Waqas: has joined #ruby
[18:25:19] IrishGringo: has joined #ruby
[18:25:20] Waqas: has joined #ruby
[18:25:53] smathy: DotKite, honestly, I'd reopen the Set class and add the permutation method there: def permutation *args; to_a.permutation *args; end
[18:26:08] smathy: I just couldn't live with calling permutation on Array
[18:26:12] last_staff: has joined #ruby
[18:26:39] Waqas: has joined #ruby
[18:26:52] smathy: DotKite, and then: [1,1,2,3].to_set.permutation.to_a # => [[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]]
[18:26:54] Waqas: has joined #ruby
[18:27:40] Waqas: has joined #ruby
[18:27:54] Waqas: has joined #ruby
[18:29:10] Waqas: has joined #ruby
[18:29:13] wzy: has joined #ruby
[18:29:29] Xeago: has joined #ruby
[18:29:30] Waqas: has joined #ruby
[18:29:30] flashpoint9: has joined #ruby
[18:30:18] szulak: has joined #ruby
[18:30:20] Waqas: has joined #ruby
[18:32:18] Marsupermammal: has joined #ruby
[18:32:37] shayan: has joined #ruby
[18:33:36] Renich: has joined #ruby
[18:34:25] wzy: has left #ruby: ("Leaving")
[18:34:42] finisherr: has joined #ruby
[18:35:02] carlisiacampos: has joined #ruby
[18:35:15] dhollinger: has joined #ruby
[18:36:04] Xeago: has joined #ruby
[18:37:55] centrx: has joined #ruby
[18:38:51] ChiefAlexander: has joined #ruby
[18:39:25] karapetyan: has joined #ruby
[18:41:10] Blaguvest: has joined #ruby
[18:41:23] madgen: has joined #ruby
[18:43:11] SilverKey: has joined #ruby
[18:45:08] ruby-lang352: has joined #ruby
[18:45:09] borodin: anybody know about yaml lookup function that works like so: Module.lookup("system/aws/auth/security_key") or Module.lookup("system::aws::auth::security_key")
[18:46:32] borodin: I think I've figured it out - just strip off the keys from the front one at a time, look to see if the key exists, if it does, create a data structure to hold data within that key, then do it all again until you've found the value
[18:46:57] ruby-lang352: Help on using Faraday gem
[18:47:01] baweaver: has joined #ruby
[18:47:07] centrx: borodin: Like an alias?
[18:47:55] bokayio: has joined #ruby
[18:48:17] ruby-lang352: I have written a code to interact with a SOAP service using Faraday gem and all is working fine except in production
[18:48:29] ruby-lang352: am getting following error
[18:48:32] ruby-lang352: rake aborted! cannot load such file -- faraday
[18:48:50] ruby-lang352: code deployment is done using cap
[18:48:54] centrx: ruby-lang352: Is the faraday gem in your Gemfile?
[18:48:56] mikecmpbll: has joined #ruby
[18:49:57] jhass: borodin: .split(SEP).inject(hash) {|hash, key| hash[key] || break }
[18:50:02] karapetyan: has joined #ruby
[18:50:09] centrx: ruby-lang352: Is there anything else to the error message (use gist)
[18:52:47] conta: has joined #ruby
[18:53:24] PedramT: has joined #ruby
[18:53:39] n008f4g_: has joined #ruby
[18:54:01] ruby-lang352: No specific error message, details when executed with --trace https://gist.github.com/anonymous/65b65b7c8574fab86bda4af721ee53fc
[18:54:29] jhass: ruby-lang352: try bundle exec rake ...
[18:54:32] Infra-Red: has joined #ruby
[18:55:04] Infra-Red: has joined #ruby
[18:56:32] Aviio: has joined #ruby
[18:56:50] sid_fules: has joined #ruby
[18:59:02] jackjackdripper: has joined #ruby
[18:59:08] jhass: ruby-lang352: also consider https://github.com/bbatsov/ruby-style-guide#snake-case-files
[19:00:58] rbennacer: has joined #ruby
[19:02:03] ruby-lang352: I dont get the with error while using bundle exec rake
[19:03:28] ruby-lang352: any specific reason for this behavior?
[19:04:38] MeMoc: has joined #ruby
[19:04:39] aegis3121: Your production box presumably has a different version of faraday installed that (I think) meets your specifications but doesn't actually implement feature x that you need or has broken feature x that you're using. Using bundle exec forces the version specified in the Gemfile.lock to be used.
[19:04:44] poerror: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[19:06:42] havenwood: ruby-lang352: Prefixing `bundle exec` runs the command "in the context of your Bundle" (meaning with the exact gem versions from your Gemfile.lock file). If you run the same command without `bundle exec` it'll require the latest available gems which may or may not be the same as those specified in the Gemfile.lock.
[19:06:53] zapata: has joined #ruby
[19:07:42] mdw7: has joined #ruby
[19:07:43] havenwood: ruby-lang352: Bundler's Gemfile.lock allows all developers working on the app to be using the exact same gems as are in production.
[19:08:16] jhass: ruby-lang352: also bundler's --path and --deployment options install to a location not found by rubygems without using bundle exec
[19:08:44] havenwood: And are confusingly "remembered" options.
[19:08:47] nofxx: has joined #ruby
[19:08:47] nofxx: has joined #ruby
[19:09:04] snowy: has joined #ruby
[19:09:12] banister: has joined #ruby
[19:09:24] havenwood: ruby-lang352: See: bundle help config
[19:09:40] poerror: has joined #ruby
[19:10:05] Blaguvest: has joined #ruby
[19:10:26] al2o3-cr: has joined #ruby
[19:10:46] ruby-lang352: so in my scheduler is it recommended to specify bundle exec rake XXX instead of just rake XXX?
[19:10:51] poerror: has left #ruby: ()
[19:11:13] jhass: yes, when using bundler better default to bundle exec, that'll save you most headaches
[19:11:18] jhass: locally too
[19:11:36] baweaver: has joined #ruby
[19:12:23] ruby-lang352: cool, thanks guys for your time and support
[19:14:42] acidrainfall: has joined #ruby
[19:14:58] minimalism: has joined #ruby
[19:14:59] bmf: has joined #ruby
[19:15:02] tildes: has joined #ruby
[19:15:14] jackjackdripper1: has joined #ruby
[19:15:53] freerobby: has joined #ruby
[19:16:15] northrup: has joined #ruby
[19:16:24] karmatr0n: has joined #ruby
[19:17:27] northrup: has joined #ruby
[19:18:42] dmr8: has joined #ruby
[19:18:57] Madplatypus: has joined #ruby
[19:21:49] [Butch]: has joined #ruby
[19:21:55] solars: has joined #ruby
[19:23:17] mustmodify: jhass: You were recommending Sequel & sinatra. I think you were on target with those. But I just realized that I don't need to use a database at all. My input and my deliverable are basically the same. If I just the right filenames I can create my deliverables as soon as I receive input.
[19:23:27] jhass: has joined #ruby
[19:23:38] Takumo: has joined #ruby
[19:23:38] Takumo: has joined #ruby
[19:23:53] mustmodify: Just append the newest position to the file and have sinatra spit that out.
[19:23:56] sp4rrow: has joined #ruby
[19:24:19] firstdayonthejob: has joined #ruby
[19:25:33] nobitanobi: has joined #ruby
[19:26:38] borodin: jhass the grey becomes jhass the white!
[19:26:57] symm-: has joined #ruby
[19:27:01] dionysus69: has joined #ruby
[19:27:06] bmf: has joined #ruby
[19:27:27] baweaver: jhass has been an op for a while now. Now we just gave him the company jacket ;)
[19:27:49] Xeago: has joined #ruby
[19:29:22] rbennacer: has joined #ruby
[19:31:54] shevy: jhass is blue
[19:32:08] baweaver: which client are you all using anyways?
[19:32:18] shevy: still the abandoned xchat!
[19:32:35] al2o3-cr: jhass: is blue
[19:32:44] mustmodify: has left #ruby: ()
[19:32:50] baweaver: (NSFW)xchat.com(NSFW) is the wrong site apparently, it's xchat.org
[19:33:26] jhass: weechat here too
[19:33:45] banister: baweaver textual
[19:34:03] banister: i've tried out all irc clients for osx and textual is by far the best IMO
[19:34:47] stunder: has joined #ruby
[19:36:06] eam: xxxchat
[19:38:17] webus: has joined #ruby
[19:39:25] miah: irssi forever =)
[19:39:54] kirun: has joined #ruby
[19:40:22] PedramT: has joined #ruby
[19:40:57] banisterfiend: has joined #ruby
[19:42:06] rkazak: has joined #ruby
[19:42:13] phaza: has joined #ruby
[19:42:25] platzhirsch: has joined #ruby
[19:42:58] baweaver: Still on Limechat for now
[19:44:15] davedev24: has joined #ruby
[19:44:18] rbennacer: has joined #ruby
[19:44:34] rbennacer: has joined #ruby
[19:44:58] bmf: has joined #ruby
[19:45:32] rbennacer: has joined #ruby
[19:46:46] zeroDivisible: has joined #ruby
[19:47:35] tom39291: has joined #ruby
[19:47:42] siaW: do i need to require something to use StringIO?
[19:47:45] siaW: if so then what?
[19:48:04] acidrainfall: baweaver: hahahaha that's funny
[19:49:29] PedramT: has joined #ruby
[19:50:24] Papierkorb: siaw: require 'stringio' # If needed
[19:50:47] siaW: Papierkorb: got it, which turns my class into #<StringIO:0x007f937e41c148>
[19:50:58] siaW: now how do i take the string out of it? any idea?
[19:51:28] baweaver: &ri StringIO
[19:51:29] `derpy: http://ruby-doc.org/stdlib-2.3.0/libdoc/stringio/rdoc/StringIO.html
[19:52:01] twilizant: has joined #ruby
[19:52:05] Papierkorb: siaw: StringIO#string
[19:52:26] Papierkorb: (To be fair, I did expect #to_s to work)
[19:53:09] siaW: it’s not working
[19:53:11] siaW: i tried this
[19:53:12] siaW: https://gist.github.com/siaw23/c9cd3f6d847eb0248d2d0c5bc7dfa207
[19:53:55] Papierkorb: >> StringIO.new("Foobar").string
[19:53:56] ruby[bot]: Papierkorb: # => "Foobar" (https://eval.in/555692)
[19:54:24] Papierkorb: siaw: what's the point of that line?
[19:54:28] MagePsycho_: has joined #ruby
[19:54:39] BSaboia: has joined #ruby
[19:54:57] Papierkorb: How are a XML reader and StringIO related?
[19:55:18] siaW: then it means i’m doing it completely wrong
[19:55:27] sp4rrow: has joined #ruby
[19:55:39] Papierkorb: siaw: This would be the moment where you should tell us what you're actually trying to do
[19:55:47] siaW: one minute
[19:56:54] aufi: has joined #ruby
[19:56:56] conta: has joined #ruby
[19:58:33] DanielI: has joined #ruby
[19:58:43] barajasfab: has joined #ruby
[19:58:52] siaW: Papierkorb: here https://gist.github.com/siaw23/c9cd3f6d847eb0248d2d0c5bc7dfa207
[19:59:20] sid_fules: has joined #ruby
[19:59:51] jenrzzz: has joined #ruby
[20:00:08] mlakewood: has joined #ruby
[20:01:06] siaW: because i want to render just the svg part of it
[20:01:57] Papierkorb: siaw: That's an ugly hack and you should reconsider: the_xml_data.gsub(/\A.*?\n/, '') # Untested
[20:02:12] Papierkorb: siaw: That whole thing *is* the SVG
[20:02:22] apeiros: the ? is superfluous. . doesn't match \n
[20:02:47] Papierkorb: And it may or may not work if there's no \n.
[20:03:07] Papierkorb: So, yeah, ugly hack and "don't do it".
[20:03:20] siaW: well if the whole this is svg then it doesn’t render with the xml part of it
[20:03:42] havenwood: fixed tabs: https://gist.github.com/siaw23/c9cd3f6d847eb0248d2d0c5bc7dfa207?ts=2
[20:03:43] siaW: if i remove the xml tag from the start then i see the image
[20:04:01] ruby[bot]: adaedra: I don't know anything about tabs
[20:04:19] S1kx: has joined #ruby
[20:04:30] bronson: has joined #ruby
[20:04:53] ur5us: has joined #ruby
[20:05:13] al2o3-cr: siaw: doc = Nokogiri::XML(data).to_html should remove the xml tag
[20:05:22] Devalo: has joined #ruby
[20:05:46] djbkd_: has joined #ruby
[20:07:02] siaW: al2o3-cr: no it doens't
[20:07:47] siaW: al2o3-cr: oops
[20:07:49] siaW: sorry it does
[20:08:57] benlieb: has joined #ruby
[20:09:24] platzhirsch: has left #ruby: ()
[20:09:24] william3: has joined #ruby
[20:09:51] acidrainfall: What's the *best* way to test for an array that may or may not exist?
[20:09:55] cdg: has joined #ruby
[20:09:58] Blaguvest: has joined #ruby
[20:10:02] siaW: al2o3-cr: thank you :)
[20:10:05] acidrainfall: if the array hasn't been instantiated, .any? causes an exception
[20:10:16] acidrainfall: Should I reverse the logic and use .nil?
[20:10:44] acidrainfall: The problem is not that it could contain no data but that it could not exist at all.
[20:11:16] baweaver: has joined #ruby
[20:13:41] biberu: has joined #ruby
[20:15:53] stunder: has joined #ruby
[20:16:48] jhass: acidrainfall: the *best* way is to not be uncertain about the array being there or not
[20:16:49] eljimmy: has joined #ruby
[20:16:54] mondo: has joined #ruby
[20:17:11] jhass: that is trying to find a better default value than "nil"
[20:17:37] mondo: Can anyone point me to the best way to take gems from one server and install them on another? I have a list of gems I need to move from one server to another server that does not have internet access.
[20:17:43] Thai_: has joined #ruby
[20:19:29] william3: has joined #ruby
[20:20:19] `tim`: has joined #ruby
[20:21:03] snowy: has joined #ruby
[20:21:07] nobitanobi: has joined #ruby
[20:22:43] smathy: mondo, http://bundler.io/v1.11/bundle_package.html
[20:22:57] Cohedrin_: has joined #ruby
[20:23:23] JakFrist: has joined #ruby
[20:24:03] anisha: has joined #ruby
[20:24:11] Cohedrin_: has joined #ruby
[20:24:44] postmodern: has joined #ruby
[20:26:35] mondo: smathy: thanks, I think that will do the trick.
[20:26:41] smathy: mondo, you're welcome.
[20:28:20] mlakewood: has joined #ruby
[20:28:54] eatsfoobars: has joined #ruby
[20:31:01] ramfjord: has joined #ruby
[20:31:15] acidrainfall: jhass: I'll eventually be open sourcing this script, and wanted to leave room for error if people don't format the data properly
[20:31:31] acidrainfall: jhass: but that may just be me babying people
[20:31:38] acidrainfall: because I have to baby people here haha
[20:32:03] acidrainfall: "If I can't trust people I know to do it right, how can I trust joe schmoe on the interwebs?"
[20:32:11] Ox0dea: "Be liberal in what you accept."
[20:32:19] acidrainfall: I like that mentality
[20:32:20] jhack_: has joined #ruby
[20:32:32] acidrainfall: But getting into these kinds of data structures... it's just hard.
[20:32:34] jhass: validate your input then
[20:32:40] acidrainfall: That's what I'm doing
[20:33:26] jhass: if you run into NoMethodErrors, I don't think so
[20:34:07] centrx: has joined #ruby
[20:34:38] pawnbox: has joined #ruby
[20:35:04] acidrainfall: Yeah I guess that's what it is.
[20:35:43] acidrainfall: It's complicated. I don't think there's an easy way to make this script work, because it's a complicated process and it will need to be customized per environment.
[20:36:03] acidrainfall: I'm adding features as I think of them but the admin that wants to use this will have to have half a brain.
[20:36:13] acidrainfall: "have to have half" - freaking english man.
[20:37:18] acidrainfall: "if you have to halve, have half."
[20:37:52] lemur: has joined #ruby
[20:38:18] acidrainfall: Anyway this is complicated because Elasticsearch offers *no* support for rolling restarts on clusters. They also don't specify anything about the environment in which it runs. If I cared enough I could handle all of those, but this script is for us, and I'm opening it as a courtesy because no other workable solutions exist out there.
[20:38:33] acidrainfall: ACTION shrugs
[20:40:28] rubyaw: has joined #ruby
[20:40:45] Balzrael: has joined #ruby
[20:40:47] hyperdrive: has joined #ruby
[20:41:02] alexblom: has joined #ruby
[20:41:12] mhenrixon: has joined #ruby
[20:43:03] yfeldblum: has joined #ruby
[20:44:32] bigkevmcd: has joined #ruby
[20:45:06] nobitanobi: has joined #ruby
[20:46:15] auxbuss: has joined #ruby
[20:47:07] jaguarmagenta: has joined #ruby
[20:47:19] stunder: has joined #ruby
[20:48:08] dn`: has joined #ruby
[20:49:00] Paradox: has joined #ruby
[20:50:35] newjersey: has joined #ruby
[20:50:39] auxbuss_: has joined #ruby
[20:51:14] auxbuss: has joined #ruby
[20:51:39] bb010g: has joined #ruby
[20:52:12] rubyaw: has joined #ruby
[20:52:36] snockerton: has joined #ruby
[20:53:14] bkxd: has joined #ruby
[20:53:53] auxbuss: has joined #ruby
[20:57:28] sp4rrow: has joined #ruby
[20:58:30] joonty: has joined #ruby
[21:00:43] Brackson: has joined #ruby
[21:01:55] shinymcshine: has joined #ruby
[21:04:23] skweek: has joined #ruby
[21:05:26] constantinexvi: has joined #ruby
[21:05:44] CausaMortis: has joined #ruby
[21:06:53] nobitanobi: has joined #ruby
[21:08:16] eljimmy: has joined #ruby
[21:08:53] binaryplease1: has joined #ruby
[21:09:54] tax: has joined #ruby
[21:11:14] sid_fules: has joined #ruby
[21:14:03] A124: Umm.. if I want to have Parser to be equivalent to JSON.parse method, what should I do?
[21:14:24] A124: In a sense i just want to call Parser instead JSON.parse
[21:14:32] jhass: "call parser"?
[21:14:34] mesamoo: has joined #ruby
[21:14:42] jhass: you want a method named Parser? just define it
[21:15:21] pawnbox: has joined #ruby
[21:15:40] A124: Yeah, method named parser, but that method would be identical to JSON.parse.
[21:15:51] baweaver: Why though?
[21:16:00] A124: The thing is there are multiple options and once I select that option, I want simple way to call it.
[21:16:14] loincloth: has joined #ruby
[21:16:21] adaedra: def parser(*args); JSON.parse(*args); end
[21:16:32] edwinvdgraaf: has joined #ruby
[21:16:33] ruby[bot]: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[21:16:48] A124: baweaver I told you why.
[21:17:18] A124: adaedra Yeah, but that would mean writing tons of def blocks. Plus one more method call.
[21:17:27] sepp2k: has joined #ruby
[21:17:45] dcope: has joined #ruby
[21:17:46] adaedra: Then I didn't understand what you want, hence the ?xy.
[21:18:12] A124: I want Parser to be substitute for JSON.parse
[21:18:16] jhass: my guess is you actually want something like parsers = {json: ->(doc) { JSON.parse(doc) }, yaml: ->(doc) { YAML.load(doc)}, ...}; parser = parsers[chosen_parser]
[21:18:45] A124: In my case it is multiple JSON parsers.
[21:19:00] jhass: are you reimplementing the multi_json gem?
[21:19:31] Cohedrin: has joined #ruby
[21:19:36] baweaver: hence the xy
[21:19:53] baweaver: anyways, coffee time for me.
[21:19:55] jhass: yeah, fully appropriate
[21:20:05] Xiti: has joined #ruby
[21:20:15] A124: Not fully.
[21:20:29] A124: Can I just make Parser refer to same object?
[21:21:03] adaedra: what object
[21:21:17] A124: JSON.parse
[21:21:29] adaedra: that's a method
[21:21:33] x77686d: has joined #ruby
[21:21:45] codex: has joined #ruby
[21:21:47] adaedra: and in Ruby, methods are not first-class citizens
[21:22:01] A124: Ok, can I make Parse refer to it?
[21:22:23] eatsfoobars: has joined #ruby
[21:22:33] A124: Aka, doing the same, without the onion method wrap.
[21:22:33] adaedra: yes, by calling the method you want, like demonstrated above
[21:25:06] adaedra: If your problem is doing ifs to choose which one to call, and if all classes use the same interface, you can store the choosen class in a variable like @engine, then do @engine.parse
[21:25:39] A124: They use different, else I would do exactly that.
[21:25:50] A124: I never understood Lambdas, gotta try, thank you
[21:25:53] ekinmur: has joined #ruby
[21:25:58] johnmilton: has joined #ruby
[21:26:02] flashpoint9: has joined #ruby
[21:26:14] william3: has joined #ruby
[21:26:44] adaedra: On these words, g'night all.
[21:27:23] tubuliferous: has joined #ruby
[21:28:39] dopie: has joined #ruby
[21:29:19] Devalo: has joined #ruby
[21:30:13] solocshaw: has joined #ruby
[21:30:34] cschneid: What's the right syntax to override #initialize, not use the arguments, and then call super with the same list passed in? `def initialize(*); @thing = 1; super; end`?
[21:30:58] jhass: should work
[21:31:21] cschneid: cool, that's a surprisingly hard thing to google for :)
[21:31:37] cschneid: also I just tried it in irb, which I should have done rather than typing out that whole line.
[21:33:28] R\w\C: has joined #ruby
[21:33:34] R\w\C: hey guys anyone got huginn experience ?
[21:34:36] ruby[bot]: Just ask your question, if anyone has or can, they will respond.
[21:34:52] R\w\C: I am trying to setup gmail sending e-mails.. and I am editing the .env file
[21:35:02] R\w\C: do i need to rebuild my app or will it update automatically ?
[21:35:26] jobewan: has joined #ruby
[21:36:54] ensyde: has joined #ruby
[21:37:06] A124: jhass Thanks for the lambda example, would like to find where it is explained, though I get the syntax of the example. Got lot more to thing around now.
[21:37:52] jhass: A124: I can imagine Proc, Kernel#proc and Kernel#lambda has some on it
[21:38:00] Drakevr: has joined #ruby
[21:38:33] A124: ACTION will look
[21:39:47] jhass: and stabby lambda is briefly mentioned in http://ruby-doc.org/core-2.3.0/doc/syntax/literals_rdoc.html#label-Procs
[21:43:39] A124: Now I completely get it, thank you :)
[21:44:57] A124: About XY problem, a thing I did not mention and not completely related: Would like to read HTTP line by line. If there are any recommendations, would be glad.
[21:45:20] BSaboia: has joined #ruby
[21:45:32] A124: Else I would just open socket, send hand made request, and use .gets on socket.
[21:45:33] jhass: well, use TCPSocket / TCPServer
[21:45:42] jhass: possible the ssl variants
[21:46:13] A124: Hmm... Any way to get HTTP headers made by the HTTP class or should I just hand craft them?
[21:46:30] jhass: uh, if anything it's on Net::HTTP::Request
[21:47:06] A124: Already going there :)
[21:47:48] jhass: btw if you're fine with the lambda approach, Object#method / Method might give you a shortcut
[21:47:56] jhass: for some at least
[21:49:51] swills: has joined #ruby
[21:50:57] baweaver: has joined #ruby
[21:51:20] jhass: http://devdocs.io/ruby~2.3/net/httpgenericrequest#method-i-write_header private method but I guess you're on a weird trip already anyhow :P
[21:52:58] bokayio: has joined #ruby
[21:53:22] wilsonc91: has joined #ruby
[21:53:56] yohle: has joined #ruby
[21:54:32] A124: Yeah, not a pro dev, doing OSS. So weird trip for experience and somewhere along also code.
[21:54:54] A124: This actually looks really nice, except it means calling it.
[21:55:09] A124: Someone did provide me with example in python all it needs is:
[21:55:25] A124: r = requests.get('http://127.0.0.1/index.html', stream=True)
[21:55:42] A124: l = r.raw.readline
[21:55:50] Yiota: has joined #ruby
[21:55:53] jhass: so you just want an IO for the body?
[21:56:10] A124: But it is streaming, and chunked.
[21:56:15] joneshf-laptop: has joined #ruby
[21:56:31] A124: Returning json object per line.
[21:57:41] BrunoSaboia: has joined #ruby
[21:57:52] David27: has joined #ruby
[21:59:00] BSab: has joined #ruby
[21:59:32] jhass: how about http://devdocs.io/ruby~2.3/net/httpresponse#method-i-read_body
[21:59:34] ramfjord: has joined #ruby
[21:59:42] IrishGringo: has joined #ruby
[22:00:02] kies: has joined #ruby
[22:01:11] A124: Yes, I tried to do that, but those fragments could have line splits. So would have to wrap it in conditions detecting newlines and << into string.
[22:01:22] jhass: or you can .instance_variable_get(:@socket) I guess...
[22:01:33] A124: Or array and join, but those object are actually small usually so the error appeared overnight.
[22:02:47] A124: Aaah... that is what I was looking for and could not find (I should have read the source better) Going at it, Thank you very much.
[22:03:21] jhass: A124: note that's raw stuff, chunked, possibly gzipped
[22:03:48] yohle: has joined #ruby
[22:03:50] BrunoSaboia: has joined #ruby
[22:04:03] A124: Well, its socket, so .readline is not a problem. The API is not using compression, but Gzip reader would not be a problem :)
[22:04:28] A124: Just have to figure out how to call the HTTP and where (moment) to hook it.
[22:05:48] jhass: where you had read_body previously I'd guess
[22:07:46] ramfjord_: has joined #ruby
[22:09:33] A124: NoMethodError: private method `gets' called for #<Net::BufferedIO io=#<TCPSocket:0x000000018ef9d0>>
[22:09:42] A124: Going to look into that.
[22:14:01] sid_fules: has joined #ruby
[22:17:05] `tim`: has joined #ruby
[22:18:31] n008f4g_: has joined #ruby
[22:21:05] kies: has joined #ruby
[22:25:01] A124: So it did not work, calling private gets just stalls, so I tried .start .send_request, but gets (eventhough now public), stalls again.
[22:25:43] A124: So I guess Ruby cannot do that itself. Either handling the chunks, which does not happen in fast C, or making the request by hand. So depending on use case.
[22:26:15] jhass: how about looking into other http client libs?
[22:26:31] A124: Or using other gem/library, if there is one that does it, or finding something that takes socket and spits outs lines.
[22:27:13] vishwa: has joined #ruby
[22:27:25] ruby[bot]: -bb $a:fowlmouth$#ruby-banned fowl!*@*$#ruby-banned
[22:27:31] GodFather: has joined #ruby
[22:27:36] vishwa: Hey guys, given an array, how do I generate all pairs from it?
[22:27:39] A124: I already did which led me to look at other, even rare still programming languges and doing evented IO. But that was different usecase, though those projects are siblings.
[22:27:46] william3: has joined #ruby
[22:27:56] A124: vishwa What is a pair in array?
[22:27:59] vishwa: like [1,2,3 ] => [(1,2),(2,3),1,3)]
[22:28:09] vishwa: pairs of elements A124
[22:28:11] A124: .slice I think.
[22:28:57] Ebok: has joined #ruby
[22:29:48] vishwa: A124: slices let you pick out a part of the array, how would I use that to generate pairs?
[22:30:54] Devalo: has joined #ruby
[22:31:03] vishwa: A124: array.combination is the way to go
[22:31:34] A124: vishwa [1,2,3 ]
[22:31:40] A124: [1,2,3,4].each_slice(2).to_a
[22:31:47] vishwa: Ahh, cool, thanks
[22:32:19] al2o3-cr: >> [1,2,3].combination(2).to_a
[22:32:21] ruby[bot]: al2o3-cr: # => [[1, 2], [1, 3], [2, 3]] (https://eval.in/555802)
[22:32:28] smathy: Yeah, each_slice doesn't work.
[22:32:48] johnmilton: has joined #ruby
[22:33:18] A124: Doesn't?
[22:33:45] A124: My bad, I was blind, vishwa
[22:34:10] A124: ACTION needs rest
[22:35:40] w1lson: has joined #ruby
[22:35:47] R\w\C: has joined #ruby
[22:37:43] zenlot6: has joined #ruby
[22:38:36] lemur: has joined #ruby
[22:39:08] rbennacer: has joined #ruby
[22:40:38] rbennacer: has joined #ruby
[22:44:11] elusiveother: has joined #ruby
[22:44:11] elusiveother: has joined #ruby
[22:45:26] blackwell: has joined #ruby
[22:45:32] guardian: has joined #ruby
[22:46:33] brent__: trying to do a regex to confirm that an iput matches the format of '0, 2' where those two digits can be 0..2, would it be \[0-2], [0-2]\.matches(input)?
[22:47:02] Canar: has joined #ruby
[22:48:02] jaguarmagenta: has joined #ruby
[22:49:30] ruby[bot]: Why don't you try it and see for yourself?
[22:49:36] ramfjord_: brent__: yes, and to validate that, try using http://rubular.com/
[22:49:37] Canar: has joined #ruby
[22:51:09] sarbs: has joined #ruby
[22:51:54] darix: brent__: maybe if you replace the \ with /?
[22:52:11] brent__: yeah, i saw taht misatke darix
[22:52:58] brent__: it looks like it works that way. ramfjord: i'm not getting matchign w/ rubular, though ti appears to be the correc tway
[22:54:09] brent__: nvm, got it to work, cool website, thanks
[22:55:12] BSab: has joined #ruby
[22:55:38] Greg1: has joined #ruby
[22:56:06] cdg: has joined #ruby
[22:56:23] sp4rrow_: has joined #ruby
[22:58:38] jschoolcraft: has joined #ruby
[23:01:56] al2o3-cr: has joined #ruby
[23:04:23] solocshaw1: has joined #ruby
[23:05:22] SilverKey: has joined #ruby
[23:14:06] GinoMan2440: has joined #ruby
[23:16:43] ss_much: has joined #ruby
[23:18:29] banister: has joined #ruby
[23:18:45] GinoMan2440: has joined #ruby
[23:19:55] vishwa: has joined #ruby
[23:20:05] baweaver: has joined #ruby
[23:20:28] _www-bukolay-com: has joined #ruby
[23:23:24] ruby-lang147: has joined #ruby
[23:23:34] Rasi: has joined #ruby
[23:25:36] bosnianboy: has joined #ruby
[23:28:12] vishwa: has joined #ruby
[23:28:42] _www-bukolay-com: has joined #ruby
[23:29:23] william3: has joined #ruby
[23:29:51] centrx: has joined #ruby
[23:32:06] A124: has joined #ruby
[23:32:39] bigkevmcd: has joined #ruby
[23:35:26] JamesBrink: has joined #ruby
[23:37:11] edv4rd0: has joined #ruby
[23:37:36] mwlang: has joined #ruby
[23:38:22] Rasi: has joined #ruby
[23:40:04] skweek: has joined #ruby
[23:44:42] diegoaguilar: has joined #ruby
[23:45:57] Yiota: has joined #ruby
[23:46:13] snowy: has joined #ruby
[23:48:02] darkf: has joined #ruby
[23:50:50] A124: has joined #ruby
[23:51:11] stunder: has joined #ruby
[23:53:45] sp4rrow: has joined #ruby
[23:59:01] jhass: brent__: note that allows stuff like 'foo0, 2bar' too, if you don't want that add \A at the beginning and \z at the end