« Back to channel list

#ruby - 05 May 2016

« Back 1 day Forward 1 day »
[00:01:20] dudepare: has joined #ruby
[00:01:28] dudepare: benzrf: ok, thanks!
[00:01:45] hck89: has joined #ruby
[00:02:21] Shidash: has joined #ruby
[00:03:32] FooMunki: has joined #ruby
[00:04:08] emilford: has joined #ruby
[00:12:33] htmldrum: has joined #ruby
[00:15:10] xcesariox: has joined #ruby
[00:19:19] havenwood: dudepare: since the argument is unused it'd be idiomatic to show that it's so with an underscore: def tag_name(_) end
[00:20:57] flashpoint9: has joined #ruby
[00:22:15] dudepare: havenwood: i see, that's code from jekyll codebase, i'm trying to learn ruby by reading code.
[00:22:24] havenwood: dudepare: nice
[00:22:28] CloCkWeRX: has joined #ruby
[00:22:32] blackwell: has joined #ruby
[00:24:00] sneakerhax: has joined #ruby
[00:24:08] Ispira: has joined #ruby
[00:24:12] hck89: has joined #ruby
[00:24:27] ensyde: has joined #ruby
[00:24:48] panpainter: has joined #ruby
[00:24:54] ftj: has joined #ruby
[00:25:08] blackwell: has joined #ruby
[00:27:54] blur3d: has joined #ruby
[00:28:26] kies: has joined #ruby
[00:28:36] jenrzzz: has joined #ruby
[00:28:36] jenrzzz: has joined #ruby
[00:31:01] chouhoulis: has joined #ruby
[00:31:12] weemsledeux: has joined #ruby
[00:31:24] moeabdol: has joined #ruby
[00:34:59] djbkd_: has joined #ruby
[00:38:00] Ropeney: has joined #ruby
[00:38:16] phantummm: has joined #ruby
[00:39:59] nerium_: has joined #ruby
[00:42:50] jaguarmagenta: has joined #ruby
[00:45:37] emilford: has joined #ruby
[00:46:26] FooMunki: has joined #ruby
[00:46:44] P4Titan`: has joined #ruby
[00:46:46] statelesscode: has joined #ruby
[00:50:12] jaguarma_: has joined #ruby
[00:50:33] chouhoulis: has joined #ruby
[00:51:43] nerium: has joined #ruby
[00:52:23] failshell: has joined #ruby
[00:55:01] bronson: has joined #ruby
[00:55:24] kareeoleez: has joined #ruby
[00:59:24] choke: has joined #ruby
[01:01:06] Ebok: has joined #ruby
[01:01:28] zacstewart: has joined #ruby
[01:04:19] htmldrum: has joined #ruby
[01:07:17] FooMunki: has joined #ruby
[01:09:53] ramfjord: has joined #ruby
[01:10:42] jaguarmagenta: has joined #ruby
[01:11:16] Shardik: has joined #ruby
[01:11:33] hahuang65: has joined #ruby
[01:13:12] moei: has joined #ruby
[01:16:55] bruno-: has joined #ruby
[01:19:06] RegulationD: has joined #ruby
[01:21:03] karapetyan: has joined #ruby
[01:22:18] solocshaw: has joined #ruby
[01:22:30] bazz_: has joined #ruby
[01:23:12] bruno-: has joined #ruby
[01:24:39] htmldrum: has joined #ruby
[01:26:18] danman: has joined #ruby
[01:28:30] bazz__: has joined #ruby
[01:29:17] roadt__: has joined #ruby
[01:31:57] jtdowney: has joined #ruby
[01:31:57] jtdowney: has joined #ruby
[01:35:16] rkazak: has joined #ruby
[01:35:56] dikaio: has joined #ruby
[01:36:37] LoneHerm_: has joined #ruby
[01:38:31] panpainter: has joined #ruby
[01:40:37] Coldblackice: has joined #ruby
[01:44:05] x77686d: has joined #ruby
[01:45:14] crdpink: has joined #ruby
[01:47:10] swills: has joined #ruby
[01:50:56] jaguarmagenta: has joined #ruby
[01:51:14] Moosashi: has joined #ruby
[01:53:02] rbennacer: has joined #ruby
[01:57:14] citizentwo: has joined #ruby
[01:58:23] jaguarmagenta: has joined #ruby
[01:59:37] _panpainter: has joined #ruby
[02:01:23] flashpoint9: has joined #ruby
[02:03:39] raeoks: has joined #ruby
[02:05:36] ledestin: has joined #ruby
[02:06:43] notwithstanding: has joined #ruby
[02:06:49] notwithstanding: hi im trying to run a tool but getting an error
[02:07:13] notwithstanding: . /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- iconv (LoadError)
[02:08:18] bruno-: has joined #ruby
[02:09:18] sdwrage: has joined #ruby
[02:10:00] panpainter: has joined #ruby
[02:10:39] Puffball: has joined #ruby
[02:12:59] GinoMan2440: has joined #ruby
[02:13:35] mwlang: notwithstanding: gem install iconv
[02:13:43] yqt: has joined #ruby
[02:13:59] mwlang: but I think iconv is largely obsolete for Ruby 1.9+
[02:14:28] notwithstanding: so what do i do themn
[02:14:29] failshell: has joined #ruby
[02:16:45] notwithstanding: ok that seems to have done something. now i get a new one undefined method `available?' for Gem:Module (NoMethodError
[02:17:58] Diaoer: has joined #ruby
[02:18:45] notwithstanding: maybe i should just install an old ruby ?
[02:19:18] Devalo: has joined #ruby
[02:19:29] moeabdol: has joined #ruby
[02:21:56] emilford: has joined #ruby
[02:22:30] ChiefAlexander: has joined #ruby
[02:23:13] milesmatthias: has joined #ruby
[02:23:17] jenrzzz: has joined #ruby
[02:27:15] ensyde__: has joined #ruby
[02:27:27] rbennacer: has joined #ruby
[02:29:17] govg: has joined #ruby
[02:29:20] emilford: has joined #ruby
[02:31:00] arescorpio: has joined #ruby
[02:34:19] DotKite: has joined #ruby
[02:35:14] DotKite: Whats the best way to delete the first occurrence if a given character in a string?
[02:35:39] davedev24: has joined #ruby
[02:36:08] cjbottaro: has joined #ruby
[02:36:11] lessless: has joined #ruby
[02:36:30] djbkd: has joined #ruby
[02:43:09] cibs: has joined #ruby
[02:43:34] havenwood: 'DotKite'.sub 't', ''
[02:43:54] mwlang: notwithstanding: best thing to do is remove require ‘iconv’ from your files and replace functionality with encodings: http://ruby-doc.org/core-2.1.2/Encoding.html
[02:44:16] jokke: has joined #ruby
[02:45:08] mwlang: notwithstanding: http://stackoverflow.com/questions/9126782/how-to-change-deprecated-iconv-to-stringencode-for-invalid-utf8-correction
[02:45:19] speakingcode: has joined #ruby
[02:45:32] DotKite: havenwood, thanks a bunch
[02:45:33] notwithstanding: i reverted my kali box
[02:45:47] notwithstanding: i tried to install whatweb when it was already installed and gibbed it, so this will do
[02:49:54] davedev24: has joined #ruby
[02:50:08] IrishGringo: has joined #ruby
[02:50:30] CloCkWeRX: has joined #ruby
[02:51:30] tax: has joined #ruby
[02:52:08] Moosashi: has joined #ruby
[02:52:30] _panpainter: has joined #ruby
[02:53:20] TheWhip: has joined #ruby
[02:55:53] SilverKey: has joined #ruby
[02:56:52] bronson: has joined #ruby
[02:57:12] gizless: has joined #ruby
[02:57:22] tubuliferous: has joined #ruby
[02:58:11] SilverKey: has joined #ruby
[03:02:44] panpainter: has joined #ruby
[03:06:08] A124: has joined #ruby
[03:07:31] QingFengComprado: has joined #ruby
[03:09:38] Caerus: hello #ruby :)
[03:14:06] heyimwill: has joined #ruby
[03:14:23] crdpink: has joined #ruby
[03:15:10] segy_: has joined #ruby
[03:15:34] braincrash: has joined #ruby
[03:15:37] crdpink2: has joined #ruby
[03:17:40] segy-: has joined #ruby
[03:22:33] flashpoint9: has joined #ruby
[03:23:14] Eiam_: has joined #ruby
[03:26:44] panpainter: has joined #ruby
[03:27:09] gix: has joined #ruby
[03:27:45] whathappens: has joined #ruby
[03:37:01] panpainter: has joined #ruby
[03:37:13] djbkd: has joined #ruby
[03:40:30] Rasi: has joined #ruby
[03:41:39] craysiii1: has joined #ruby
[03:41:42] hk238: has joined #ruby
[03:46:41] grenierm: has joined #ruby
[03:48:31] brent__: has joined #ruby
[03:49:25] TheWhip: has joined #ruby
[03:52:47] terminal_: has joined #ruby
[03:53:11] lessless: has joined #ruby
[03:55:12] raeoks: has joined #ruby
[03:56:34] raeoks: has joined #ruby
[03:58:47] terminal_: has joined #ruby
[03:59:23] raeoks: has joined #ruby
[03:59:24] binaryplease1: has joined #ruby
[04:00:20] blackgoat: has joined #ruby
[04:01:20] nfsnobody: has joined #ruby
[04:02:40] d0lph1n98: has joined #ruby
[04:02:52] raeoks: has joined #ruby
[04:04:02] raeoks: has joined #ruby
[04:07:27] LoneHerm_: has joined #ruby
[04:07:37] moeabdol: has joined #ruby
[04:08:43] gizless: is there anything like bookmark search yet?
[04:09:27] gizless: like i have a list and set markers for 'a', 'b', '3600'
[04:09:55] gizless: and could search for a stream position easily
[04:10:22] pawnbox: has joined #ruby
[04:10:28] chouhoulis: has joined #ruby
[04:11:03] blackgoat: has joined #ruby
[04:11:12] jaguarmagenta: has joined #ruby
[04:11:29] whathappens: has joined #ruby
[04:11:31] kareeoleez: has joined #ruby
[04:11:42] Arcaire: gizless: wut?
[04:16:27] failshell: has joined #ruby
[04:17:37] djbkd: has joined #ruby
[04:18:20] Moosashi: has joined #ruby
[04:19:57] panpainter: has joined #ruby
[04:20:21] tristanp: has joined #ruby
[04:20:52] rbennacer: has joined #ruby
[04:23:21] moeabdol: has joined #ruby
[04:24:31] rbennacer: has joined #ruby
[04:26:05] Moosashi: has joined #ruby
[04:30:13] panpainter: has joined #ruby
[04:33:22] LoneHerm_: has joined #ruby
[04:34:36] tmtwd: has joined #ruby
[04:36:46] SilverKey: has joined #ruby
[04:38:09] rbennacer: has joined #ruby
[04:38:12] djbkd_: has joined #ruby
[04:39:30] SilverKey: has joined #ruby
[04:42:16] SilverKey: has joined #ruby
[04:46:22] SilverKey: has joined #ruby
[04:47:59] jaguarmagenta: has joined #ruby
[04:48:38] blackgoat: has joined #ruby
[04:51:54] rbennacer: has joined #ruby
[04:52:22] lxsameer: has joined #ruby
[04:52:22] lxsameer: has joined #ruby
[04:53:38] beawesomeinstead: has joined #ruby
[04:53:44] jimmybomb: has joined #ruby
[04:55:13] mdanielk: has joined #ruby
[04:55:21] raeoks: has joined #ruby
[04:56:12] freerobby: has joined #ruby
[04:57:00] karapetyan: has joined #ruby
[04:58:02] mdanielk: is there any from indonesia here?
[04:58:44] bronson: has joined #ruby
[05:01:05] rbennacer: has joined #ruby
[05:01:23] stannard: has joined #ruby
[05:01:53] panpainter: has joined #ruby
[05:02:28] bruno-: has joined #ruby
[05:02:57] x77686d: has joined #ruby
[05:02:59] zacstewart: has joined #ruby
[05:04:38] mdanielk: has left #ruby: ()
[05:04:40] duncannz: has joined #ruby
[05:08:09] Spami: has joined #ruby
[05:10:21] rbennacer: has joined #ruby
[05:12:08] panpainter: has joined #ruby
[05:17:32] jenrzzz: has joined #ruby
[05:18:37] Radar: gizless: huh?
[05:19:25] chopin: has joined #ruby
[05:19:30] rbennacer: has joined #ruby
[05:21:20] RegulationD: has joined #ruby
[05:22:08] emilford: has joined #ruby
[05:22:29] ravishankarjha: has joined #ruby
[05:26:38] haxrbyte: has joined #ruby
[05:27:33] tildes_: has joined #ruby
[05:28:23] krasnus: has joined #ruby
[05:28:35] rbennacer: has joined #ruby
[05:33:04] ledestin: has joined #ruby
[05:36:42] montagne_goat: has joined #ruby
[05:37:48] rbennacer: has joined #ruby
[05:38:47] djbkd_: has joined #ruby
[05:39:23] yardenbar: has joined #ruby
[05:39:31] CloCkWeRX: has joined #ruby
[05:39:44] troys: has joined #ruby
[05:40:49] hinbody: has joined #ruby
[05:41:19] heyimwill: has joined #ruby
[05:41:55] panpainter: has joined #ruby
[05:47:25] rbennacer: has joined #ruby
[05:52:10] panpainter: has joined #ruby
[05:52:23] weemsledeux: has joined #ruby
[05:52:35] the_drow: has joined #ruby
[05:53:14] nwhirschfeld: has joined #ruby
[05:55:06] govg: has joined #ruby
[05:56:49] krasnus: has joined #ruby
[05:57:02] yfeldblum: has joined #ruby
[05:57:59] yfeldblum: has joined #ruby
[05:59:52] lycaonian: has joined #ruby
[06:00:55] rbennacer: has joined #ruby
[06:03:26] tvw: has joined #ruby
[06:04:04] moeabdol: has joined #ruby
[06:04:33] bruno-: has joined #ruby
[06:06:14] der-landgraf: has joined #ruby
[06:06:59] djbkd: has joined #ruby
[06:07:01] tAn: has joined #ruby
[06:07:20] heyimwill: has joined #ruby
[06:07:46] kareeoleez: has joined #ruby
[06:08:10] gizmore: has joined #ruby
[06:09:53] raeoks: has joined #ruby
[06:10:11] grenierm: has joined #ruby
[06:10:42] gizmore|2: has joined #ruby
[06:12:13] gizless: has joined #ruby
[06:12:40] notwithstanding: has left #ruby: ()
[06:16:02] chouhoulis: has joined #ruby
[06:16:58] the_drow: has joined #ruby
[06:17:16] failshell: has joined #ruby
[06:17:42] elifoster: has joined #ruby
[06:17:43] gizmore: has joined #ruby
[06:17:50] d0lph1n98: has joined #ruby
[06:18:37] gizmore|2: has joined #ruby
[06:19:20] rbennacer: has joined #ruby
[06:19:57] jenrzzz: has joined #ruby
[06:22:08] ravishankarjha: has joined #ruby
[06:24:00] Devalo: has joined #ruby
[06:24:18] emilford: has joined #ruby
[06:25:24] Caerus: >> eval "10 + 23".class
[06:25:25] ruby[bot]: Caerus: # => no implicit conversion of Class into String (TypeError) ...check link for more (https://eval.in/565796)
[06:25:26] CloCkWeRX: has joined #ruby
[06:26:02] djbkd: has joined #ruby
[06:26:04] Caerus: >> eval(puts "10 + 23").class
[06:26:05] ruby[bot]: Caerus: # => 10 + 23 ...check link for more (https://eval.in/565797)
[06:26:13] benlieb: has joined #ruby
[06:26:30] blur3d: has joined #ruby
[06:26:57] firstdayonthejob: has joined #ruby
[06:27:11] Caerus: >> eval("puts 10 + 23").class
[06:27:12] ruby[bot]: Caerus: # => 33 ...check link for more (https://eval.in/565798)
[06:27:34] kareeoleez: has anyone used geocoder gem? https://github.com/alexreisner/geocoder
[06:27:35] ramfjord: has joined #ruby
[06:27:43] LoneHerm_: has joined #ruby
[06:27:53] kareeoleez: I am trying to find out how to define a "region"
[06:28:21] rbennacer: has joined #ruby
[06:29:24] Caerus: guess puts never returns anything other than nil
[06:29:25] colegatron: has joined #ruby
[06:30:47] panpainter: has joined #ruby
[06:33:22] Caerus: kareeoleez, region akin to google maps viewport?
[06:34:52] staticfox: has joined #ruby
[06:34:55] kareeoleez: Caerus: what do you mean ? Can you explain a little bit more ?
[06:35:53] kareeoleez: something like geoJSON for region highlighting
[06:37:17] Caerus: in google maps API they use a viewport to set the boundaries aka region to limit its initial scope
[06:37:34] rbennacer: has joined #ruby
[06:37:53] lsmola: has joined #ruby
[06:39:00] lubekpl: has joined #ruby
[06:39:26] brendan-: has joined #ruby
[06:39:29] kareeoleez: Caerus: no idea
[06:39:33] codecop: has joined #ruby
[06:39:41] kareeoleez: Caerus: I don't know how to research it and If geocoder gem supports it
[06:41:02] panpainter: has joined #ruby
[06:41:53] gizmore: has joined #ruby
[06:42:20] Caerus: have you browsed http://www.rubydoc.info/github/alexreisner/geocoder/master/frames ?
[06:42:26] aganov: has joined #ruby
[06:43:09] hk238: has joined #ruby
[06:44:09] Caerus: to me it seems that any 'region' has to be done by you, geocoding is probably just that
[06:44:56] gizless: has joined #ruby
[06:46:00] Caerus: you could maybe use g maps api to say throw it a coordinate and then have it return the region based on distance using your lat,long as center?
[06:46:39] rbennacer: has joined #ruby
[06:46:47] Coldblackice: has joined #ruby
[06:48:08] tildes_: has joined #ruby
[06:50:31] go|dfish: has joined #ruby
[06:53:52] Caerus: kareeoleez, do read up on getBounds() and anything related to it, from google maps API, to me it looks exactly like what you need.
[06:54:08] kareeoleez: Caerus: geoJSON is the word
[06:54:12] kareeoleez: Caerus: I think I got it
[06:54:31] kareeoleez: actually coordinates define a region and it's a json string
[06:56:03] Caerus: *it looks exactly like what i thought you needed
[06:56:50] syndikate: has joined #ruby
[06:57:47] Caerus: wrongfully assumed you didn't have the boundaries coords when you clearly stated you wanted to 'define' it.
[06:59:17] crayfishx: has joined #ruby
[07:00:13] jimmybomb1: has joined #ruby
[07:00:26] toretore: has joined #ruby
[07:00:38] bronson: has joined #ruby
[07:03:58] dionysus69: has joined #ruby
[07:04:58] rbennacer: has joined #ruby
[07:05:34] Bugboy1028: has joined #ruby
[07:06:46] dionysus69: has joined #ruby
[07:08:34] jaruga___: has joined #ruby
[07:10:30] ravishankarjha: has joined #ruby
[07:10:34] Bugboy1028: has joined #ruby
[07:12:13] Synthead: has joined #ruby
[07:13:47] Ishido: has joined #ruby
[07:14:03] rbennacer: has joined #ruby
[07:17:29] raeoks: has joined #ruby
[07:17:40] Tempesta: has joined #ruby
[07:17:56] ur5us: has joined #ruby
[07:22:44] antgel: has joined #ruby
[07:23:09] rbennacer: has joined #ruby
[07:25:09] flashpoint9: has joined #ruby
[07:25:11] emilford: has joined #ruby
[07:26:49] panpainter: has joined #ruby
[07:27:28] DoubleMalt: has joined #ruby
[07:31:53] aufi: has joined #ruby
[07:35:14] anisha: has joined #ruby
[07:35:38] pawnbox: has joined #ruby
[07:37:04] panpainter: has joined #ruby
[07:37:20] jenrzzz: has joined #ruby
[07:37:59] LoneHerm_: has joined #ruby
[07:39:23] sameerynho: has joined #ruby
[07:40:50] mark_66: has joined #ruby
[07:43:16] akem: has joined #ruby
[07:43:35] jgt: has joined #ruby
[07:46:54] the_drow: has joined #ruby
[07:47:49] tagaulap: has joined #ruby
[07:50:45] Devalo: has joined #ruby
[07:54:37] mikecmpbll: has joined #ruby
[07:55:04] lubekpl: has joined #ruby
[08:03:00] mikecmpbll: has joined #ruby
[08:06:00] skade: has joined #ruby
[08:08:29] gdp: has joined #ruby
[08:16:56] ravishankarjha: has joined #ruby
[08:17:58] failshell: has joined #ruby
[08:18:40] drptbl: has joined #ruby
[08:18:42] krasnus: has joined #ruby
[08:19:45] panpainter: has joined #ruby
[08:20:13] chouhoulis: has joined #ruby
[08:22:53] karapetyan: has joined #ruby
[08:26:00] emilford: has joined #ruby
[08:26:48] tubuliferous: has joined #ruby
[08:27:59] tvw: has joined #ruby
[08:28:55] rbennacer: has joined #ruby
[08:30:00] panpainter: has joined #ruby
[08:31:43] yfeldblum: has joined #ruby
[08:34:17] Polysics: has joined #ruby
[08:34:37] voidDotClass: has joined #ruby
[08:36:56] Moosashi: has joined #ruby
[08:38:15] drptbl_: has joined #ruby
[08:38:25] jenrzzz: has joined #ruby
[08:38:25] jenrzzz: has joined #ruby
[08:39:04] ravishankarjha: has joined #ruby
[08:39:33] der-landgraf: has joined #ruby
[08:41:40] pawnbox: has joined #ruby
[08:43:01] rbennacer: has joined #ruby
[08:43:34] weckl: has joined #ruby
[08:46:13] snowy: has joined #ruby
[08:47:07] Devalo: has joined #ruby
[08:50:13] blackmes1: has joined #ruby
[08:51:07] joonty: has joined #ruby
[08:52:20] rbennacer: has joined #ruby
[08:53:02] pawnbox: has joined #ruby
[08:56:12] biberu: has joined #ruby
[08:58:56] Spami_: has joined #ruby
[08:59:18] Moosashi: has joined #ruby
[09:01:04] Xeago_: has joined #ruby
[09:01:07] haxrbyte_: has joined #ruby
[09:01:46] stannard: has joined #ruby
[09:02:27] bronson: has joined #ruby
[09:03:43] ruid: has joined #ruby
[09:03:43] ruid: has joined #ruby
[09:04:29] zacstewart: has joined #ruby
[09:06:06] shevy: #power-to-the-people!
[09:07:34] pawnbox: has joined #ruby
[09:07:40] der-landgraf: has joined #ruby
[09:11:48] vdamewood: has joined #ruby
[09:11:49] pawnbox: has joined #ruby
[09:12:17] panpainter: has joined #ruby
[09:13:59] al2o3-cr: has joined #ruby
[09:15:34] FooMunki: has joined #ruby
[09:20:34] pandaant: has joined #ruby
[09:20:36] yfeldblum: has joined #ruby
[09:21:59] chouhoulis: has joined #ruby
[09:22:31] panpainter: has joined #ruby
[09:25:53] flashpoint9: has joined #ruby
[09:26:55] emilford: has joined #ruby
[09:28:31] GinoMan2440_: has joined #ruby
[09:29:53] chipotle: has joined #ruby
[09:33:49] jenrzzz: has joined #ruby
[09:34:03] blaxter: has joined #ruby
[09:38:42] ferr: has joined #ruby
[09:42:33] jaguarmagenta: has joined #ruby
[09:42:36] d0lph1n98: has joined #ruby
[09:42:59] TheWhip: has joined #ruby
[09:44:24] TheHodge: has joined #ruby
[09:49:45] iamvery: has joined #ruby
[09:52:19] heyimwill: has joined #ruby
[09:53:19] htmldrum: has joined #ruby
[09:54:10] nettoweb: has joined #ruby
[09:54:37] evidex: has joined #ruby
[09:55:23] madgen: has joined #ruby
[09:59:06] UKn0Me: has joined #ruby
[09:59:48] SCHAAP137: has joined #ruby
[10:00:20] krasnus: has joined #ruby
[10:01:15] TheWhip: sorry for posting it here, but some of you might have worked on sinatra so giving it a try.
[10:01:25] TheWhip: hi, I am trying to integrate new_relic with my sinatra app. I require the newrelic_rpm gem, created the newrelic.yml file. In config.ru I put in "require 'newrelic_rpm'" and "NewRelic::Agent.after_fork(:force_reconnect => true)"
[10:01:36] TheWhip: still not able to see anything on my newrelic dashboard
[10:01:45] TheWhip: It's working fine for my rails apps
[10:03:33] bronson: has joined #ruby
[10:03:37] skade: has joined #ruby
[10:08:22] panpainter: has joined #ruby
[10:09:19] CloCkWeRX: has joined #ruby
[10:12:31] ur5us: has joined #ruby
[10:13:52] nerium: has joined #ruby
[10:14:20] marr: has joined #ruby
[10:15:46] aufi: has joined #ruby
[10:15:59] dede: has left #ruby: ()
[10:16:54] lupine: has joined #ruby
[10:17:21] UKn0Me: has joined #ruby
[10:18:05] mdw: has joined #ruby
[10:18:37] panpainter: has joined #ruby
[10:18:46] failshell: has joined #ruby
[10:18:57] QORRiE: has joined #ruby
[10:19:21] Liam`: has joined #ruby
[10:20:18] klaas: has joined #ruby
[10:27:46] emilford: has joined #ruby
[10:30:32] dmr8: has joined #ruby
[10:32:54] klaas: has joined #ruby
[10:35:22] n008f4g_: has joined #ruby
[10:35:54] TomyLobo: has joined #ruby
[10:39:12] lycaonian: has joined #ruby
[10:40:52] blackmes1: has joined #ruby
[10:41:10] rkoller: has joined #ruby
[10:41:38] b7u3f1ng3r1: has joined #ruby
[10:42:17] deadnull_: has joined #ruby
[10:45:08] madgen: has joined #ruby
[10:46:48] matp: has joined #ruby
[10:51:00] spider-mario: has joined #ruby
[10:51:24] ravishankarjha: has joined #ruby
[10:55:23] Moosashi: has joined #ruby
[10:57:25] jgt: has joined #ruby
[10:58:17] bruno-: has joined #ruby
[10:59:01] apofis: has joined #ruby
[11:00:16] apofis_: has joined #ruby
[11:01:19] sepp2k: has joined #ruby
[11:01:22] Gasher: has joined #ruby
[11:03:02] rbennacer: has joined #ruby
[11:03:27] tildes_: has joined #ruby
[11:05:12] aupadhye: has joined #ruby
[11:05:22] rodfersou: has joined #ruby
[11:06:40] nettoweb: has joined #ruby
[11:11:23] voidDotClass: has joined #ruby
[11:12:13] moeSeth: has joined #ruby
[11:12:21] dionysus69: has joined #ruby
[11:12:25] rbennacer: has joined #ruby
[11:13:59] Devalo: has joined #ruby
[11:15:56] dionysus69: has joined #ruby
[11:16:01] flashpoint9: has joined #ruby
[11:16:38] d0lph1n98: has joined #ruby
[11:17:28] agit0: has joined #ruby
[11:18:58] _orangejuice: has joined #ruby
[11:19:31] johnmilton: has joined #ruby
[11:21:07] skade: has joined #ruby
[11:21:36] rbennacer: has joined #ruby
[11:21:46] gnufied: has joined #ruby
[11:23:43] dionysus69: has joined #ruby
[11:23:44] chouhoulis: has joined #ruby
[11:23:55] aupadhye: has joined #ruby
[11:26:24] panpainter: has joined #ruby
[11:26:54] umdstu: has joined #ruby
[11:28:37] tlaxkit: has joined #ruby
[11:28:42] emilford: has joined #ruby
[11:31:29] ldnunes: has joined #ruby
[11:31:43] edavis: has joined #ruby
[11:35:07] ravishankarjha: has joined #ruby
[11:39:19] roadt__: has joined #ruby
[11:40:47] millerti: has joined #ruby
[11:43:21] jaguarmagenta: has joined #ruby
[11:44:30] rbennacer: has joined #ruby
[11:47:05] sepp2k: has joined #ruby
[11:48:23] tAn: has joined #ruby
[11:49:28] solocshaw: has joined #ruby
[11:51:25] |2701: has joined #ruby
[11:51:48] karapetyan: has joined #ruby
[11:51:59] flashpoint9: has joined #ruby
[11:53:08] sdothum: has joined #ruby
[11:56:07] ravishan_: has joined #ruby
[11:56:27] jgt1: has joined #ruby
[11:56:48] panpainter: has joined #ruby
[11:57:45] d0lph1n98: has joined #ruby
[11:58:21] karapetyan: has joined #ruby
[12:00:22] dionysus69: has joined #ruby
[12:02:15] djcp: has joined #ruby
[12:02:45] rickmasta: has joined #ruby
[12:05:19] bronson: has joined #ruby
[12:05:21] Caerus: see ya later #ruby
[12:06:02] Hanmac: has joined #ruby
[12:06:26] GodFather: has joined #ruby
[12:07:17] CloCkWeRX: has joined #ruby
[12:10:06] duckpuppy: has joined #ruby
[12:11:04] synthroid: has joined #ruby
[12:15:29] dionysus69: has joined #ruby
[12:19:35] failshell: has joined #ruby
[12:20:46] madgen: has joined #ruby
[12:22:23] nadir: has joined #ruby
[12:22:34] antgel: has joined #ruby
[12:23:59] Xorg: has joined #ruby
[12:24:04] Xorg: guys i need little help
[12:24:28] Xorg: I wanna appned a certain json object inside json
[12:24:30] Xorg: https://github.com/flapjack/flapjack/blob/master/lib/flapjack/gateways/slack.rb#L99
[12:24:41] Xorg: so it looks like https://api.slack.com/docs/formatting/builder?msg=%7B%22text%22%3A%22NEW%20NOTIFICATION%22%2C%22attachments%22%3A%5B%7B%22text%22%3A%22HELP%22%2C%22color%22%3A%22warning%22%7D%5D%7D
[12:27:28] Polysics: has joined #ruby
[12:28:14] JohnBat26: has joined #ruby
[12:28:47] Xorg: anyone ?
[12:29:18] b|ackwolf: has joined #ruby
[12:29:34] emilford: has joined #ruby
[12:30:58] GinoManWorks: has joined #ruby
[12:32:39] ravishankarjha: has joined #ruby
[12:32:44] chouhoulis: has joined #ruby
[12:33:13] Polysics: has joined #ruby
[12:33:14] mdw: has joined #ruby
[12:34:29] panpainter: has joined #ruby
[12:35:28] toretore: Xorg: are you using a template?
[12:35:53] inukshuk_: has joined #ruby
[12:38:33] skade: has joined #ruby
[12:39:15] mrgrieves: has joined #ruby
[12:39:41] tmtwd: has joined #ruby
[12:41:04] roshanavand: has joined #ruby
[12:42:29] ramortegui: has joined #ruby
[12:43:06] dionysus69: has joined #ruby
[12:44:11] Polysics: has joined #ruby
[12:44:44] panpainter: has joined #ruby
[12:46:14] Xorg: toretore: no
[12:48:26] pyon: has joined #ruby
[12:49:16] dionysus69: has joined #ruby
[12:50:27] toretore: Xorg: well it's looking for a template file here: https://github.com/flapjack/flapjack/blob/master/lib/flapjack/gateways/slack.rb#L67
[12:50:38] toretore: so i suggest looking in the documentation for how to use that
[12:50:52] flashpoint9: has joined #ruby
[12:51:06] tildes_: has joined #ruby
[12:52:06] pawnbox: has joined #ruby
[12:54:15] CloCkWeRX: has joined #ruby
[12:55:26] mrgrieves: has joined #ruby
[12:55:32] chouhoulis: has joined #ruby
[12:59:40] kareeoleez: has joined #ruby
[13:00:02] Xorg: https://github.com/flapjack/flapjack/blob/master/lib/flapjack/gateways/slack/alert.text.erb
[13:00:04] Xorg: toretore:
[13:04:34] jackdaniel: ACTION flaps
[13:05:58] zacstewart: has joined #ruby
[13:06:04] Ananos: has joined #ruby
[13:06:10] futilegames: has joined #ruby
[13:06:26] GinoMan2440: has joined #ruby
[13:06:26] shevy: stop flapping without a l!
[13:06:50] failshell: has joined #ruby
[13:07:36] jgt1: has joined #ruby
[13:10:25] failshell: has joined #ruby
[13:13:26] al2o3-cr: has joined #ruby
[13:13:43] CloCkWeRX: has joined #ruby
[13:15:02] george2seven: has joined #ruby
[13:15:55] OhReally: has joined #ruby
[13:16:25] george2seven: has left #ruby: ()
[13:17:00] houhoulis: has joined #ruby
[13:18:05] blackmes1: has joined #ruby
[13:18:52] godzillaenlacasa: has joined #ruby
[13:20:46] skade: has joined #ruby
[13:20:54] malconis: has joined #ruby
[13:20:56] ChiefAlexander: has joined #ruby
[13:21:17] CloCkWeRX: has left #ruby: ()
[13:22:44] jgt1: has joined #ruby
[13:23:04] crystal77: has joined #ruby
[13:23:54] tknz: has joined #ruby
[13:24:00] millerti: has joined #ruby
[13:24:56] freerobby: has joined #ruby
[13:26:24] panpainter: has joined #ruby
[13:27:46] ruid: has joined #ruby
[13:29:21] DarthGandalf: has joined #ruby
[13:30:12] JohnBat26: has joined #ruby
[13:30:26] emilford: has joined #ruby
[13:32:46] chipotle: has joined #ruby
[13:35:44] rbennacer: has joined #ruby
[13:40:38] tubuliferous: has joined #ruby
[13:40:40] rbennacer: has joined #ruby
[13:40:50] stannard: has joined #ruby
[13:41:40] rbennacer: has joined #ruby
[13:43:25] chouhoulis: has joined #ruby
[13:43:52] perlgod: has joined #ruby
[13:44:11] Ispira: has joined #ruby
[13:44:16] bluOxigen_: has joined #ruby
[13:44:18] chouhoulis: has joined #ruby
[13:46:27] hosttor: has joined #ruby
[13:46:51] ramfjord: has joined #ruby
[13:48:22] d0nn1e: has joined #ruby
[13:53:09] flashpoint9: has joined #ruby
[13:54:08] zenlot6: has joined #ruby
[13:54:10] eljimmy: has joined #ruby
[14:00:53] bruno-: has joined #ruby
[14:00:54] blackmes1: has joined #ruby
[14:01:37] bnobu: has joined #ruby
[14:06:31] bronson: has joined #ruby
[14:09:05] millerti: has joined #ruby
[14:09:46] kobain: has joined #ruby
[14:10:56] freerobby: has joined #ruby
[14:11:21] kareeoleez: has joined #ruby
[14:11:30] kobain: has joined #ruby
[14:11:50] nofacade: has joined #ruby
[14:12:05] tAn: has joined #ruby
[14:12:42] GodFather: has joined #ruby
[14:13:07] shevy: bugs bugs bugs
[14:13:12] shevy: what would life be without them
[14:14:08] kobain: has joined #ruby
[14:14:55] Devalo: has joined #ruby
[14:16:23] shevy: syntax error on line 16, col 0: ` if ( typeof module === "object" && typeof module.exports === "object" ) {'
[14:16:57] pwnd_nsfw: javascript is annoying
[14:19:39] madgen: has joined #ruby
[14:20:01] jgt1: has joined #ruby
[14:21:26] kareeoleez: IS there any gem to manipulate the system locale ? The system's timezone actually ?
[14:22:02] mdw7: has joined #ruby
[14:23:16] Carella: has joined #ruby
[14:24:36] VeryBewitching: has joined #ruby
[14:25:46] shevy: I fixed a bug!
[14:26:12] shevy: Always make sure that when you try to read from a yaml file, you actually DO pass a yaml file into that method too!!!
[14:26:13] VeryBewitching: ACTION high-fives shevy
[14:26:40] VeryBewitching: shevy: Probably a prudent choice, yes.
[14:26:44] Tempesta: has joined #ruby
[14:27:08] smathy: has joined #ruby
[14:28:17] shevy: yeah I am not sure how this originated, it was to calculate the md5sum of a program
[14:28:33] shevy: for very large archives this can take quite a long time, so it would make sense to store the md5sum that was calculated somewhere
[14:31:18] emilford: has joined #ruby
[14:32:20] tAn: has joined #ruby
[14:32:30] freerobby: has joined #ruby
[14:33:12] idletask: has joined #ruby
[14:33:34] russt: has joined #ruby
[14:33:41] Liothen: has joined #ruby
[14:34:59] DoubleMalt: has joined #ruby
[14:35:17] agent_white: has joined #ruby
[14:35:47] weemsledeux: has joined #ruby
[14:36:17] tjohnson: has joined #ruby
[14:36:18] SCHAAP137: has joined #ruby
[14:36:27] rickmasta: has joined #ruby
[14:38:17] crystal77: has joined #ruby
[14:39:01] idefine: has joined #ruby
[14:40:16] FooMunki: has joined #ruby
[14:40:56] cjbottaro: has joined #ruby
[14:41:33] emilford: has joined #ruby
[14:41:46] zacstewart: has joined #ruby
[14:42:45] dopamean_: has joined #ruby
[14:43:01] cdg: has joined #ruby
[14:44:59] downtown: has joined #ruby
[14:45:45] downtown: has left #ruby: ()
[14:46:05] TheWhip: has joined #ruby
[14:47:13] karapetyan: has joined #ruby
[14:47:49] TheWhip: has joined #ruby
[14:48:14] dn`: has joined #ruby
[14:48:32] nofxx: has joined #ruby
[14:48:39] SilverKey: has joined #ruby
[14:49:00] grilled-cheese: has joined #ruby
[14:49:15] kaleido: server_ip.each { |k, v| code = Hash["name" => "#{k}", "address" => "#{v}"] }
[14:49:25] kaleido: is it valid to append .to_json after the last }
[14:49:32] TheWhip: has joined #ruby
[14:49:56] grilled-cheese: hi, if a native gem compile fails how do you apply a patch and retry?
[14:50:31] grilled-cheese: I suspect I can fix the error by tweaking a compile include in libgpg
[14:51:17] jhack: has joined #ruby
[14:51:28] grilled-cheese: if I make the change then rerun the `gem install gpgme` it just blows away the patch each time
[14:52:56] gizless: has joined #ruby
[14:53:05] sameerynho: has joined #ruby
[14:54:51] smathy: kaleido, yes, although that won't .to_json the result of your block.
[14:55:48] kaleido: so do i want
[14:55:50] kaleido: nodes = server_ip.each { |k, v| code = Hash["name" => "#{k}", "address" => "#{v}"] }.to_json
[14:55:56] kaleido: nodes = server_ip.each { |k, v| code = Hash["name" => "#{k}", "address" => "#{v}"] }
[14:55:59] kaleido: nodes.to_json
[14:56:07] kaleido: or am i still way off?
[14:57:01] smathy: kaleido, both do the same thing, which is to set nodes to server_ip.to_json and run a block and discard everything in it.
[14:57:49] smathy: ...unless `code` is scoped to outside that block, in which case it will be set to the hash of the last element of server_ip on exit.
[14:58:18] rippa: has joined #ruby
[14:59:22] hk238: has joined #ruby
[14:59:36] kaleido: so code will only hold one name/address pairs? i need to end up with a hash that holds everything coming from the original hash
[14:59:44] panpainter: has joined #ruby
[15:00:49] smathy: kaleido, right, that's what I assumed you wanted, look at the docs for `Array#each`, it doesn't return what you think it does.
[15:01:06] panpainter: has joined #ruby
[15:01:24] shevy: grilled-cheese did you try to re-do and generate the .gem itself?
[15:01:25] mikecmpbll: has joined #ruby
[15:02:06] kaleido: im working with Hash#each, does that make a difference?
[15:03:13] grilled-cheese: The bug isn't in the gem itself, but rather a native dependency that didn't take MinGW windows error codes into account
[15:03:26] grilled-cheese: and of course there is no native binary
[15:03:52] smathy: kaleido, unfortunately the docs for that don't talk about the return, but it's the same as Array#each's return. You can confirm this yourself in a quick console test.
[15:04:53] kaleido: smathy: indeed. gotta love irb :) thanks.
[15:06:24] kaleido: hmm, how to do this
[15:06:49] brent__: has joined #ruby
[15:07:27] grilled-cheese: shevy, if it's helpful https://github.com/ueno/ruby-gpgme/issues/81
[15:07:32] drptbl: has joined #ruby
[15:08:04] dn`: has joined #ruby
[15:09:32] diegoaguilar: has joined #ruby
[15:10:20] Sharcho: has joined #ruby
[15:11:00] diegoaguilar: has joined #ruby
[15:11:32] yxhuvud: has joined #ruby
[15:11:48] zacstewart: has joined #ruby
[15:12:43] idefine_: has joined #ruby
[15:13:17] smathy: kaleido, there are other methods that do what you (probably) want. Take a look at map/collect
[15:15:51] idefine: has joined #ruby
[15:15:51] RegulationD: has joined #ruby
[15:16:02] kies: has joined #ruby
[15:17:39] pawnbox: has joined #ruby
[15:17:45] cjbottaro: has joined #ruby
[15:19:45] kareeoleez: has joined #ruby
[15:19:53] soahccc: I asked yesterday how I could optparse to just ignore invalid options (optimally based on a regex) and I got send a link http://stackoverflow.com/questions/3642331 but it's for python and I wasn't able to port that to rubys optparse. The closest I digged ended up in this method and I'm pretty certain that I don't want to monkey patch that one :S https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L1549
[15:19:56] AnoHito_: has joined #ruby
[15:19:59] BSaboia: has joined #ruby
[15:20:36] guardian: is Dir::Tmpname available in all ruby implementations?
[15:21:06] houhoulis: has joined #ruby
[15:21:14] chouhoul_: has joined #ruby
[15:21:25] GinoMan2440: has joined #ruby
[15:21:26] Asher: has joined #ruby
[15:21:42] monoprotic: has joined #ruby
[15:22:38] d0lph1n98: has joined #ruby
[15:22:47] ReK2: has joined #ruby
[15:22:51] shibly: has joined #ruby
[15:22:53] dionysus69: has joined #ruby
[15:22:59] sarbs: has joined #ruby
[15:23:22] Sharcho: has left #ruby: ("Leaving")
[15:23:34] freerobby: has joined #ruby
[15:23:35] iamvery: has joined #ruby
[15:24:01] neanderslob: has joined #ruby
[15:24:06] davedev24: has joined #ruby
[15:24:25] soahccc: I have an idea for an hackish workaround. The problematic parameters are coordinates (e.g. -123) so I gsub them to say %123 run it through optparse and change that back to -123... :S
[15:24:41] jwang: has joined #ruby
[15:24:45] smathy: guardian, no.
[15:24:49] elifoster: has joined #ruby
[15:24:54] NightMonkey: has joined #ruby
[15:24:57] hays_: has joined #ruby
[15:25:22] romain_t: has joined #ruby
[15:25:48] bruno-: has joined #ruby
[15:26:18] cjbottaro: has joined #ruby
[15:27:29] fantazo: has joined #ruby
[15:27:46] panpainter: has joined #ruby
[15:30:19] hobodave: has joined #ruby
[15:30:24] guardian: what's my best bet to generate a temp filename inside a specific directory then?>
[15:33:09] roelof: has joined #ruby
[15:33:41] chouhoulis: has joined #ruby
[15:34:11] roelof: How can I rewrite this (https://gist.github.com/rwobben/2b15cfc758d80e15aac20a80538e7a83) to use a guard instead of the unless I use now
[15:35:08] smathy: guardian, for something that works in all ruby implementations? No idea.
[15:35:49] northrup: has joined #ruby
[15:35:51] idefine: has joined #ruby
[15:36:04] brendan-: has joined #ruby
[15:36:24] smathy: Seriously roelof? You weren't spoon-fed in #RoR so you came here?
[15:36:38] mustmodify: has joined #ruby
[15:37:28] roamingdog: has joined #ruby
[15:38:37] arup_r: has joined #ruby
[15:38:44] rodfersou|lunch: has joined #ruby
[15:38:54] The_Phoenix: has joined #ruby
[15:39:20] The_Phoenix: has joined #ruby
[15:40:51] The_Phoenix: has joined #ruby
[15:41:36] panpainter: has joined #ruby
[15:43:07] CloCkWeRX: has joined #ruby
[15:44:01] Guest38: has joined #ruby
[15:44:19] BrunoSaboia: has joined #ruby
[15:44:24] millerti: has joined #ruby
[15:45:01] guardian: smathy: btw what makes you believe it's not part of all implementations? seems to be in the stdlib in fact
[15:45:53] moeabdol: has joined #ruby
[15:45:56] smathy: guardian, well for a start it wasn't around pre 1.9.3 (IIRC).
[15:46:23] [Butch]: has joined #ruby
[15:47:27] whathappens: has joined #ruby
[15:47:48] citizentwo: has joined #ruby
[15:47:50] duderonomy: has joined #ruby
[15:48:31] rcvalle: has joined #ruby
[15:48:36] banister: has joined #ruby
[15:48:39] benzrf: smathy: abusing people for "wanting to be spoon fed" is srsly not constructive
[15:48:54] ferr: has joined #ruby
[15:49:03] benzrf: it doesnt accomplish anything positive besides making you feel self righteous
[15:50:45] n008f4g_: has joined #ruby
[15:50:50] idefine: has joined #ruby
[15:51:28] agentmeerkat: has joined #ruby
[15:52:45] smathy: benzrf, you're welcome to your opinion, and also free to help people how you see fit, as am I.
[15:53:07] carella_: has joined #ruby
[15:53:16] tvon: has joined #ruby
[15:53:33] amclain: has joined #ruby
[15:54:05] Coldblackice: has joined #ruby
[15:56:13] akem: has joined #ruby
[15:57:07] idefine: has joined #ruby
[15:57:45] idefine: has joined #ruby
[15:57:53] pietr0: has joined #ruby
[15:58:13] minimalism: has joined #ruby
[16:00:20] ferr: has joined #ruby
[16:00:33] charliesome: has joined #ruby
[16:01:24] hobodave: has joined #ruby
[16:02:06] agentmee1kat: has joined #ruby
[16:02:12] crystal77: has joined #ruby
[16:02:51] panpainter: has joined #ruby
[16:02:52] hobodave_: has joined #ruby
[16:04:29] agentmeerkat: has joined #ruby
[16:04:58] Nightwolf_: has joined #ruby
[16:05:09] the_drow: has joined #ruby
[16:06:22] houhoulis: has joined #ruby
[16:06:24] blackmes1: has joined #ruby
[16:07:16] haylon: has joined #ruby
[16:07:30] synthroid: has joined #ruby
[16:09:00] bronson: has joined #ruby
[16:10:34] zeroDivisible: has joined #ruby
[16:11:08] cjbottaro: has joined #ruby
[16:13:28] snowy: has joined #ruby
[16:15:33] Devalo: has joined #ruby
[16:18:13] nrd_pxs: has joined #ruby
[16:19:55] the_drow: has joined #ruby
[16:20:31] chouhoulis: has joined #ruby
[16:20:45] pawnbox: has joined #ruby
[16:23:18] chouhoul_: has joined #ruby
[16:26:00] BSaboia: has joined #ruby
[16:29:00] jmarinelli: has joined #ruby
[16:29:24] jmarinelli: can ruby's enumerator module be considered within the functional paradigm?
[16:29:25] orangey: has joined #ruby
[16:29:38] orangey: Hello all.
[16:30:31] orangey: By way of disclaimer, I'm not very familiar with Ruby. I'm just trying to fix a little bug in discourse that I ran into. Currently, a JSON line attempts to open via GET, which doesn't work - it needs to be POST. This is the line: user_json = JSON.parse(open(user_json_url, 'Authorization' => "Bearer #{token}" ).read) . I've tried adding ".post" in every which place, but obvoiusly I have Ruby wrong..
[16:30:38] kernerlke: has joined #ruby
[16:30:39] orangey: any thoughts as to how I might be able to move forward here?
[16:30:40] skolman_: has joined #ruby
[16:31:07] orangey: Needless to say I've filed bugs everywhere, but it seems so straightforward that I hope I can just figure it out and submit a pull.
[16:31:14] moeabdol: has joined #ruby
[16:31:56] jmarinelli: orangey, open-uri only supports GET
[16:32:04] orangey: jmarinelli: damn.
[16:32:16] orangey: jmarinelli: Any thoughts, then?
[16:32:25] skolman_: has joined #ruby
[16:32:33] Eiam_: has joined #ruby
[16:32:42] jmarinelli: orangey look into HTTParty, or Net::HTTP if you don't want to add dependencies
[16:32:55] havenwood: orangey: You could use Net::HTTP from the stdlib but it's a bit unwieldy. I'd suggest HTTP.rb for a gem: https://github.com/httprb/http#readme
[16:33:10] madgen: has joined #ruby
[16:33:25] sepp2k: has joined #ruby
[16:34:09] havenwood: orangey: gem install http
[16:34:22] orangey: havenwood: Any experience with discourse?
[16:34:44] havenwood: orangey: Yeah, why do you ask?
[16:34:45] ramfjord: has joined #ruby
[16:34:52] orangey: One of the things I'm having trouble with is that when I made edits inside the discourse docker, it doesn't 'update', so any edits I make to plugins need me to make them in git, and then './launcher rebuild app'
[16:34:59] orangey: which is an expensive way to test small changes.
[16:35:13] orangey: to add .post everywhere took me about an hour of rebuilding.
[16:35:28] orangey: and I had to make forked repo of oauth2-basic
[16:35:49] havenwood: orangey: That's Rails turf. The #rubyonrails channel is probably the best place to discuss.
[16:36:03] orangey: havenwood: aha. OK.
[16:36:48] the_drow: has joined #ruby
[16:36:50] mustmodify: I'm getting "undefined method 'sub' for #date" ... but I'm not using the method sub. It's in a case statement apparently. Anyone know what that method does to help me figure out what's going on?
[16:37:06] agit0: has joined #ruby
[16:37:34] mustmodify: ohhhh... got it.
[16:37:44] the_drow: has joined #ruby
[16:38:07] nadir: has joined #ruby
[16:38:12] the_drow: has joined #ruby
[16:38:41] havenwood: jmarinelli: It does remind one of functional style doesn't it?
[16:38:43] mc_fail: has joined #ruby
[16:38:49] wspider: has joined #ruby
[16:38:55] panpainter: has joined #ruby
[16:39:18] havenwood: jmarinelli: Here's some fun with implementing a functional lang's (Elixir) Stream module in Ruby with Enumerators: https://github.com/havenwood/elixir.rb/blob/master/lib/elixir/stream.rb
[16:39:48] wspider: I try to install sass gem install sass ( or any other gem through ruby and it says ) ERROR: While executing gem ... (Errno::EINVAL) Invalid argument - sendto(2) for "0.2.4.1" port 53 , I wonder what would be the right approach
[16:39:56] havenwood: I think Stream.unfold/1 is my fav.
[16:41:26] havenwood: Fib = Stream.unfold([0, 1]) { |a, b| [a, [b, a + b]] }
[16:42:09] skalfyfan: has joined #ruby
[16:42:30] havenwood: wspider: What version of RubyGems?: gem -v
[16:43:08] cjbottaro: has joined #ruby
[16:43:24] fedexo: has joined #ruby
[16:43:30] havenwood: wspider: Behind a proxy?
[16:43:31] flashpoint9: has joined #ruby
[16:43:36] Don_John: has joined #ruby
[16:44:26] havenwood: Stream.unfold/2**
[16:44:50] rbennacer: has joined #ruby
[16:45:33] jiblet: has joined #ruby
[16:46:52] tildes_: has joined #ruby
[16:47:49] wldcordeiro: has joined #ruby
[16:49:10] orangey: havenwood: #ROR doesn't seem to like the question there..
[16:49:23] orangey: havenwood: Anyhow, I'll continue with the painful method for now until I figure it out.
[16:49:26] wspider: havenwood: 2.5.1
[16:49:30] havenwood: orangey: You're getting the runaround!
[16:50:13] orangey: havenwood: OK, did some googling and I think I may have an answer..
[16:50:30] havenwood: orangey: I think someone just didn't realize it was a Rails app. :)
[16:51:22] wspider: havenwood: oh, I am behind the school proxy, not sure if that could be it
[16:52:00] tAn: has joined #ruby
[16:52:02] havenwood: wspider: That's a fairly recent version. Hmm, "port 53"
[16:52:16] havenwood: wspider: I suspect the proxy.
[16:52:38] the_drow: has joined #ruby
[16:53:03] havenwood: wspider: gem help install | grep proxy
[16:53:16] gheegh: has joined #ruby
[16:53:28] btiefert: has joined #ruby
[16:53:28] panpainter: has joined #ruby
[16:53:38] kernerlke: has left #ruby: ()
[16:56:34] robh71: has joined #ruby
[16:56:53] guardian: can someone please give me a hand with rspec? I have code that does File.mv(foo, bar); File.rename(bar, baz)
[16:57:09] guardian: under the hood, File.mv may call File.rename
[16:57:15] Giorgio: has joined #ruby
[16:57:21] guardian: I'm only interested in testing File.rename(bar, baz) has been called once
[16:57:44] guardian: which I try to express with expect(File).to have_received(:rename).with(anything, baz)
[16:57:44] mikecmpbll: has joined #ruby
[16:58:12] guardian: but then rspec still complains File.mv has called File.rename and that my argument constraints don't allow it
[16:58:16] guardian: any idea please?
[16:59:29] Cohedrin: has joined #ruby
[17:00:04] freerobby: has joined #ruby
[17:02:24] bronson: has joined #ruby
[17:02:31] openstruct: has joined #ruby
[17:02:44] ss_much: has joined #ruby
[17:03:44] akamal: has joined #ruby
[17:03:53] akamal_: has joined #ruby
[17:04:58] VeryBewitching: has joined #ruby
[17:05:57] the_drow: has joined #ruby
[17:06:45] c_nick: has joined #ruby
[17:06:46] skalfyfan: has joined #ruby
[17:10:04] GinoMan2440_: has joined #ruby
[17:10:44] c_nick: Hi.. i was trying to create a directory if its not existing FileUtils::mkdir_p '\\gerdata\test\quarter_2\april' but it kelt complaining \\gerdata\test already exists does it require all the directories to be absent or present ? like gerdata/test exists but others done will it work ?
[17:12:00] wspider: havenwood: I will try again at home but a month ago or so I was able to use gem in the University without any problem
[17:12:01] ravishankarjha: has joined #ruby
[17:13:26] Fire-Dragon-DoL: opinion request! NullObject patterh, NullObject#nil? true or false?
[17:13:38] mustmodify: has left #ruby: ()
[17:14:59] tAn: has joined #ruby
[17:15:14] mikecmpbll: has joined #ruby
[17:15:16] howard__: has joined #ruby
[17:16:15] Hanmac: Fire-Dragon-DoL: i don't know your data structure but why not just return nil instead of such NullObject?
[17:16:27] banister: has joined #ruby
[17:17:04] flashpoint9: has joined #ruby
[17:18:34] Fire-Dragon-DoL: hanmac: the purpose of the nullobject is to avoid too many `try` things, so it fits. We have nil, we are planning to introduce a nullobject to reduce all these checks
[17:18:37] codecop: has joined #ruby
[17:19:11] firstdayonthejob: has joined #ruby
[17:19:12] Hanmac: Fire-Dragon-DoL: depending on what ruby version you have there is better ways than try
[17:19:20] the_drow: has joined #ruby
[17:19:24] mjuszczak: has joined #ruby
[17:19:44] Fire-Dragon-DoL: 2.1.2, but the `&` is basically like using `try`
[17:21:29] brianpWins_: has joined #ruby
[17:21:53] Fire-Dragon-DoL: also my was an opinion more than a question, it works in both ways
[17:22:54] Hanmac: Fire-Dragon-DoL: do you know about this:
[17:22:54] Hanmac: >> nil&.what
[17:22:55] ruby[bot]: hanmac: # => nil (https://eval.in/566217)
[17:23:44] Fire-Dragon-DoL: hanmac: yes I said the `&` in the previous sentence
[17:23:55] benlieb: has joined #ruby
[17:24:19] Hanmac: ok i thought you mean the older from with "obj & obj.method"
[17:24:52] Fire-Dragon-DoL: hanmac: but you end up with stuff as ugly as client&.associated_contacts&.each which becomes a plain `safe_client.associated_contacts.each` with the null object
[17:25:02] Fire-Dragon-DoL: oh, no sorry for the misunderstanding
[17:26:39] Hanmac: hm but &. its still better than the other one because it got optimized by ruby
[17:27:06] ule: Hey guys.. Can ask a haml question here?
[17:27:23] mwlang: has joined #ruby
[17:27:31] ule: I'm trying to solve this problem: "undefined local variable or method 'foo' "
[17:27:44] ule: I added this: - if foo.present?
[17:28:03] ule: but didn't work.. so.. how can I set a default value or just verify if the variable exist on haml page?
[17:28:09] the_drow: has joined #ruby
[17:29:04] ravishankarjha: has joined #ruby
[17:29:28] blandflakes: has joined #ruby
[17:30:33] idefine: has joined #ruby
[17:30:36] flashpoint9: has joined #ruby
[17:31:27] Moosashi: has joined #ruby
[17:32:18] devbug: has joined #ruby
[17:33:40] djbkd: has joined #ruby
[17:33:53] SilverKey: has joined #ruby
[17:34:48] zacstewart: has joined #ruby
[17:35:52] zapata: has joined #ruby
[17:36:16] diegoaguilar: has joined #ruby
[17:37:03] diegoaguilar: has joined #ruby
[17:39:57] panpainter: has joined #ruby
[17:40:25] kareeole_: has joined #ruby
[17:40:33] mnrmnaugh: has joined #ruby
[17:40:56] tAn: has joined #ruby
[17:41:15] croberts: has left #ruby: ("http://quassel-irc.org - Chat comfortably. Anywhere.")
[17:41:38] mdw: has joined #ruby
[17:41:43] diegoviola: has joined #ruby
[17:42:28] aiguu: has joined #ruby
[17:42:57] karapetyan: has joined #ruby
[17:45:55] idefine: has joined #ruby
[17:48:18] nando293921: has joined #ruby
[17:48:45] idefine_: has joined #ruby
[17:50:52] G: has joined #ruby
[17:50:57] nando293921: has joined #ruby
[17:51:33] bronson: has joined #ruby
[17:51:34] SegFaultAX: has joined #ruby
[17:51:40] freerobby: has joined #ruby
[17:52:39] madgen: has joined #ruby
[17:54:40] citizentwo: has joined #ruby
[17:54:55] whathappens: has joined #ruby
[17:54:57] ullu: has joined #ruby
[17:55:29] n008f4g_: has joined #ruby
[17:55:50] wldcordeiro: has joined #ruby
[17:56:18] GBrawl: has joined #ruby
[17:56:22] SilverKey: has joined #ruby
[17:56:29] whathapp_: has joined #ruby
[17:57:45] RegulationD: has joined #ruby
[17:57:52] mjuszczak: has joined #ruby
[18:00:03] citizentwo: has joined #ruby
[18:01:10] d5sx43: has joined #ruby
[18:02:37] banister: has joined #ruby
[18:03:18] zacstewart: has joined #ruby
[18:04:07] blandflakes_: has joined #ruby
[18:04:08] FooMunki: has joined #ruby
[18:05:13] justin_pdx: has joined #ruby
[18:05:43] stannard: has joined #ruby
[18:05:43] hobodave: has joined #ruby
[18:05:50] tAn: has joined #ruby
[18:08:39] Moosashi: has joined #ruby
[18:10:15] skolman_: has joined #ruby
[18:11:30] babblebre: has joined #ruby
[18:13:03] mtkd: has joined #ruby
[18:13:19] SilverKey: has joined #ruby
[18:15:49] karapetyan: has joined #ruby
[18:15:55] piotrj: has joined #ruby
[18:16:26] Klumben: has joined #ruby
[18:16:33] nadir: has joined #ruby
[18:19:56] piotrj: has joined #ruby
[18:20:29] karapetyan: has joined #ruby
[18:22:53] inukshuk_: has joined #ruby
[18:23:17] idefine: has joined #ruby
[18:24:43] firstdayonthejob: has joined #ruby
[18:25:15] idefine_: has joined #ruby
[18:26:11] idefine_: has joined #ruby
[18:26:16] B4daBing73: has joined #ruby
[18:27:46] n_blownapart: has joined #ruby
[18:28:07] chouhoulis: has joined #ruby
[18:28:23] chouhoulis: has joined #ruby
[18:28:57] chouhoulis: has joined #ruby
[18:29:08] pawnbox_: has joined #ruby
[18:30:42] millerti: has joined #ruby
[18:30:47] piotrj: has joined #ruby
[18:31:09] ramfjord: has joined #ruby
[18:32:02] roshanavand: has joined #ruby
[18:32:34] azor: has joined #ruby
[18:33:23] jmarinelli: has joined #ruby
[18:33:30] futilegames: has joined #ruby
[18:33:39] Chunlea_: has joined #ruby
[18:34:28] n_blownapart: has joined #ruby
[18:34:47] stannard: has joined #ruby
[18:37:43] freerobby: has joined #ruby
[18:41:46] crystal77: has joined #ruby
[18:43:59] shevy: good old hamlet questions
[18:44:21] crystal77: has joined #ruby
[18:45:25] havenwood: ule: You have to define `foo` before calling it. It'll first look for a `foo` local variable, then for a `foo` method. You have neither defined in the current scope.
[18:48:02] ule: the point is not if I'm defining or not
[18:48:17] ule: I just want to have a default value just in case the variable doesn't exist
[18:48:35] n008f4g_: has joined #ruby
[18:48:37] ule: in php/twig/symfony I can just do foo|default('bar')
[18:48:42] SilverKey: has joined #ruby
[18:48:51] ule: but anyways.. I just fixed my model to always pass the variable..
[18:49:05] apeiros: that's the sensible way
[18:49:16] apeiros: having to test for the existence of a local variable == you're doing it wrong.
[18:49:44] apeiros: the way you would test it is via `defined? expression`
[18:49:53] ule: apeiros: actually.. that makes tense
[18:50:02] freerobby: has joined #ruby
[18:50:07] ule: yeah.. I was testint present? exist? empty?
[18:50:17] ule: didn't test with defined?
[18:50:30] apeiros: foo.present? means you call a method on foo. you can't call a method on foo if it doesn't exist
[18:50:42] ule: exactly
[18:50:56] ule: that's the point.. so.. what's the best way to see if foo exist?
[18:51:06] ule: foo.nil?
[18:51:07] apeiros: as said, the best is not having to test
[18:51:08] apofis: has joined #ruby
[18:51:27] apeiros: and the only way to test for *existence* of a local variable is `defined?`
[18:51:35] dikaio: has joined #ruby
[18:52:00] apeiros: oh actually in 2.3, you could also (ab)use Kernel#local_variables
[18:52:06] ferr: has joined #ruby
[18:52:16] s00pcan: has joined #ruby
[18:52:30] alem0lars: has joined #ruby
[18:52:40] ule: so.. if anythingIwant.defined?
[18:52:51] bluOxigen: has joined #ruby
[18:52:55] apeiros: skipped that "reading comprehension" part?
[18:52:58] symm-: has joined #ruby
[18:53:08] ule: lol yeah.. I'll read that
[18:53:09] apeiros: 20:49 apeiros: the way you would test it is via `defined? expression`
[18:53:29] nhhc: has joined #ruby
[18:54:12] Musashi007: has joined #ruby
[18:54:37] nfk: has joined #ruby
[18:54:38] ule: - defined? ule
[18:54:59] nfk: i'm getting a really stupid error: bin/bundle:3:in `load': cannot load such file -- /usr/share/rubygems-integration/all/gems/bundler-1.7.4/bin/bundle (LoadError)
[18:55:54] hxegon_AFK: what are you trying to do ule?
[18:56:06] hxegon_AFK: err nfk, sorry.
[18:56:28] ule: hxegon_afk: was trying to verify if a variable was defined from haml page
[18:56:37] RubyRunner: has joined #ruby
[18:57:00] nfk: hxegon_afk, trying to run bin/bundle of a Rails project on Raspberry Pi
[18:57:11] SCHAAP137: has joined #ruby
[18:59:04] nfk: even weirder, if i omit bin/ in favour of just bundle it does work, after some raspberry delay
[18:59:32] chipotle: has joined #ruby
[19:00:03] zacstewart: has joined #ruby
[19:01:58] ule: ruby from raspberry? cool
[19:02:27] ule: didn't know ruby is present on arm32 arquitecture
[19:02:46] nfk: oh my god, if it hasn't gone wrong, this is redefining the meaning of slow
[19:03:11] nfk: ule, why wouldn't it be?
[19:03:12] mikecmpbll: has joined #ruby
[19:03:56] blaxter: has joined #ruby
[19:04:12] nfk: also, it's arm6fh or something for Raspberry Pi Model A/B whatever and some arm7 for Model 2/3
[19:04:46] lomex: has joined #ruby
[19:05:34] Devalo: has joined #ruby
[19:06:03] choke: has joined #ruby
[19:09:07] Moosashi: has joined #ruby
[19:09:38] d5sx43: has joined #ruby
[19:11:44] citizentwo: has joined #ruby
[19:12:04] whathappens: has joined #ruby
[19:12:13] nfk: oh wow, i'm actually serving stuff!!!!!
[19:13:07] swills: has joined #ruby
[19:15:12] nfk: surprisingly in deployment mode nginx-unicorn is perhaps faster than webrick in development on a much, much more powerful rig
[19:15:37] nfk: and there's still room for improvement
[19:15:48] kirillow: has joined #ruby
[19:17:08] replay: has joined #ruby
[19:17:21] kirillow: i parsed the yaml in a textfile using yaml/psych. so theres a yaml object. now I want to return a specific entru. do i really have to dump the whole string and look manually???
[19:17:30] nfk: it's well within acceptable performance levels, let's just hope it's like that also when someone connects from hundreds of km away
[19:17:38] roshanavand: has joined #ruby
[19:18:29] blackmes1: has joined #ruby
[19:19:34] futilegames: has joined #ruby
[19:19:38] tax: has joined #ruby
[19:21:39] last_staff: has joined #ruby
[19:22:41] c_nick: FileUtils vs Dir which one is better ?
[19:23:07] nfk: FileUtils was *nix specific, wasn't it?
[19:23:08] shevy: c_nick they do different tasks, but if you can, prefer Dir. FileUtils you have to require
[19:23:11] jsaak: has joined #ruby
[19:23:31] c_nick: shevy: whats the difference
[19:23:34] shevy: deleting a file can happen via File.delete() too for instance
[19:23:40] c_nick: My purpose is to work with directories
[19:23:50] shevy: .cp_r for instance, I don't think you have this in anywhere else but FileUtils
[19:24:04] nfk: a quick grep shows that I'm using FileUtils.mv
[19:24:08] shevy: FileUtils.mv() probably too
[19:24:11] nfk: also, no require that I can see
[19:24:23] shevy: hmmm are you sure you don't have to require it anymore? lemme try
[19:24:36] c_nick: nope if u r on Ruby 2.0.0 +
[19:24:47] shevy: uninitialized constant FileUtils (NameError)
[19:24:52] nfk: oh, that's because it's require 'fileutils' while the Module is FileUtils
[19:25:01] Regulati_: has joined #ruby
[19:25:10] nfk: and I grepped for File, natch'
[19:25:36] c_nick: Fileutils.mkdir_p work for share drives ? //myshare
[19:25:43] c_nick: it didnt seem to work
[19:25:50] shevy: well you must use FileUtils not Fileutils
[19:26:03] madgen: has joined #ruby
[19:26:07] jiblet: has left #ruby: ()
[19:26:15] nfk: c_nick, it should not care for properly mounted POSIX paths
[19:26:16] shevy: but otherwise, it will work, just like the unix command
[19:26:32] nfk: as fo Windows, does it even work there? i thought it just invokes the command line stuff
[19:26:55] c_nick: i am passing it //myshare/folder1/folder2/folder3 where folder3 is to be created..
[19:27:05] shevy: it probably may work on windows too... I am not sure, have not used windows + ruby in years ... I remember it was confusing to work with these letter-drives c d e f...
[19:27:12] c_nick: i think i need to gsub('/',"\\")
[19:27:40] nfk: i think you need to use a a real os but what do i know?
[19:27:49] c_nick: lol windoze
[19:29:14] nfk: c_nick, assuming you're on a real os (not windows) you can just mount that SMB share and then no proper tool will care that it's not a local media as it won't even know it
[19:29:29] nfk: mount as in mount to be under some POSIX path
[19:29:35] jenrzzz: has joined #ruby
[19:30:00] nfk: i'm always amazed at how unwilling people can be to use the best solution
[19:30:25] nfk: like fighting with ssh agents and whatnot instead of just invoking sshfs
[19:30:39] skolman: has joined #ruby
[19:31:08] blandflakes: has joined #ruby
[19:31:15] nfk: c_nick, btw, if all of your systems are *nix, you should very well consider sshfs instead of Samba
[19:32:16] futilegames: has joined #ruby
[19:32:47] whathappens: has joined #ruby
[19:33:06] yfeldblum: has joined #ruby
[19:33:35] c_nick: unfortunately my client is on Windows :(
[19:33:51] c_nick: its a stupid bank ! with all old techs
[19:34:55] whathappens: has joined #ruby
[19:35:03] c_nick: i will try the gsub one to convert to windows path and see tomorrow if something works. Many Thanks
[19:35:05] c_nick: has left #ruby: ()
[19:35:22] millerti: has joined #ruby
[19:38:30] lubekpl: has joined #ruby
[19:39:30] stannard: has joined #ruby
[19:39:32] smathy: The / separators should work fine on Windows.
[19:41:03] chouhoul_: has joined #ruby
[19:41:53] mdw: has joined #ruby
[19:43:38] ramfjord: has joined #ruby
[19:44:44] blandflakes: has joined #ruby
[19:47:50] nfk: smathy, they don't work fine on php, fyi
[19:48:14] nfk: oh no, just remembering php makes my blood pressure go way too high
[19:48:26] dmr8: has joined #ruby
[19:48:33] nfk: and i'm supposed to avoid that while my cauterised nose heals
[19:51:34] symm-: has joined #ruby
[19:53:09] millerti: has joined #ruby
[19:54:06] rickmasta: has joined #ruby
[19:56:18] Jackneill: has joined #ruby
[19:56:36] kirun: has joined #ruby
[19:59:21] roshanavand: has joined #ruby
[20:00:37] stannard: has joined #ruby
[20:01:24] millerti: has joined #ruby
[20:02:59] rkazak: has joined #ruby
[20:03:24] haxrbyte: has joined #ruby
[20:06:07] jenrzzz: has joined #ruby
[20:06:07] jenrzzz: has joined #ruby
[20:06:08] dionysus69: has joined #ruby
[20:07:29] yardenbar: has joined #ruby
[20:07:39] Musashi007: has joined #ruby
[20:09:07] auxbuss: has joined #ruby
[20:09:09] jhack: has joined #ruby
[20:09:36] djbkd: has joined #ruby
[20:12:03] cdg: has joined #ruby
[20:13:54] loveablelobster: has joined #ruby
[20:13:58] Gasher: has joined #ruby
[20:15:03] loveable_: has joined #ruby
[20:15:44] kobain: has joined #ruby
[20:16:28] Moosashi: has joined #ruby
[20:16:37] kobain: has joined #ruby
[20:19:17] pawnbox: has joined #ruby
[20:19:58] gigetoo: has joined #ruby
[20:21:14] skade: has joined #ruby
[20:21:45] ur5us: has joined #ruby
[20:25:15] bronson: has joined #ruby
[20:27:02] skade: has joined #ruby
[20:30:12] blandflakes: has joined #ruby
[20:30:47] jgt1: has joined #ruby
[20:32:15] pikajude: has joined #ruby
[20:32:15] pikajude: has joined #ruby
[20:33:06] shadows: s = line.scan(/(?:^\h{4}\s+)((?:\s?\h{2})+)\s+(.+)/)[0]
[20:33:07] zotherstupidguy: has joined #ruby
[20:33:11] shadows: why do I always need the [0] ?
[20:33:31] shevy: it returns to you an array
[20:33:32] shadows: is there a problem with the regex that I could fix so I don't have an array of arrays?
[20:33:35] stannard: has joined #ruby
[20:34:00] shadows: [["0c c1 21 57 00 00 00 00 ac 09 0b 00 00 00 00 00", "..!W............"]]
[20:34:05] shadows: why the outside [ ]?
[20:34:50] shevy: use .flatten
[20:35:03] shadows: alright. that's a good work-around.
[20:35:12] shadows: still confused why it works like this
[20:35:50] chipotle: has joined #ruby
[20:36:15] shadows: also using .flatten I can't be too clever and assign in a conditional
[20:36:29] shadows: if s = line.scan(/(?:^\h{4}\s+)((?:\s?\h{2})+)\s+(.+)/)[0]
[20:36:33] shadows: differs a lot from
[20:36:37] shadows: if s = line.scan(/(?:^\h{4}\s+)((?:\s?\h{2})+)\s+(.+)/).flatten
[20:36:40] shevy: you could try the block form too
[20:36:41] shevy: http://ruby-doc.org/core-2.2.0/String.html#method-i-scan
[20:37:35] shevy: hmm is a bit ugly
[20:38:48] shevy: .first may look prettier than [0]
[20:39:13] shadows: copy. thanks
[20:39:49] yqt: has joined #ruby
[20:41:46] Mia: has joined #ruby
[20:41:46] Mia: has joined #ruby
[20:43:33] grilled-cheese: has left #ruby: ("Leaving")
[20:45:40] roshanavand: has joined #ruby
[20:45:54] djbkd: has joined #ruby
[20:46:37] tAn: has joined #ruby
[20:48:21] davedev24: has joined #ruby
[20:49:58] bronson: has joined #ruby
[20:50:14] chouhoulis: has joined #ruby
[20:50:50] smathy: shadows, it's doing that because you have capturing parens in your regex.
[20:51:07] smathy: ...so each match contains multiple values, hence array of arrays.
[20:51:24] shadows: smathy: I was wondering, how to do sub-captures
[20:51:30] shadows: I couldn't figure it out
[20:51:58] smathy: shadows, what's a *sub* capture?
[20:52:36] ule: has joined #ruby
[20:53:00] ule: has joined #ruby
[20:53:08] smathy: Wait a minute! If all you're interested in is the first element then you don't want .scan you just want .match
[20:53:12] shadows: ha, well... without explaining in great length what I want to do, I'm trying to read the text output from a wireshark capture and take the three columns (byte offset, hex bytes, ascii representation) and then merge them to be one line of hex bytes followed by one line of ascii representation
[20:53:20] FooMunki: has joined #ruby
[20:53:35] ramfjord: has joined #ruby
[20:54:09] speakingcode: has joined #ruby
[20:54:46] flashpoint9: has joined #ruby
[20:55:16] _panpainter: has joined #ruby
[20:55:36] shadows: so "XXXX XX XX XX XX ....\nXXXX XX XX .." => ["XX XX XX XX XX XX", "......"]
[20:56:28] mdw: has joined #ruby
[20:57:25] shadows: each one of these multi-line blocks is preceeded by "some label (NN bytes):\n"
[20:58:18] shadows: I want to keep that all together; I have to do it like this because none of the other wireshark exports have both the label and the byte output... XML has the label but no bytes, and C header output has the bytes but not the labels. headache time.
[20:58:37] smathy: shadows, right, but .scan(...)[0] is always just going to be the first match, ie. (essentially) the same as .match(...)
[20:58:53] shadows: smathy: hmm
[20:59:04] shadows: .match(...) doesn't give me the captures, I think
[20:59:05] htmldrum: has joined #ruby
[20:59:16] smathy: It does, just in [1]... on.
[20:59:18] smathy: [0] is the whole match.
[20:59:23] sneakerhax: has joined #ruby
[20:59:58] diegoaguilar: has joined #ruby
[21:00:24] smathy: shadows, also in the .captures method of what's returned.
[21:00:24] shadows: =~ is match no?
[21:00:36] smathy: Yes, it's the one for Perlers.
[21:00:42] cdg: has joined #ruby
[21:00:46] shadows: ACTION :)
[21:01:15] shadows: sample input https://gist.github.com/eshattow/9808f71dc7e3ff6fdbcf9e3cf3dad841
[21:03:40] millerti: has joined #ruby
[21:03:57] shadows: updated https://gist.github.com/eshattow/9808f71dc7e3ff6fdbcf9e3cf3dad841 with sample output too
[21:04:44] smathy: Ok, but you're not taking the [0] there right? You're grabbing the whole .scan
[21:05:16] smathy: Right, because your regex only matches a single line of that input.
[21:05:39] smathy: ...so that seems workable except you're capturing the ASCII too, did you want that?
[21:06:10] shadows: I could re-implement it myself but yeah I'd like to unwind the ascii outputs
[21:06:23] smathy: Ok cool, so you're golden then right? Well done.
[21:06:39] shadows: no, that's the output I want ;) haven't got there yet
[21:06:54] tAn: has joined #ruby
[21:07:47] skolman_: has joined #ruby
[21:08:13] duncannz: has joined #ruby
[21:08:40] shadows: workflow-wise should I do this line-by-line with some temporaries or should I be grabbing each "Label (xx bytes):\n\h{4} (\s?\h\h)+ (.)+\n"... ?
[21:10:40] phpwebdev: has joined #ruby
[21:11:01] shadows: smathy: i.e. a regex to capture line 5 to line 10, line 11 to line 12; within each of those captures could I further have sub-captures that split up the label, the addr, hex, ascii ? or is that not how it works
[21:11:51] smathy: It will be hard to do the whole lot in a single regex, I'd probably use the flip flop operator.
[21:11:55] kirillow: has joined #ruby
[21:12:02] shadows: flip-flop?
[21:12:12] panpainter: has joined #ruby
[21:12:16] smathy: Same as Perl's.
[21:12:21] smathy: ...except there's no implicit receiver for a regex.
[21:12:23] shadows: looking now, thanks
[21:12:53] smathy: ...so `if line =~ /^your start/ .. line =~ /the end/`
[21:13:21] shadows: that hurts the brain. awesome.
[21:13:54] smathy: Yeah, only trick will be fiddling with the end marker, because it can be the same as the start marker for the next one.
[21:14:43] shadows: verifying that I haven't missed some nifty trick or thing that would make this easier hmm
[21:15:31] shadows: smathy: /end/ could have a negative look-ahead maybe
[21:16:10] shadows: that's totally new to me and interesting
[21:16:24] smathy: shadows, that won't work for a block that's precisely divisible by 10.
[21:16:24] Moosashi: has joined #ruby
[21:16:45] skolman_: has joined #ruby
[21:17:09] smathy: ...obviously you could also just do it line-by-line and have some logic to move to the next block when a new "header" is discovered, that might be easier in this case.
[21:17:28] 7GHAAZFU8: has joined #ruby
[21:17:34] smathy: ...same thing as flip flop, but with your own switch basically, like `within_block = false` that you switch yourself.
[21:18:56] workmad3: has joined #ruby
[21:19:01] citizentwo: has joined #ruby
[21:19:08] tax: has joined #ruby
[21:19:15] whathappens: has joined #ruby
[21:19:51] n_blownapart: has joined #ruby
[21:19:55] banister: has joined #ruby
[21:22:08] diegoviola: has joined #ruby
[21:22:14] diegoviola: has joined #ruby
[21:22:46] ledestin: has joined #ruby
[21:23:17] shadows: s.scan /[\w ]+\(\d+ \w+\)\:\n(?:[[:xdigit:]]{4}\s+(?:\s?[[:xdigit:]]{2}){1,16}\s+.{1,16}\n)+/
[21:23:33] shadows: it's crazy but it does pick out the block of text I want, question is what to go from there
[21:24:04] s00pcan: has joined #ruby
[21:24:59] shadows: it would be more convenient if that regex could also do the captures
[21:26:27] shadows: but I can't nest captures, I think
[21:28:04] shadows: oh! maybe I can
[21:28:16] whathappens: has joined #ruby
[21:28:16] smathy: shadows, you realize that doing ?: means "don't capture" ?
[21:30:52] tAn: has joined #ruby
[21:31:09] zotherstupidguy: has joined #ruby
[21:31:22] cpruitt: has joined #ruby
[21:32:04] shadows: smathy: yeah... part of capturing undefined N lines of a group
[21:32:40] smathy: Ok, just that you are capturing, so if you're not seeing that then maybe you've `?:`ed the wrong bits.
[21:33:23] hobodave: has joined #ruby
[21:36:08] kareeoleez: has joined #ruby
[21:37:23] n_blownapart: has joined #ruby
[21:37:39] stannard: has joined #ruby
[21:37:40] tvon: has joined #ruby
[21:41:54] j2k: has joined #ruby
[21:43:14] dikaio: has joined #ruby
[21:43:21] jmarinelli: has joined #ruby
[21:43:28] whathappens: has joined #ruby
[21:44:36] yfeldblum: has joined #ruby
[21:45:52] dikaio: has joined #ruby
[21:45:58] Musashi007: has joined #ruby
[21:47:07] GodFather: has joined #ruby
[21:47:11] FooMunki: has joined #ruby
[21:48:27] n008f4g_: has joined #ruby
[21:50:55] Leok12: has joined #ruby
[21:51:01] whathappens: has joined #ruby
[21:51:15] ciacci1234: has joined #ruby
[21:51:34] pawnbox: has joined #ruby
[21:51:49] Leok12: Hello is there someway to call a method inside a string, but only on specific words, I want to use the cloroize gem and some words to have color
[21:52:26] skolman: has joined #ruby
[21:53:30] smathy: Leok12, so you mean color some of the words in a string?
[21:53:52] baweaver: word_colors = {'hi' => Colorizer.red}; string.split(' ').map { |w| word_colors[w] || w }.join(' ')
[21:54:07] baweaver: make a hash to be a mapping of word to color
[21:54:19] baweaver: then substitute through the string
[21:54:24] Leok12: smathy: exatcly
[21:54:33] baweaver: either using gsub or splitting them
[21:54:35] Leok12: baweaver: I think I was looking for something like this
[21:54:45] Leok12: thanks a lot let me try
[21:55:00] baweaver: colorizing is literally surrounding something in color tags for console
[21:55:08] jmarinelli: has joined #ruby
[21:55:30] baweaver: so just substitute the matchign words with word surrounded by its color mapping
[21:56:38] nettoweb: has joined #ruby
[21:57:03] skolman_: has joined #ruby
[21:57:27] kareeoleez: has joined #ruby
[21:58:17] millerti: has joined #ruby
[21:58:56] Leok12: baweaver: thank you
[21:59:03] Devalo: has joined #ruby
[21:59:43] coyo: has joined #ruby
[22:00:14] tAn: has joined #ruby
[22:01:41] hobodave: has joined #ruby
[22:01:51] weemsledeux: has joined #ruby
[22:02:57] dikaio: has joined #ruby
[22:05:00] jgt1: has joined #ruby
[22:05:03] chopin: has joined #ruby
[22:06:58] d5sx43: has joined #ruby
[22:07:38] Madplatypus: has joined #ruby
[22:08:47] chopin_: has joined #ruby
[22:10:51] Gasher: hello, I'm looking for a function like strip, but one that strips ALL whitespace. is there one in corelib?
[22:11:55] al2o3-cr: has joined #ruby
[22:12:21] blackmes1: has joined #ruby
[22:14:02] bougyman: Gasher: you get an answer? I got disconnected a sec
[22:14:26] bougyman: #gsub(/[[:space:]]/,'')
[22:15:38] Gasher: thanks :)
[22:17:14] mtkd: has joined #ruby
[22:20:03] moeabdol: has joined #ruby
[22:20:16] smathy: ...umm, that'll remove internal whitespace too.
[22:20:16] Moosashi: has joined #ruby
[22:21:24] kirun_: has joined #ruby
[22:21:57] smathy: Gasher, what whitespace is strip not stripping?
[22:22:51] Gasher: smathy; it only trails "leading and trailing whitespace"
[22:22:55] tAn: has joined #ruby
[22:23:02] Gasher: my goal is to strip internal too
[22:23:16] smathy: Sorry, I misunderstood completely.
[22:24:28] panpainter: has joined #ruby
[22:31:59] benlieb: has joined #ruby
[22:33:12] Chunlea: has joined #ruby
[22:36:25] chriscarpenter12: has joined #ruby
[22:36:26] nanoyak: has joined #ruby
[22:36:57] chriscarpenter12: has left #ruby: ()
[22:36:58] zenlot: has joined #ruby
[22:37:40] banister: has joined #ruby
[22:37:45] tax: has joined #ruby
[22:38:19] yfeldblum: has joined #ruby
[22:39:51] rbennacer: has joined #ruby
[22:40:05] panpainter: has joined #ruby
[22:41:09] weemsledeux: has joined #ruby
[22:42:10] FooMunki: has joined #ruby
[22:42:16] Musashi007: has joined #ruby
[22:44:10] whathappens: has joined #ruby
[22:46:39] ramfjord: has joined #ruby
[22:47:34] tAn: has joined #ruby
[22:49:17] Hanmac: has joined #ruby
[22:49:25] roshanavand: has joined #ruby
[22:51:32] charliesome: has joined #ruby
[22:53:58] roshanavand: has joined #ruby
[22:55:28] FooMunki: has joined #ruby
[22:55:49] nanoyak: has joined #ruby
[22:56:32] tubuliferous: has joined #ruby
[22:58:51] whathappens: has joined #ruby
[22:59:07] Rasi: has joined #ruby
[22:59:20] lomex: has joined #ruby
[23:00:37] Devalo: has joined #ruby
[23:01:33] mnrmnaugh: has joined #ruby
[23:02:06] zacstewart: has joined #ruby
[23:04:57] djbkd: has joined #ruby
[23:05:45] djbkd: has joined #ruby
[23:05:56] Moosashi: has joined #ruby
[23:06:18] millerti: has joined #ruby
[23:06:59] millerti: has joined #ruby
[23:10:34] whathappens: has joined #ruby
[23:17:02] bronson: has joined #ruby
[23:17:54] lomex: has joined #ruby
[23:18:41] eljimmy: has joined #ruby
[23:18:47] Hanmac: has joined #ruby
[23:20:06] pawnbox: has joined #ruby
[23:21:53] snowy: has joined #ruby
[23:22:23] Phanes: has joined #ruby
[23:22:23] Phanes: has joined #ruby
[23:22:45] JesseH: has joined #ruby
[23:24:02] whathappens: has joined #ruby
[23:26:08] banister: has joined #ruby
[23:27:13] elifoster: has joined #ruby
[23:29:15] roshanavand: has joined #ruby
[23:30:43] hays: has joined #ruby
[23:31:14] panpainter: has joined #ruby
[23:31:29] Azure: has joined #ruby
[23:31:30] djbkd: has joined #ruby
[23:32:44] ramfjord: has joined #ruby
[23:32:53] millerti: has joined #ruby
[23:33:45] gambl0re: has joined #ruby
[23:34:11] shadeslayer: has joined #ruby
[23:35:04] Sammichmaker: has joined #ruby
[23:36:41] bobbycvi: has joined #ruby
[23:37:09] skolman: has joined #ruby
[23:38:59] kies: has joined #ruby
[23:43:27] unreal_: has joined #ruby
[23:45:31] ruid: has joined #ruby
[23:45:40] Nanuq: has joined #ruby
[23:46:07] yfeldblum: has joined #ruby
[23:48:24] johnmilton: has joined #ruby
[23:49:22] DevastatingDave: has joined #ruby
[23:52:11] Moosashi: has joined #ruby
[23:52:48] freerobby: has joined #ruby
[23:53:49] Alina-malina: has joined #ruby
[23:54:08] n_blownapart: has joined #ruby