« Back to channel list

#ruby - 13 June 2016

« Back 1 day Forward 1 day »
[00:00:37] ecksit: has joined #ruby
[00:04:10] paulca: has joined #ruby
[00:06:10] freerobby: has joined #ruby
[00:06:41] nonnatus: has joined #ruby
[00:09:15] johnDoe111: has joined #ruby
[00:10:11] nonnatus: has joined #ruby
[00:11:15] jancel: has joined #ruby
[00:11:15] bkxd: has joined #ruby
[00:13:47] ur5us: has joined #ruby
[00:18:06] jenrzzz: has joined #ruby
[00:18:40] moeabdol1: has joined #ruby
[00:19:39] certainty: has joined #ruby
[00:27:13] Hobogrammer: has joined #ruby
[00:27:18] jancel: has joined #ruby
[00:30:12] aupadhye: has joined #ruby
[00:30:49] moeabdol1: has joined #ruby
[00:36:13] jaiks1: has joined #ruby
[00:39:13] mitt3ns: has joined #ruby
[00:39:23] nonnatus: has joined #ruby
[00:39:51] mitt3ns: has joined #ruby
[00:41:07] palms: has joined #ruby
[00:41:53] tristanp: has joined #ruby
[00:42:28] paulca: has joined #ruby
[00:45:02] moeabdol1: has joined #ruby
[00:46:31] armyriad: has joined #ruby
[00:47:36] nonnatus: has joined #ruby
[00:48:53] jackjackdripper: has joined #ruby
[00:49:14] benlieb: has joined #ruby
[01:00:36] panpainter: has joined #ruby
[01:01:41] binaryplease1: has joined #ruby
[01:01:50] strigonLeader: has joined #ruby
[01:08:52] tristanp: has joined #ruby
[01:09:20] norc-2: has joined #ruby
[01:10:13] tristanp: has joined #ruby
[01:11:57] p337rB: has joined #ruby
[01:12:32] duckpuppy: has joined #ruby
[01:12:55] pawnbox: has joined #ruby
[01:13:00] nankyokusei: has joined #ruby
[01:13:20] jaguarmagenta: has joined #ruby
[01:15:39] tAn: has joined #ruby
[01:18:13] tatsuo: has joined #ruby
[01:18:25] flashpoint9: has joined #ruby
[01:20:25] certainty: has joined #ruby
[01:21:40] AcidCrash: has joined #ruby
[01:27:02] ekinmur: has joined #ruby
[01:27:48] m_antis: has joined #ruby
[01:28:16] ramfjord: has joined #ruby
[01:32:12] jancel: has joined #ruby
[01:37:57] Mia: has joined #ruby
[01:37:57] Mia: has joined #ruby
[01:39:32] vandemar: has joined #ruby
[01:41:47] palms: has joined #ruby
[01:42:06] jancel: has joined #ruby
[01:45:21] johnDoe111: has joined #ruby
[01:45:53] nettoweb: has joined #ruby
[01:46:23] nonnatus: has joined #ruby
[01:51:17] benlieb: has joined #ruby
[01:57:13] mynameisbrian: has joined #ruby
[01:57:21] crystal77: has joined #ruby
[01:57:57] mynameisbrian: if I run: ruby -w on my script, it displays a warning. But if I run: ruby -cw on my script, it just says "Syntax OK". It seems like the c flag is negating the w flag. what's happening here?
[01:58:09] mynameisbrian: The book im reading recommends to use -cw for checking sytnax
[01:59:13] jrafanie: has joined #ruby
[02:02:11] diegoaguilar: has joined #ruby
[02:03:28] RobertBirnie: has joined #ruby
[02:06:29] Kero: has joined #ruby
[02:06:46] mynameisbrian: nevermind. my program has an error. I thought the error was a warning. -c doesn't run program, but -w does, so I thought -w was giving me a warning.
[02:07:43] mynameisbrian: -c says the syntax is fine, because it is, but in this case it's calling an undefined method
[02:08:32] Axsuul: has joined #ruby
[02:13:16] duckpuppy: has joined #ruby
[02:14:46] LoneHerm_: has joined #ruby
[02:16:28] jaguarmagenta: has joined #ruby
[02:21:00] ledestin: has joined #ruby
[02:21:06] certainty: has joined #ruby
[02:24:02] pilne: has joined #ruby
[02:26:54] tristanp: has joined #ruby
[02:27:53] tristanp: has joined #ruby
[02:30:42] RobertBirnie: has joined #ruby
[02:32:01] ericli: Hi, here's my code : https://paste.fedoraproject.org/378321/65785076/ and I got "Use the return of the conditional for variable assignment and comparison." for if port == 443 statement
[02:32:14] ericli: Can one let me know why this does not work?
[02:39:26] stardiviner: has joined #ruby
[02:42:33] palms: has joined #ruby
[02:42:39] jancel: has joined #ruby
[02:43:01] stardiviner: has joined #ruby
[02:44:35] solocshaw: has joined #ruby
[02:45:01] jenrzzz: has joined #ruby
[02:45:01] jenrzzz: has joined #ruby
[02:49:37] nonnatus: has joined #ruby
[02:51:08] elton: has joined #ruby
[02:52:44] jancel: has joined #ruby
[02:56:46] elton: has joined #ruby
[02:57:17] pontiki: ericli: might it be because you're using % instead of # for interpolation?
[02:58:17] jord-n: ericli - your status_code_cmd is not guaranteed to be set. Try status_code_cmd = if port == 443 ... (see here for more details -- http://www.rubydoc.info/github/bbatsov/RuboCop/RuboCop/Cop/Style/ConditionalAssignment)
[02:58:34] JazzyVariable227: has joined #ruby
[03:00:17] jord-n: actually, strike my guaranteed statement, looks like purely a style concern.
[03:00:20] sandstrom: has joined #ruby
[03:03:56] pawnbox: has joined #ruby
[03:11:24] chipotle: has joined #ruby
[03:12:07] p337rB: has joined #ruby
[03:12:48] panpainter: has joined #ruby
[03:13:50] nankyokusei: has joined #ruby
[03:15:42] dhodgkin: has joined #ruby
[03:16:19] arescorpio: has joined #ruby
[03:17:28] tAn: has joined #ruby
[03:17:31] braincrash: has joined #ruby
[03:20:25] duckpuppy: has joined #ruby
[03:20:51] k3rn31: has joined #ruby
[03:21:39] c0mrad3: has joined #ruby
[03:21:56] certainty: has joined #ruby
[03:23:56] johnDoe111: has joined #ruby
[03:25:53] pawnbox: has joined #ruby
[03:25:55] jenrzzz: has joined #ruby
[03:25:55] jenrzzz: has joined #ruby
[03:27:40] jancel: has joined #ruby
[03:29:04] ramfjord: has joined #ruby
[03:29:38] roamingdog: has joined #ruby
[03:32:02] tristanp: has joined #ruby
[03:32:22] abbi: has joined #ruby
[03:34:46] jgt: has joined #ruby
[03:34:49] tmtwd: has joined #ruby
[03:39:01] kareeoleez: has joined #ruby
[03:39:41] SilverKey: has joined #ruby
[03:40:48] wolffles: has joined #ruby
[03:43:08] Yiota: has joined #ruby
[03:43:15] palms: has joined #ruby
[03:43:35] gix: has joined #ruby
[03:43:57] jenrzzz: has joined #ruby
[03:43:57] jenrzzz: has joined #ruby
[03:44:08] nonnatus: has joined #ruby
[03:47:30] pawnbox: has joined #ruby
[03:47:48] panpainter: has joined #ruby
[03:47:57] nonnatus: has left #ruby: ()
[03:56:44] k3rn31: has joined #ruby
[03:57:12] ramfjord: has joined #ruby
[03:58:13] i: has joined #ruby
[03:59:43] p0p0pr37: has joined #ruby
[04:01:18] johnDoe111: has joined #ruby
[04:03:56] djbkd_: has joined #ruby
[04:06:03] wolffles: i have to find the decimal value for “hello” where ‘a’ =0 ‘b’ = 1 … ‘z’ = 25, and somehow ‘bb’ = 27, ‘hello’ = 3276872 what formula do i use?
[04:07:04] panpainter: has joined #ruby
[04:07:43] nofxx: wolffles, 'ab' is 26? that's kinda crazy
[04:07:53] nofxx: shouldn't aa be 26 and ab 27?
[04:08:42] terminalrecluse: has joined #ruby
[04:08:57] wolffles: i was thinking that but this problem has the test saying that bb is 27
[04:09:13] helpa: has joined #ruby
[04:09:19] wolffles: what gem is that?
[04:09:21] jidar: using base wouldn't explain the repeating of the same letter
[04:09:38] nofxx: wolffles, yeah, maybe we're both too naive on this matter, but I would think it's a base 'gotcha'
[04:10:12] nofxx: jidar, ah, you solved... wolffles a is zero, so yeah, 26 is ba, 27 bb
[04:10:28] nofxx: because aa == 00
[04:10:48] jenrzzz: has joined #ruby
[04:12:41] yfeldblum: has joined #ruby
[04:13:52] wolffles: think someone could help me wiht the formula? my head hurts from trying for so long
[04:15:29] djbkd_: has joined #ruby
[04:16:00] tristanp: has joined #ruby
[04:17:15] weemsledeux: has joined #ruby
[04:18:17] tAn: has joined #ruby
[04:22:39] certainty: has joined #ruby
[04:22:59] aryaching: has joined #ruby
[04:23:15] dionysus69: has joined #ruby
[04:25:24] Wolland: has joined #ruby
[04:25:42] pawnbox: has joined #ruby
[04:26:13] CircleDot: has joined #ruby
[04:27:52] SShrike: has joined #ruby
[04:34:16] naftilos76: has joined #ruby
[04:36:50] mistermocha: has joined #ruby
[04:36:56] Yiota: has joined #ruby
[04:37:17] Yzguy: has joined #ruby
[04:41:20] panpainter: has joined #ruby
[04:44:02] palms: has joined #ruby
[04:45:56] Yiota: has joined #ruby
[04:47:46] jgt: has joined #ruby
[04:49:31] KnownSyntax: has joined #ruby
[04:50:07] Coldblackice: has joined #ruby
[04:52:34] jenrzzz: has joined #ruby
[04:52:34] jenrzzz: has joined #ruby
[04:54:31] iajrz: has joined #ruby
[04:57:16] panpainter: has joined #ruby
[04:57:28] dcunit3d: has joined #ruby
[05:00:29] dionysus69: has joined #ruby
[05:01:39] tubuliferous_: has joined #ruby
[05:01:54] hahuang61: has joined #ruby
[05:04:25] tristanp: has joined #ruby
[05:11:25] kgrz: has joined #ruby
[05:14:40] nankyokusei: has joined #ruby
[05:16:25] jancel: has joined #ruby
[05:18:13] pawnbox: has joined #ruby
[05:20:42] tAn: has joined #ruby
[05:23:24] certainty: has joined #ruby
[05:23:37] blackgoat: has joined #ruby
[05:24:25] panpainter: has joined #ruby
[05:25:05] Contigi: has joined #ruby
[05:25:58] jackjackdripper: has joined #ruby
[05:26:25] flashpoint9: has joined #ruby
[05:31:35] haraigoshi: has joined #ruby
[05:33:03] tildes: has joined #ruby
[05:36:39] djbkd_: has joined #ruby
[05:37:45] al2o3-cr: has joined #ruby
[05:42:45] hk238: has joined #ruby
[05:43:17] RobertBirnie: has joined #ruby
[05:43:26] johnDoe111: has joined #ruby
[05:44:16] flughafen: has joined #ruby
[05:45:00] ReK2: has joined #ruby
[05:47:10] duncannz: has joined #ruby
[05:47:28] Infra-Red: has joined #ruby
[05:50:37] chipotle: has joined #ruby
[05:53:16] pawnbox: has joined #ruby
[05:54:46] panpainter: has joined #ruby
[05:54:47] chipotle: has joined #ruby
[05:55:23] flughafen: morning everybody
[05:55:30] jenrzzz: has joined #ruby
[05:55:30] jenrzzz: has joined #ruby
[05:56:26] JazzyVariable227: has joined #ruby
[05:57:55] kareeoleez: has joined #ruby
[05:58:07] djbkd_: has joined #ruby
[06:09:06] kgrz: has joined #ruby
[06:09:10] edwinvdgraaf: has joined #ruby
[06:12:53] kareeole_: has joined #ruby
[06:14:03] mistermocha: has joined #ruby
[06:14:41] last_staff: has joined #ruby
[06:16:23] Guest63: has joined #ruby
[06:17:53] jancel: has joined #ruby
[06:18:27] vuoto: has joined #ruby
[06:20:29] sandstrom: has joined #ruby
[06:20:43] raeoks: has joined #ruby
[06:22:44] chipotle: has joined #ruby
[06:22:55] blaxter: has joined #ruby
[06:23:14] certainty: has joined #ruby
[06:23:36] panpainter: has joined #ruby
[06:24:24] scepticulous: has joined #ruby
[06:26:12] elton: has joined #ruby
[06:27:52] solars: has joined #ruby
[06:29:28] Sheperson: has joined #ruby
[06:29:51] chipotle: has joined #ruby
[06:33:16] nobitanobi: has joined #ruby
[06:37:19] firstdayonthejob: has joined #ruby
[06:39:01] chipotle: has joined #ruby
[06:39:01] rbr: has joined #ruby
[06:39:50] jaguarmagenta: has joined #ruby
[06:40:53] codecop: has joined #ruby
[06:42:28] n1x-nz: has joined #ruby
[06:42:38] dionysus69: has joined #ruby
[06:43:49] hahuang61: has joined #ruby
[06:45:00] chipotle: has joined #ruby
[06:49:00] aupadhye: has joined #ruby
[06:49:00] chipotle: has joined #ruby
[06:50:02] kgrz: has joined #ruby
[06:51:06] andikr: has joined #ruby
[06:51:23] pepee: has joined #ruby
[06:51:27] panpainter: has joined #ruby
[06:51:27] chipotle: has joined #ruby
[06:52:00] tao_: has joined #ruby
[06:54:24] k3rn31: has joined #ruby
[06:55:11] tAn: has joined #ruby
[06:57:13] mistermo_: has joined #ruby
[07:00:27] the_drow: has joined #ruby
[07:01:28] chipotle: has joined #ruby
[07:02:33] biberu: has joined #ruby
[07:03:59] the_drow: has joined #ruby
[07:04:21] dsea: has joined #ruby
[07:04:21] alfiemax: has joined #ruby
[07:06:02] Infra-Red: has joined #ruby
[07:08:03] tax: has joined #ruby
[07:10:17] sandstrom: has joined #ruby
[07:10:24] the_drow: has joined #ruby
[07:11:56] chipotle: has joined #ruby
[07:12:30] bluOxigen: has joined #ruby
[07:14:13] tjbiddle: has joined #ruby
[07:14:39] pawnbox: has joined #ruby
[07:15:33] nankyokusei: has joined #ruby
[07:15:36] dcunit3d: has joined #ruby
[07:17:53] jenrzzz: has joined #ruby
[07:18:57] aganov: has joined #ruby
[07:19:57] bluOxigen: has joined #ruby
[07:20:46] antgel: has joined #ruby
[07:21:03] DoubleMalt: has joined #ruby
[07:21:33] colegatron: has joined #ruby
[07:23:13] ur5us: has joined #ruby
[07:24:55] iMadper: has joined #ruby
[07:26:51] A124: has joined #ruby
[07:28:17] phredus: has joined #ruby
[07:28:20] the_drow: has joined #ruby
[07:29:09] zacstewart: has joined #ruby
[07:30:33] skweek: has joined #ruby
[07:33:09] aberen: has joined #ruby
[07:36:00] ramfjord: has joined #ruby
[07:39:59] the_drow: has joined #ruby
[07:40:23] craigp: has joined #ruby
[07:45:24] r1v3r_: has joined #ruby
[07:49:05] vasilakisFiL: has joined #ruby
[07:49:35] kgrz: has joined #ruby
[07:49:54] roamingdog: has joined #ruby
[07:51:45] the_drow: has joined #ruby
[07:52:48] tjbiddle: has joined #ruby
[07:52:57] nobitanobi: has joined #ruby
[07:54:58] Ishido: has joined #ruby
[07:55:53] nobitanobi: has joined #ruby
[07:56:35] lsmola: has joined #ruby
[07:58:28] ur5us: has joined #ruby
[08:00:34] jackjackdripper: has joined #ruby
[08:01:54] Couch: has joined #ruby
[08:01:57] aupadhye: has joined #ruby
[08:02:46] pawnbox: has joined #ruby
[08:05:28] last_staff1: has joined #ruby
[08:08:33] tristanp: has joined #ruby
[08:10:21] joonty: has joined #ruby
[08:13:49] araujo: has joined #ruby
[08:15:01] amtrivedi: has joined #ruby
[08:15:27] amtrivedi: Can anyone tell me the ruby equivalent of this python snippet - del(missing_list[missing_list.index(key)])
[08:15:44] araujo: has joined #ruby
[08:15:46] amtrivedi: del(array[array.index(key)])
[08:15:51] amtrivedi: ^ essentially this
[08:16:18] amtrivedi: I want to delete an element from an array from a particular position - array.index(key)
[08:16:56] neanderslob: has joined #ruby
[08:16:59] dcunit3d: has joined #ruby
[08:17:31] blaxter: http://ruby-doc.org/core-2.2.0/Array.html#method-i-delete_at
[08:18:15] senayar: has joined #ruby
[08:18:15] senayar: has joined #ruby
[08:18:22] amtrivedi: blaxter: I read that, and modified it as - array.delete_at(array.index(key))
[08:18:32] amtrivedi: But it does not work.
[08:18:41] Axsuul: has joined #ruby
[08:18:48] amtrivedi: Is that correct?
[08:19:29] the_drow_: has joined #ruby
[08:20:09] blaxter: yes, it is correct
[08:20:53] amtrivedi: :/ But it does not work, gives me the following error -
[08:20:54] amtrivedi: `delete_at': no implicit conversion from nil to integer
[08:21:08] ur5us: has joined #ruby
[08:21:11] blaxter: maybe reading the error could help
[08:21:24] blaxter: that because the key is not on the array
[08:21:32] blaxter: so array.index returns nil
[08:22:15] jaruga___: has joined #ruby
[08:22:19] amtrivedi: Ohkay, looks like something above that code must be wrong then, thanks.
[08:23:30] gregf_: amtrivedi: you can do a check before trying to delete
[08:23:56] gregf_: >> a = [1,5,3,4,7]; if i = a.index(100); a.delete_at(i);end # like that
[08:23:57] ruby[bot]: gregf_: # => nil (https://eval.in/587954)
[08:24:40] the_drow_: has joined #ruby
[08:24:42] amtrivedi: gregf: Yeah, that is what I am doing right now :)
[08:24:59] palms: has joined #ruby
[08:25:04] eladmeidar: has joined #ruby
[08:25:55] gregf_: python would throw a nice error ;)
[08:26:26] aufi: has joined #ruby
[08:26:32] ocbtec: has joined #ruby
[08:27:04] jhass: if the elements are actually unique you can also just .delete(key)
[08:27:13] gregf_: amtrivedi: you can also include try except for that #would help in debugging imho
[08:28:13] gregf_: a/include/$' a/
[08:29:48] zacstewart: has joined #ruby
[08:30:38] gregf_: amtrivedi: what jhass has suggested is worth a try
[08:30:57] blackmesa: has joined #ruby
[08:31:47] amtrivedi: jhass, gregf Thanks, though I suspect the problem is that my array is not building up correctly before deleting the element.
[08:33:34] certainty: has joined #ruby
[08:43:11] jenrzzz: has joined #ruby
[08:43:11] jenrzzz: has joined #ruby
[08:43:17] dumdedum: has joined #ruby
[08:44:43] Hounddog: has joined #ruby
[08:46:26] craigp: has joined #ruby
[08:48:30] pawnbox: has joined #ruby
[08:48:42] moeabdol: has joined #ruby
[08:49:43] electrostat: has joined #ruby
[08:50:50] ruskie: has joined #ruby
[08:53:28] panpainter: has joined #ruby
[08:54:47] marr: has joined #ruby
[08:55:06] electrostat: has joined #ruby
[08:56:24] elton: has joined #ruby
[08:59:04] tAn: has joined #ruby
[08:59:29] Hounddog: has joined #ruby
[08:59:48] CloCkWeRX: has joined #ruby
[09:00:20] amtrivedi1: has joined #ruby
[09:05:02] giz|work: has joined #ruby
[09:08:44] c355E3B: has joined #ruby
[09:09:36] lxsameer: has joined #ruby
[09:11:03] unshadow: has joined #ruby
[09:13:10] snowy: has joined #ruby
[09:13:44] unshadow: So, where is a good place to look for Ruby freelancers ? the company I work at is looking for more people to add to the team
[09:14:36] workmad3: has joined #ruby
[09:15:46] tvw: has joined #ruby
[09:16:25] nankyokusei: has joined #ruby
[09:18:01] vuoto: has joined #ruby
[09:18:58] troulouliou_div2: has joined #ruby
[09:20:43] drptbl: has joined #ruby
[09:21:28] madgen: has joined #ruby
[09:25:49] palms: has joined #ruby
[09:31:06] zacstewart: has joined #ruby
[09:34:58] evidex: has joined #ruby
[09:35:08] TomyWork: has joined #ruby
[09:37:37] toretore: has joined #ruby
[09:38:17] matp: has joined #ruby
[09:41:56] r1v3r_: has joined #ruby
[09:45:09] certainty: has joined #ruby
[09:49:56] mdw: has joined #ruby
[09:50:55] drptbl: has joined #ruby
[09:53:53] jancel: has joined #ruby
[09:54:10] Oclair: has joined #ruby
[09:56:41] weckl: has joined #ruby
[09:57:32] evidex: has joined #ruby
[09:58:54] bnjf: has joined #ruby
[10:04:31] SDr: has left #ruby: ()
[10:05:22] vrturbo: has joined #ruby
[10:05:57] vrturbo: hi, I"m having problems with an advanced query using https://github.com/elastic/elasticsearch-ruby
[10:06:12] vrturbo: query http://pastie.org/10874652
[10:06:32] vrturbo: I can get simple test searches to work but I need this more complex query
[10:06:35] skade: has joined #ruby
[10:07:54] vrturbo: I just don't know how to pass in the advanced query, this query works fine in kibana and sense via the browser
[10:09:06] tristanp: has joined #ruby
[10:09:12] alexandernst: has joined #ruby
[10:09:12] alexandernst: has joined #ruby
[10:09:26] panpainter: has joined #ruby
[10:10:51] Silthias: has joined #ruby
[10:14:30] nadir: has joined #ruby
[10:16:14] blackmesa: has joined #ruby
[10:18:22] PotatoChipz: has joined #ruby
[10:19:29] pawnbox: has joined #ruby
[10:19:45] dcunit3d: has joined #ruby
[10:19:57] bruce_lee: has joined #ruby
[10:19:57] bruce_lee: has joined #ruby
[10:24:51] alexandernst: has joined #ruby
[10:25:57] pandaant: has joined #ruby
[10:26:36] Hyuk: has joined #ruby
[10:26:49] CloCkWeRX: has joined #ruby
[10:27:15] jenrzzz: has joined #ruby
[10:27:16] jhass: vrturbo: quick look at the docs I see https://github.com/elastic/elasticsearch-ruby/tree/master/elasticsearch-dsl and https://github.com/elastic/elasticsearch-ruby/tree/master/elasticsearch-api#usage-with-the-elasticsearch-gem simply passing it with a body attribute (not the JSON but as ruby hash or something else that'll return the JSON on to_json)
[10:27:40] Rodya_: has joined #ruby
[10:28:10] jhass: http://www.rubydoc.info/gems/elasticsearch-api/Elasticsearch/API/Actions#search-instance_method
[10:29:48] araujo: has joined #ruby
[10:32:05] zacstewart: has joined #ruby
[10:32:20] kawb: has joined #ruby
[10:32:24] alexandernst: has joined #ruby
[10:32:24] alexandernst: has joined #ruby
[10:32:53] evidex: has joined #ruby
[10:33:30] kawb_: has joined #ruby
[10:34:49] jenrzzz: has joined #ruby
[10:36:33] alexandernst: has joined #ruby
[10:36:33] alexandernst: has joined #ruby
[10:36:40] alexandernst: has joined #ruby
[10:38:05] alexandernst: has joined #ruby
[10:40:21] kawb: has joined #ruby
[10:40:57] panpainter: has joined #ruby
[10:41:18] yeticry: has joined #ruby
[10:42:46] d0lph1n98: has joined #ruby
[10:43:30] vrturbo: jhass, thanks for that
[10:43:45] qasaur: has joined #ruby
[10:44:41] vrturbo: jhass, I'll look closely at the the body attribute
[10:45:32] Kedare: has joined #ruby
[10:47:42] rippa: has joined #ruby
[10:49:27] rodfersou: has joined #ruby
[10:49:33] sdothum: has joined #ruby
[10:51:03] jespada: has joined #ruby
[10:51:39] joonty: has joined #ruby
[10:52:47] d0nn1e: has joined #ruby
[10:58:28] jaguarmagenta: has joined #ruby
[11:03:25] nettoweb: has joined #ruby
[11:05:50] ferr1: has joined #ruby
[11:06:36] panpainter: has joined #ruby
[11:07:03] tao_: has joined #ruby
[11:08:19] certainty: has joined #ruby
[11:11:40] tvw: has joined #ruby
[11:14:56] freerobby: has joined #ruby
[11:16:05] tAn: has joined #ruby
[11:16:56] Rodya_: has joined #ruby
[11:17:16] nankyokusei: has joined #ruby
[11:19:42] mdw7: has joined #ruby
[11:20:00] evidex: has joined #ruby
[11:21:10] SHyx0rmZ: has joined #ruby
[11:21:43] mdw: has joined #ruby
[11:24:48] senayar: has joined #ruby
[11:25:50] Coldblackice: has joined #ruby
[11:26:23] chappy: has left #ruby: ("Leaving")
[11:26:42] Emmanuel_Chanel: has joined #ruby
[11:29:42] panpainter: has joined #ruby
[11:29:56] senayar: has joined #ruby
[11:31:28] TomyWork: has joined #ruby
[11:31:50] tAn: has joined #ruby
[11:32:12] vrturbo: jhass, strange, this did the trick ... req = client.search body: JSON.parse(json_search)
[11:32:35] jhass: vrturbo: yes I kinda pointed that out
[11:32:54] jhass: vrturbo: why don't you define json_search as a ruby hash in the first place though?
[11:33:03] zacstewart: has joined #ruby
[11:33:11] Yiota: has joined #ruby
[11:33:17] vrturbo: Yes I will in the final code, this was just testing
[11:33:48] vrturbo: JSON.parse returns a hash I believe so I was just being lazy
[11:34:07] kgrz: has joined #ruby
[11:34:10] tristanp: has joined #ruby
[11:37:41] SilverKey: has joined #ruby
[11:38:44] SilverKey: has joined #ruby
[11:40:23] evidex: has joined #ruby
[11:40:32] gnufied: has joined #ruby
[11:40:53] terlar: has joined #ruby
[11:44:39] d0lph1n98: has joined #ruby
[11:46:32] lxsameer: has joined #ruby
[11:46:36] craigp: has joined #ruby
[11:46:37] ldnunes: has joined #ruby
[11:49:27] bruce_lee: has joined #ruby
[11:49:28] Rodya_: has joined #ruby
[11:50:21] edwinvdgraaf: has joined #ruby
[11:50:24] evidex: has joined #ruby
[11:50:53] xue: has joined #ruby
[11:54:07] Hanmac: has joined #ruby
[11:54:49] agit0: has joined #ruby
[11:56:35] haraigoshi: has joined #ruby
[11:56:50] joonty: has joined #ruby
[11:57:16] nhhc: has joined #ruby
[11:57:41] AlexRussia: has joined #ruby
[11:57:44] rodferso1: has joined #ruby
[11:59:52] jord-n: has joined #ruby
[12:00:04] bluOxigen: has joined #ruby
[12:00:15] blackmesa: has joined #ruby
[12:00:27] evidex: has joined #ruby
[12:03:59] Rodya_: has joined #ruby
[12:05:26] certainty: has joined #ruby
[12:05:35] PotatoChipz: has left #ruby: ()
[12:09:30] eljimmy: has joined #ruby
[12:12:02] k3rn31: has joined #ruby
[12:15:18] certainty: has joined #ruby
[12:16:35] shinnya: has joined #ruby
[12:17:06] bluOxigen: has joined #ruby
[12:20:04] flashpoint9: has joined #ruby
[12:20:06] tubuliferous_: has joined #ruby
[12:20:23] gagrio: has joined #ruby
[12:21:15] dcunit3d: has joined #ruby
[12:29:34] tknz: has joined #ruby
[12:31:45] bkxd: has joined #ruby
[12:33:37] bobix: has joined #ruby
[12:35:06] tristanp: has joined #ruby
[12:36:12] iamvery: apeiros: concerning the ruby_koans, i'm trying to track things down. I've got an email out to the owner of rubykoans.com https://twitter.com/iamvery/status/741644347058294786
[12:36:14] Ishido: has joined #ruby
[12:36:21] diegoviola: has joined #ruby
[12:36:37] sergey_makagon: has joined #ruby
[12:37:18] jenrzzz: has joined #ruby
[12:37:19] jgt: has joined #ruby
[12:38:47] jhass: iamvery: I have admin rights to the ruby-community github org too, so we can also move without apeiros having time :)
[12:39:34] iamvery: sure thing jhass, i just wanted to let folks know there's been some effort on the website side as well :). seems like it's pretty important to get that updated as people tend to land there from search
[12:39:52] jhass: yup I agree, thanks for your effort
[12:39:58] the_drow_: has joined #ruby
[12:40:15] p337rB: has joined #ruby
[12:40:24] xfbs: has joined #ruby
[12:41:13] jhass: we got #ruby-community as a channel too, I think if you manage to get mdoel to join here or there to discuss things that'd be awesome
[12:41:22] joonty: has joined #ruby
[12:41:26] GinoManWorks: has joined #ruby
[12:42:25] jaguarmagenta: has joined #ruby
[12:43:17] solocshaw: has joined #ruby
[12:43:18] jmignault: has joined #ruby
[12:49:49] testing: has joined #ruby
[12:50:00] jaruga___: has joined #ruby
[12:50:26] nerium: has joined #ruby
[12:51:20] ramortegui: has joined #ruby
[12:51:40] jaruga____: has joined #ruby
[12:51:57] SilverKey: has joined #ruby
[12:51:59] bluOxigen: has joined #ruby
[12:55:52] certainty: has joined #ruby
[12:57:29] shevy: has joined #ruby
[12:57:35] Guest67242: has left #ruby: ()
[12:59:25] TheBrayn: is it possible to specify additional flags like multiline for regexps with the %r{} syntax?
[13:00:02] SilverKey: has joined #ruby
[13:00:53] Bmw-01: has joined #ruby
[13:00:54] Bmw-01: http://www.dailymotion.com/video/x4fxr9j_zombie-on-a-train-prank-is-scary-do-not-watch-this-video-epic-video_fun
[13:01:16] shevy: TheBrayn have you looked at the available flags after a // yet?
[13:01:25] shevy: you mean via %r
[13:03:17] TheBrayn: %r{...}m seems to work
[13:03:33] gaussblurinc1: has joined #ruby
[13:03:51] alfiemax: has joined #ruby
[13:04:11] gaussblurinc1: does anybody know protobuf dsl extension for customization?
[13:04:11] gaussblurinc1: for example, I need custom protobufs generated files for mobile client, for external device, for server etc. I don't want to copypaste protobufs for each case.
[13:04:25] gaussblurinc1: ruby implementation, of course
[13:04:33] blackmesa: has joined #ruby
[13:05:32] roamingdog: has joined #ruby
[13:05:40] sepp2k: has joined #ruby
[13:05:41] bmurt: has joined #ruby
[13:06:47] neha-: has joined #ruby
[13:07:21] SilverKey: has joined #ruby
[13:07:37] nettoweb: has joined #ruby
[13:07:53] jancel: has joined #ruby
[13:10:49] callen92: has joined #ruby
[13:11:20] roamingdog: has joined #ruby
[13:13:23] malconis: has joined #ruby
[13:14:31] malconis: has joined #ruby
[13:15:47] moos3: has joined #ruby
[13:16:21] evidex: has joined #ruby
[13:16:32] ChiefAlexander: has joined #ruby
[13:18:11] nankyokusei: has joined #ruby
[13:22:37] rbr: has joined #ruby
[13:22:53] gagrio: has joined #ruby
[13:24:03] alfiemax: has joined #ruby
[13:24:22] theslow1: has joined #ruby
[13:26:01] gaussblurinc1: has joined #ruby
[13:26:47] giz|work: has joined #ruby
[13:27:04] SilverKey: has joined #ruby
[13:27:14] sergio_101: has joined #ruby
[13:27:55] elton: has joined #ruby
[13:28:45] ncthom91: has joined #ruby
[13:29:33] catphish: has joined #ruby
[13:30:13] moos3: has joined #ruby
[13:31:25] panpainter: has joined #ruby
[13:31:26] catphish: out of sick curiosity, what would happen if i wrote a ruby source file in UTF16, and then put \n in a string?
[13:32:38] jrafanie: has joined #ruby
[13:33:01] gregf: has joined #ruby
[13:33:13] aryaching: has joined #ruby
[13:34:14] kareeole_: has joined #ruby
[13:34:22] mrmortondk: has joined #ruby
[13:34:31] zacstewart: has joined #ruby
[13:35:34] rubyhatesme: has joined #ruby
[13:36:04] jhass: your string literals encoding would be UTF-16 too
[13:36:10] jhass: the \n is rather irrelevant to that
[13:36:28] joonty: has joined #ruby
[13:37:03] Yiota: has joined #ruby
[13:37:53] catphish: jhass: so in the source code, the \ would be a utf16 character, and the n would be a utf16 character
[13:38:41] catphish: jhass: then the interpreter would then create a UTF16 string from the string in the source code, and finally it would parse it for escape characters, what would happen to the \n
[13:39:07] catphish: assuming it was in a double quoted string
[13:39:15] jenrzzz: has joined #ruby
[13:39:43] freerobby: has joined #ruby
[13:39:54] jhass: >> ["\\n".bytees, "\\n".codepoints, "\\n".encode("UTF-16LE").bytes, "\\n".encode("UTF-16LE").codepoints]
[13:39:55] ruby[bot]: jhass: # => undefined method `bytees' for "\\n":String ...check link for more (https://eval.in/588187)
[13:40:00] jhass: eek, sorry
[13:40:04] jhass: >> ["\\n".bytes, "\\n".codepoints, "\\n".encode("UTF-16LE").bytes, "\\n".encode("UTF-16LE").codepoints]
[13:40:05] ruby[bot]: jhass: # => [[92, 110], [92, 110], [92, 0, 110, 0], [92, 110]] (https://eval.in/588188)
[13:40:07] catphish: i suppose the correct solution would be to create an ascii line break, then encode that to UTF16
[13:40:18] aegis3121: has joined #ruby
[13:40:20] jhass: catphish: the parser operates on characters, not bytes
[13:40:49] catphish: jhass: so \n always creates a line break in whatever character set the string is in?
[13:40:52] jhass: the source file is decoded into characters (codepoints) according to its encoding
[13:41:02] catphish: rather than always creating 0xA?
[13:41:25] jhass: what byte representation it has in the output is subject to the external encoding
[13:41:54] jhass: in the parser it'll aways be the codepoint 10
[13:42:28] Axsuul: has joined #ruby
[13:43:20] catphish: oh, so the parser has its own representation of codepoints, that makes more sense
[13:43:37] catphish: >>eval("\\n".encode("UTF-16LE"))
[13:43:38] ruby[bot]: catphish: # => invalid source encoding (ArgumentError) ...check link for more (https://eval.in/588190)
[13:43:39] lxsameer: has joined #ruby
[13:43:42] duckpuppy: has joined #ruby
[13:44:17] catphish: i can't test it, my ruby won't eval UTF16
[13:44:24] Mon_Ouie: has joined #ruby
[13:44:29] catphish: i actually meant eval("\"\\n\"".encode("UTF-16LE"))
[13:44:33] catphish: but it doesn't work :(
[13:45:38] jhass: use a file
[13:45:52] jhass: with the right magic header or invoked with the right commandline flags
[13:46:01] catphish: i think that answers my question anyway, \n always creates codepoint 10, which then gets represented in whichever external format is needed later
[13:46:21] catphish: honestly, the reason i asked was that i couldn't be bothered to make the file
[13:47:00] gaussblurinc1: has joined #ruby
[13:48:32] roamingdog: has joined #ruby
[13:48:34] rubyhatesme: you guys have any experience with the mandrillapp?
[13:48:44] Yiota: has joined #ruby
[13:48:49] jancel: has joined #ruby
[13:48:58] rubyhatesme: and know that, if i run it in test mode, i can still send normal emails using their normal API key
[13:49:17] cdg: has joined #ruby
[13:49:51] karmatr0n: has joined #ruby
[13:49:51] rubyhatesme: as in, if i turn on testmode, does that stop the mandrill app from working?
[13:49:53] catphish: is this ruby related?
[13:49:57] rubyhatesme: i dont think so
[13:50:01] rubyhatesme: i just realised, sorry
[13:50:10] rubyhatesme: thought i was in web
[13:50:15] catphish: although its probably saner than my question :)
[13:51:51] mustmodify: has joined #ruby
[13:52:27] jespada_: has joined #ruby
[13:52:42] mustmodify: So it looks like if I ask Ruby stdlib logger to rotate daily or weekly, if there's already a file there, it'll assume that file is from the previous day/week/month. Is there a way to have it check the file creation date?
[13:52:54] mustmodify: I didn't see it in the docs. Just thought someone might have a suggestion.
[13:53:02] mustmodify: I guess I could just fork it.
[13:53:07] axisys: has joined #ruby
[13:55:11] roamingdog: has joined #ruby
[13:55:17] aryaching: has joined #ruby
[13:58:50] neha-: hey, what's the difference between Dir.glob() and and Dir[]
[13:58:58] neha-: are they equivalent?
[13:59:23] Mon_Ouie: You can't pass a block to Dir[]
[14:00:36] Infra-Red: has joined #ruby
[14:04:58] jhass: also not sure if Dir.glob takes multiple arguments?
[14:05:05] alfiemax: has joined #ruby
[14:07:59] Mon_Ouie: Well it has a second argument, but it's not a second pattern
[14:08:07] Yiota: has joined #ruby
[14:08:42] solocshaw1: has joined #ruby
[14:09:04] Akuma: has joined #ruby
[14:11:41] jhack: has joined #ruby
[14:11:58] yokel: has joined #ruby
[14:12:20] jgt: has joined #ruby
[14:12:59] the_drow_: has joined #ruby
[14:16:59] jaruga___: has joined #ruby
[14:17:01] JJM: has joined #ruby
[14:17:03] agent_white: has joined #ruby
[14:18:21] Gasher: has joined #ruby
[14:20:29] solocshaw: has joined #ruby
[14:21:11] davedev24: has joined #ruby
[14:21:47] doscta: has joined #ruby
[14:22:02] chipotle: has joined #ruby
[14:23:14] dcunit3d: has joined #ruby
[14:23:18] SilverKey: has joined #ruby
[14:23:24] zacstewart: has joined #ruby
[14:26:59] frem_: has joined #ruby
[14:27:03] mustmodify: Is there a channel I can go to to ask why I'm seeing this message from IRC? "*** #ruby-lang Cannot join channel (+i) - you must be invited"
[14:27:30] jhass: mustmodify: simply stop trying to join #ruby-lang
[14:27:46] jhass: mustmodify: you get it because it redirects here but you're already here
[14:27:58] workmad3: mustmodify: #ruby and #ruby-lang were merged a while back, and #ruby-lang kicks you over to us here
[14:28:26] mustmodify: Ah, so it's a 301 message?
[14:28:33] mustmodify: (metaphorically)
[14:29:03] Bish: has joined #ruby
[14:29:10] jhass: kinda we set it to invite only and there's +f which redirects people who aren't allowed to join to another channel
[14:29:19] jhass: recommended by freenode way to do redirects
[14:29:19] babblebre: has joined #ruby
[14:29:26] mustmodify: ok, interesting.
[14:30:02] jhass: there's no direct #a is now #b in IRC speak
[14:30:03] mustmodify: So that's helpful except it doesn't explain why I see it when I'm already here. :) But lately my client has done some goofy things.
[14:30:24] jhass: mustmodify: likely because you have your client configured to try to join it
[14:30:48] jhass: and it gets to do that after it already joined #ruby
[14:30:55] workmad3: mustmodify: if you're like me, you probably have an old autojoin from prior to the merge that joins #ruby first, then tries to join #ruby-lang
[14:30:57] mustmodify: jhass: What I meant is that I'll be here for like 5 minutes then I see it.
[14:31:16] fedruantine: has joined #ruby
[14:31:41] mustmodify: I'll remove my #ruby entry and re-add. We'll see how it goes.
[14:32:24] blandflakes: has joined #ruby
[14:33:19] matp: has joined #ruby
[14:33:38] k3rn31: has joined #ruby
[14:33:58] jespada_: has joined #ruby
[14:34:02] Bish: has joined #ruby
[14:35:39] konsolebox: has joined #ruby
[14:37:01] ncthom91: has joined #ruby
[14:37:35] konsolebox: has joined #ruby
[14:38:39] mattwashere: has joined #ruby
[14:38:57] panpainter: has joined #ruby
[14:40:19] JJM_: has joined #ruby
[14:40:37] Yiota: has joined #ruby
[14:43:21] ekinmur: has joined #ruby
[14:43:34] tmtwd: has joined #ruby
[14:43:38] mattwashere: has joined #ruby
[14:44:29] elton: has joined #ruby
[14:47:00] kareeoleez: has joined #ruby
[14:47:12] palms: has joined #ruby
[14:47:33] mostlybadfly: has joined #ruby
[14:47:40] croberts: has joined #ruby
[14:49:23] alfiemax: has joined #ruby
[14:51:04] mistermocha: has joined #ruby
[14:53:04] tAn: has joined #ruby
[14:55:15] aryaching: has joined #ruby
[14:56:16] minimalism: has joined #ruby
[14:59:35] jrafanie_: has joined #ruby
[15:00:01] Gasher: has joined #ruby
[15:01:37] cschneid: has joined #ruby
[15:01:55] jancel: has joined #ruby
[15:03:03] croberts: with the openssl gem is it possible to do something similar to openssl verify -CAfile <crt>
[15:04:13] skade: has joined #ruby
[15:04:56] jhass: croberts: gem? you mean stdlib?
[15:05:08] kmooney: has joined #ruby
[15:05:18] aegis3121: has joined #ruby
[15:05:28] gaussblurinc1: has joined #ruby
[15:05:56] jhass: croberts: http://devdocs.io/ruby~2.3/openssl/x509/certificate#method-i-verify
[15:06:58] jhass: I don't see API to take a whole store to verify against though
[15:07:07] hutch34: has joined #ruby
[15:07:07] chouhoulis: has joined #ruby
[15:07:28] catphish: has left #ruby: ("Leaving")
[15:08:26] roamingdog: has joined #ruby
[15:11:29] swills: has joined #ruby
[15:17:02] prestorium: has joined #ruby
[15:19:02] nankyokusei: has joined #ruby
[15:19:09] mistermocha: has joined #ruby
[15:19:17] davedev24: has joined #ruby
[15:21:09] yorickpeterse: I suspect the answer will be "no", but is there a way in the C API to check if a pointer is a valid VALUE?
[15:21:42] andromedian: has joined #ruby
[15:23:12] pwnd_nsfw: has joined #ruby
[15:23:14] snath: has joined #ruby
[15:25:02] meyercm: has joined #ruby
[15:25:17] meyercm: does anyone know why net/telnet is missing from 2.3.1?
[15:25:51] bjmllr: meyercm: moved to net-telnet gem
[15:26:31] chipotle: has joined #ruby
[15:26:51] alexherbo2: has joined #ruby
[15:26:52] meyercm: Huh. There's a broken link in the stdlib docs... and I can't find any mention of the change
[15:26:56] platzhirsch: has joined #ruby
[15:26:57] araujo: has joined #ruby
[15:26:58] araujo: has joined #ruby
[15:26:58] yorickpeterse: I noticed MRI has is_pointer_to_heap() but sadly it's not exported publicly :/
[15:27:04] ChiefAlexander_: has joined #ruby
[15:27:25] agit0: has joined #ruby
[15:27:28] chopin: has joined #ruby
[15:27:33] meyercm: bjmllr: thanks for the help
[15:27:56] Hanmac: yorickpeterse: you can check its inner Type or something like that, like if its a T_DATA or T_TYPED_DATA object (or something like that)
[15:28:29] Hanmac: yorickpeterse: depending what else do you might get for "not valid" VALUE?
[15:28:53] LoneHermit: has joined #ruby
[15:30:19] johnmilton: has joined #ruby
[15:30:39] vuoto: has joined #ruby
[15:31:02] chouhoulis: has joined #ruby
[15:31:07] madgen: has joined #ruby
[15:32:49] safetypin: has joined #ruby
[15:33:04] iamvery_: has joined #ruby
[15:33:45] andromedian: what does the ActiveRecord::Base double :: refers to?
[15:34:21] ghr: andromedian module namespace
[15:34:41] andromedian: and does the double colon has a special name?
[15:34:44] skweek: has joined #ruby
[15:35:54] ghr: constant lookup operator
[15:36:14] ghr: https://rubymonk.com/learning/books/1-ruby-primer/chapters/35-modules/lessons/80-modules-as-namespaces looks like a good guide
[15:36:31] andromedian: Thanks a lot ghr!
[15:36:38] ghr: no problem :)
[15:36:48] andromedian: I've seen this operator used in other languages as well does it have the same logic more or less?
[15:37:34] andromedian: anyway that's off topic :) thanks again
[15:39:14] hobodave: has joined #ruby
[15:40:04] jhass: andromedian: "other languages" is too generic to say yes or no
[15:40:17] kareeoleez: has joined #ruby
[15:40:46] jenrzzz: has joined #ruby
[15:40:46] jenrzzz: has joined #ruby
[15:42:21] SilverKey: has joined #ruby
[15:43:05] dionysus69: has joined #ruby
[15:43:11] kareeoleez: has joined #ruby
[15:43:56] diegoaguilar: has joined #ruby
[15:44:08] rkazak: has joined #ruby
[15:44:26] gaussblurinc1: has joined #ruby
[15:44:57] madgen: has joined #ruby
[15:45:05] elton: has joined #ruby
[15:45:48] Axsuul: has joined #ruby
[15:47:45] vuoto: has joined #ruby
[15:48:00] johnmilton: has joined #ruby
[15:49:16] agit0: has joined #ruby
[15:49:18] pawnbox: has joined #ruby
[15:49:31] tjbiddle: has joined #ruby
[15:50:35] caseyd: has joined #ruby
[15:51:21] Hanmac: yorickpeterse: i sometimes do a NULL value inside a T_DATA object when i can't create an object in a 2-step-constructor like ruby normally does
[15:51:34] pawnbox: has joined #ruby
[15:54:31] wrkrcoop: has joined #ruby
[15:54:56] certainty: has joined #ruby
[15:55:03] wrkrcoop: i have this method
[15:55:16] wrkrcoop: and im trying to check if input is a hash, if not i log something and return
[15:55:30] wrkrcoop: but when i test it by passing in a string it returns nil …
[15:55:40] ruby[bot]: We can't help you without your code, please post it to https://gist.github.com
[15:56:04] tjbiddle_: has joined #ruby
[15:56:52] p337rB_: has joined #ruby
[15:57:21] tAn: has joined #ruby
[15:57:51] caseyd: I have a bunch of old windows ce handheld computers and I'm wanting to write a telnet application that would allow them to connect and go through the steps. Would you recommend ruby to be the language behind it? Is there a tutorial to get something like that started?
[15:58:34] wrkrcoop: https://gist.github.com/ellismarte/f6f2046a6ec1352b6bfc31d2075f9df6
[15:58:42] pawnbox: has joined #ruby
[15:59:00] lxsameer: has joined #ruby
[15:59:03] wrkrcoop: i’m trying to stub out logger so it returns a value and then i can see thats what i got
[15:59:12] wrkrcoop: but when i test this it returns nil
[15:59:25] RobertBirnie: has joined #ruby
[15:59:26] toretore: what returns nil?
[15:59:55] toretore: context and code, context and code, context and code
[16:00:00] jhass: caseyd: uh, does ruby even run on windows ce?
[16:00:08] jhass: did you check that?
[16:00:58] caseyd: jhass, Well no, it wouldn't run on the ce device but would run on linux or whatever and supply the telnet server.
[16:00:59] amclain: has joined #ruby
[16:01:33] toretore: wrkrcoop: in order of preference: 1) use duck typing, as in obj.respond_to?(:message), 2) use obj.is_a?(Klass) 3) don't use obj.class == Klass
[16:01:40] hobodave_: has joined #ruby
[16:01:48] toretore: 0) don't rely on any of these techniques
[16:02:03] jhass: caseyd: oh, "would allow to connect to them" not "allow them to connect"
[16:02:13] Tref: has joined #ruby
[16:02:23] wrkrcoop: toretore: but how do i test this
[16:02:36] toretore: wrkrcoop: context and code, context and code, context and code
[16:02:57] jhass: caseyd: but yeah why not, https://github.com/ruby/net-telnet would be your goto library to get started I guess
[16:02:59] caseyd: I need to search for my problem in the late 80s. I think I would get better results.
[16:03:00] toretore: i have no idea what "this" is because i don't know the context and i don't see the code
[16:03:35] caseyd: jhass, thanks !
[16:04:43] toretore: wrkrcoop: and if you are asking because you're wondering about the best approach to a problem, don't ask specific questions about code you're trying to write; explain the problem in broad terms
[16:05:06] hobodave: has joined #ruby
[16:05:42] jhass: wrkrcoop: ^ said, your method will return nil for each and every input
[16:05:48] jhass: all your return values are nil
[16:06:09] wrkrcoop: jhass: but why isn’t it returning the logger method since i’m stubbing it out?
[16:06:19] wrkrcoop: to just be a string “this is not a hash"
[16:06:36] jhass: all your return values are nil
[16:06:46] wrkrcoop: jhass: because im calling return?
[16:06:47] GoldenPenguin: has joined #ruby
[16:06:54] GoldenPenguin: has left #ruby: ()
[16:06:55] jhass: all your return values are nil
[16:07:00] wrkrcoop: jhass: wtf does that mean
[16:07:04] jhass: it means that
[16:07:06] jhass: all your return values are nil
[16:07:11] toretore: it means all your return values are nil
[16:07:23] wrkrcoop: oh now i get it all my return values are nil great
[16:07:26] wrkrcoop: makes sense
[16:07:34] jrafanie: has joined #ruby
[16:07:38] toretore: wrkrcoop: do you understand how ruby expressions work?
[16:07:39] wrkrcoop: i didnt get it the first time but the third time just made sense
[16:09:00] danostrowski: has joined #ruby
[16:10:02] norc-2: I'm beginning to not like ensure being able to execute code after an explicit return..
[16:10:06] norc-2: It feels clunky.
[16:10:10] troulouliou_div2: has joined #ruby
[16:10:35] agit0: has joined #ruby
[16:10:51] norc-2: If Ox0dea was here we could ponder about some hack how to dodge an ensure block.
[16:13:11] kawb: has joined #ruby
[16:13:21] toretore: norc__: how is it different from an implicit return?
[16:14:19] norc-2: toretore, lambda {begin; return 1; ensure; puts foo; end}.call()
[16:14:29] norc-2: toretore, my instinct tells me that this should not print anything.
[16:14:44] toretore: mine is the opposite
[16:14:51] toretore: ensure should run no matter what
[16:15:34] norc-2: toretore, well ensure is designed to run code when you have uncaught exceptions.
[16:15:52] Kus: has joined #ruby
[16:16:08] norc-2: Im not quite sure whether "run something even if you return early" is the same.
[16:16:43] toretore: ensure is designed to run no matter what happens
[16:16:51] toretore: not just if there's an exception
[16:16:54] kawb: Ensure can also run at the end of a block right?
[16:17:30] toretore: and imo there is no difference between "return early" and "return implicitly"
[16:17:32] norc-2: toretore, can you back that up with some code that reflects this particular intention?
[16:17:48] toretore: ensure that fd is closed
[16:18:33] norc-2: toretore, what does that have to do with returns?
[16:19:19] adaedra: You could return in the middle of the method and still want to clean up your file.
[16:19:21] tao_: has joined #ruby
[16:19:35] toretore: norc__: File.open(...){ return something; } #this should close the fd
[16:19:39] pilne: has joined #ruby
[16:19:46] jhass: norc__: def foo; File.open(FOO_PATH) do |io| return true if io.gets == STUFF; end; end;
[16:20:16] norc-2: Oh. Returns from blocks.
[16:20:17] kawb: norc, did you try the code you posted?
[16:20:30] jhass: norc__: likewise it should close the fd if break is used in the block
[16:20:38] jhass: norc__: or event Kernel#exit
[16:20:58] jhass: norc__: https://github.com/crystal-lang/crystal/issues/1935 has some more perspective especially on the last point
[16:21:13] toretore: i would find it illogical if my ensure didn't run because i put an explicit return in
[16:21:15] al2o3-cr: has joined #ruby
[16:21:18] norc-2: That sounds like me repeatedly SIGBUSing ruby with open files might not be a smart thing jhass..
[16:21:51] jhass: well Linux is fairly smart about it these days when a process vanishes
[16:22:03] jhass: but it doesn't make the process a "good citizen"
[16:22:11] norc-2: jhass, Im not that far yet to have processes in my kernel, so I wouldn't know much about processes.
[16:22:15] chipotle: has joined #ruby
[16:22:25] norc-2: (But paging I do have!)
[16:22:47] jhass: I don't need to write a kernel to know that :P
[16:23:07] norc-2: jhass, I just never had the need to get in touch with all these things.
[16:23:16] norc-2: Until that I'm forced to now.
[16:24:12] toretore: god i hate malformed data
[16:24:26] Xentil: has joined #ruby
[16:25:16] dcunit3d: has joined #ruby
[16:25:20] tildes: has joined #ruby
[16:25:39] jancel: has joined #ruby
[16:26:16] jancel: has joined #ruby
[16:27:44] jgw: has joined #ruby
[16:28:38] fedruantine: has joined #ruby
[16:29:41] mistermocha: has joined #ruby
[16:29:54] wrkrcoop: anyone know why this is returning nil and not the expected response
[16:29:55] wrkrcoop: https://gist.github.com/ellismarte/f6f2046a6ec1352b6bfc31d2075f9df6#file-spec-rb-L6
[16:30:51] Eiam_: has joined #ruby
[16:30:59] jancel: has joined #ruby
[16:31:01] tubuliferous_: has joined #ruby
[16:31:34] mistermocha: has joined #ruby
[16:32:29] wrkrcoop: has joined #ruby
[16:33:36] yanping: has joined #ruby
[16:33:54] moeabdol: has joined #ruby
[16:35:36] SCHAAP137: has joined #ruby
[16:37:54] mustmodify: has left #ruby: ()
[16:38:00] pietr0: has joined #ruby
[16:43:21] kavanagh: has joined #ruby
[16:43:33] bluOxigen: has joined #ruby
[16:46:16] anisha: has joined #ruby
[16:47:48] dcluna: has joined #ruby
[16:48:09] nankyokusei: has joined #ruby
[16:49:49] chipotle: has joined #ruby
[16:51:00] nankyokusei: has joined #ruby
[16:51:59] [Butch]: has joined #ruby
[16:52:11] chipotle: has joined #ruby
[16:52:14] wrkrcoop: has joined #ruby
[16:53:29] wrkrcoop: anyone know why this doesn’t return the expected value https://gist.github.com/ellismarte/f6f2046a6ec1352b6bfc31d2075f9df6#file-spec-rb-L6
[16:54:08] jhass: wrkrcoop: # more code if api_request is a hash
[16:54:14] ruby[bot]: We can't help you without your code, please post it to https://gist.github.com
[16:54:26] freerobby: has joined #ruby
[16:54:36] wrkrcoop: jhass but its not important right? because its going to hit that block
[16:54:40] wrkrcoop: im passing ina string
[16:55:08] jhass: https://gist.github.com/ellismarte/f6f2046a6ec1352b6bfc31d2075f9df6#file-faaa-rb-L4
[16:55:12] jhass: you return nil
[16:56:21] wrkrcoop: fuck so maybe i can stub out return … i cant just say i expect nil because i have other blocks that test similar things
[16:56:28] Hanmac: also ".class != Hash" is a bad way to check imo, use "unless obj.is_a?(Klass)"
[16:56:49] wrkrcoop: hanmac: why is it a bad way to check if it works?
[16:57:07] whathappens: has joined #ruby
[16:57:35] lightt: has joined #ruby
[16:57:37] jancel: has joined #ruby
[16:58:49] Hanmac: wrkrcoop: because you might have an object that does derivate from Hash but is not a Hash itself
[16:59:33] vuoto_: has joined #ruby
[17:00:26] marr: has joined #ruby
[17:00:47] SilverKey: has joined #ruby
[17:01:18] chipotle: has joined #ruby
[17:01:57] vuoto_: has joined #ruby
[17:02:08] jokke: i'm trying to include a private gem from our git repo to another private gem. so i added it as a dep in the Gemfile after the gemspec directive. I get the error ArgumentError: string contains null byte. Not sure what to make of it...
[17:02:45] gizmore: has joined #ruby
[17:04:05] mattwashere: has joined #ruby
[17:04:34] mdw: has joined #ruby
[17:04:58] nankyoku_: has joined #ruby
[17:05:16] aegis3121: has joined #ruby
[17:05:52] Infra-Red: has joined #ruby
[17:07:09] flashpoint9: has joined #ruby
[17:07:27] polishdub: has joined #ruby
[17:07:42] lxsameer: has joined #ruby
[17:10:23] evidex: has joined #ruby
[17:10:56] chopin_: has joined #ruby
[17:11:10] neha-: has joined #ruby
[17:11:20] firstdayonthejob: has joined #ruby
[17:12:55] spider-mario: has joined #ruby
[17:15:44] ramfjord: has joined #ruby
[17:17:21] Mon_Ouie: has joined #ruby
[17:17:34] TomyLobo: has joined #ruby
[17:19:47] madgen_: has joined #ruby
[17:21:34] ixti: has joined #ruby
[17:23:36] constantinexvi: has joined #ruby
[17:25:12] Dimik: has joined #ruby
[17:25:26] tAn: has joined #ruby
[17:26:19] vuoto: has joined #ruby
[17:26:41] danostrowski: has joined #ruby
[17:26:50] diegoviola: has joined #ruby
[17:27:20] vuoto: has joined #ruby
[17:30:28] jhass: Don't add a 0 byte to your string!
[17:30:36] jhass: use vim or so, good at displaying these
[17:31:26] jhass: wrkrcoop: toretore already explained you why it's a bad thing
[17:31:49] jhass: wrkrcoop: anyway, learn about expect(foo).to receive(bar).with(baz)
[17:31:54] jackjackdripper: has joined #ruby
[17:34:37] aryaching: has joined #ruby
[17:36:29] freerobby: has joined #ruby
[17:36:32] mattwashere: has joined #ruby
[17:37:02] tildes: has joined #ruby
[17:37:10] theery: has joined #ruby
[17:38:01] romistrub: has joined #ruby
[17:38:16] romistrub: so I'm more than a bit confused about active_record.
[17:38:40] chouhoul_: has joined #ruby
[17:38:45] agit0: has joined #ruby
[17:39:23] romistrub: Shouldn't the database and table creation be a one-time thing, whereas CRUD operations occur separately on an as-needed basis?
[17:39:26] neha-: romistrub: you should ask in #rubyonrails
[17:39:35] romistrub: neha_: okay
[17:40:00] chouhoul_: has joined #ruby
[17:40:09] romistrub: the main reason I came here was because I'm not using rails :P
[17:40:15] romistrub: I'm just using activerecord on its own
[17:41:26] gnufied: has joined #ruby
[17:41:55] shevy: but only railsers use active* stack!
[17:42:55] jenrzzz: has joined #ruby
[17:42:55] jenrzzz: has joined #ruby
[17:45:54] elton: has joined #ruby
[17:50:23] replay: has joined #ruby
[17:50:54] edwinvdgraaf: has joined #ruby
[17:51:10] craigp: has joined #ruby
[17:52:50] flashpoint9: has joined #ruby
[17:53:33] wrkrcoop: the last thing that is in my method is where i join threads
[17:53:34] wrkrcoop: https://gist.github.com/ellismarte/f6f2046a6ec1352b6bfc31d2075f9df6
[17:53:43] wrkrcoop: how would i test this?
[17:53:47] alxgsv: has joined #ruby
[17:53:59] haraigoshi: has joined #ruby
[17:54:04] yosafbridge: has joined #ruby
[17:56:03] tildes: has joined #ruby
[17:57:05] certainty: has joined #ruby
[17:57:12] ncthom91: has joined #ruby
[17:57:39] Asher: has joined #ruby
[17:59:22] flopsec: has joined #ruby
[17:59:45] kawb: has joined #ruby
[17:59:56] gizmore: has joined #ruby
[18:00:20] tao_: has joined #ruby
[18:00:25] blaxter: has joined #ruby
[18:01:14] flashpoint9: has joined #ruby
[18:01:46] blackmesa: has joined #ruby
[18:02:54] tristanp: has joined #ruby
[18:02:59] aryaching: has joined #ruby
[18:04:39] choke: has joined #ruby
[18:04:47] agit0: has joined #ruby
[18:05:48] jancel: has joined #ruby
[18:06:05] ramfjord: has joined #ruby
[18:06:09] banister: has joined #ruby
[18:06:15] k3rn31: has joined #ruby
[18:06:30] tAn: has joined #ruby
[18:08:03] Antiarc: has joined #ruby
[18:08:11] Rick_Deckard: has joined #ruby
[18:09:00] rcvalle: has joined #ruby
[18:09:54] bluOxigen: has joined #ruby
[18:15:58] whathappens: has joined #ruby
[18:16:39] tvw: has joined #ruby
[18:16:41] whathapp_: has joined #ruby
[18:16:48] DrCode: has joined #ruby
[18:18:17] whathapp_: has joined #ruby
[18:20:58] dunpeal: has joined #ruby
[18:21:22] dunpeal: Hi. I'm in an interactive IRB session, and I have a Ruby file I'd like to eval. What's the best way?
[18:21:32] zel: has joined #ruby
[18:23:12] tAn: has joined #ruby
[18:24:36] wrkrcoop: try require_relative
[18:24:52] gaussblurinc1: has joined #ruby
[18:25:52] arlek: has joined #ruby
[18:26:56] dcunit3d: has joined #ruby
[18:27:11] choke: has joined #ruby
[18:27:34] mattwashere: has joined #ruby
[18:27:52] mattwashere: has joined #ruby
[18:27:54] ule: has joined #ruby
[18:28:26] ule: has joined #ruby
[18:29:03] dunpeal: wrkrcoop: thanks
[18:29:07] d5sx43: has joined #ruby
[18:29:11] wrkrcoop: dunpeal: did it work?
[18:29:24] stevenx: has joined #ruby
[18:29:30] stevenx: hello gang.
[18:30:22] sandstrom: has joined #ruby
[18:32:09] tristanp: has joined #ruby
[18:32:34] moeabdol: has joined #ruby
[18:32:46] Amnez777: has joined #ruby
[18:34:23] shevy: hello stevenx
[18:34:43] havenwood: stevenx: hi
[18:36:24] whathappens: has joined #ruby
[18:37:03] whathapp_: has joined #ruby
[18:37:10] qasaur: has joined #ruby
[18:37:23] d5sx43: has joined #ruby
[18:38:03] chouhoulis: has joined #ruby
[18:38:04] yqt: has joined #ruby
[18:38:22] staticfox: has joined #ruby
[18:38:47] yqt: has joined #ruby
[18:40:29] codecop: has joined #ruby
[18:40:51] alfiemax: has joined #ruby
[18:42:15] SilverKey: has joined #ruby
[18:42:43] multi_io: has joined #ruby
[18:42:53] dcunit3d: has joined #ruby
[18:42:56] fedruantine: has joined #ruby
[18:44:00] jenrzzz: has joined #ruby
[18:45:16] last_staff: has joined #ruby
[18:45:21] Satyajit: has joined #ruby
[18:45:23] mesamoo: has joined #ruby
[18:45:44] terminalrecluse: has joined #ruby
[18:47:15] yfeldblum: has joined #ruby
[18:47:48] chouhoulis: has joined #ruby
[18:49:37] lxsameer: has joined #ruby
[18:55:48] shevy: one day I must find a better way than to dissect old projects, re-put them up together step by step when doing a rewrite... it is so slow and tedious even if it is not extremely (mentally) challenging / difficult
[18:55:51] nankyokusei: has joined #ruby
[18:57:06] matp: has joined #ruby
[18:58:34] danostrowski: has joined #ruby
[18:58:44] ecnalyr: has joined #ruby
[18:59:04] flashpoint9: has joined #ruby
[18:59:57] matp: has joined #ruby
[19:00:09] statelesscode: has joined #ruby
[19:00:38] jancel: has joined #ruby
[19:00:59] mesamoo: has joined #ruby
[19:03:50] tAn: has joined #ruby
[19:05:29] tAn: has joined #ruby
[19:05:57] Coldblackice: has joined #ruby
[19:06:15] tristanp: has joined #ruby
[19:06:22] ruby-lang804: has joined #ruby
[19:07:31] zeroDi: has joined #ruby
[19:07:54] kirun: has joined #ruby
[19:08:06] JesseH2: has joined #ruby
[19:10:33] Axsuul: has joined #ruby
[19:11:28] diegoviola: has joined #ruby
[19:12:36] aryaching: has joined #ruby
[19:13:28] elifoster: has joined #ruby
[19:15:38] snowy: has joined #ruby
[19:16:34] elton: has joined #ruby
[19:17:19] joelwallis: has joined #ruby
[19:18:46] bluOxigen: has joined #ruby
[19:18:54] jenrzzz: has joined #ruby
[19:18:54] jenrzzz: has joined #ruby
[19:19:28] alfiemax: has joined #ruby
[19:21:26] symm-: has joined #ruby
[19:21:27] JakFrist: has joined #ruby
[19:23:36] neha-: has joined #ruby
[19:24:59] Guest85030: has joined #ruby
[19:28:26] skade: has joined #ruby
[19:31:23] CJKinni: has joined #ruby
[19:31:52] jgt: has joined #ruby
[19:33:06] moeabdol: has joined #ruby
[19:35:01] karmatr0n: has joined #ruby
[19:36:28] ekinmur: has joined #ruby
[19:36:44] vuoto: has joined #ruby
[19:41:00] platzhirsch: has joined #ruby
[19:43:02] jenrzzz: has joined #ruby
[19:43:02] jenrzzz: has joined #ruby
[19:43:05] k3rn31: has joined #ruby
[19:43:36] kareeoleez: has joined #ruby
[19:48:07] haraigoshi: has joined #ruby
[19:48:36] whathappens: has joined #ruby
[19:48:50] vF3hNGxc47h8: has joined #ruby
[19:51:21] safetypin: has joined #ruby
[19:55:00] highbass: has joined #ruby
[19:55:09] DanyC: has joined #ruby
[19:56:09] highbass: can anyone point me in the direction of daemonizing a ruby application? ... i haven't had troubles iwth sidekiq and puma since they have internal mechanisms buillt in for daomonizing ... but just plain ruby seems more challenging
[19:56:17] DanyC: has left #ruby: ()
[19:56:19] highbass: im a ruby noob so mind my ignorance
[19:56:55] aswen: has joined #ruby
[19:56:56] danostrowski: has joined #ruby
[19:58:22] nankyokusei: has joined #ruby
[19:58:45] jancel: has joined #ruby
[19:59:15] FooMunki: has joined #ruby
[19:59:31] riceandbeans: has joined #ruby
[19:59:41] riceandbeans: is it perfectly plausible to have an array of a new struct type?
[20:00:08] FooMunki: has joined #ruby
[20:00:10] tAn: has joined #ruby
[20:00:11] riceandbeans: I mean, foo = Struct.new ( .... )
[20:00:26] riceandbeans: bar = foo.new
[20:00:58] riceandbeans: baz.push(bar)
[20:01:04] Oclair_: has joined #ruby
[20:02:23] norc-2: riceandbeans, whether it is plausible would depend on your use case.
[20:02:32] wrkrcoop: has joined #ruby
[20:02:46] emilkarl: has joined #ruby
[20:02:50] norc-2: highbass, there is 2 libraries around for this. Give me a moment
[20:02:52] safetypin: has joined #ruby
[20:03:20] norc-2: highbass, first there is the obvious candidate daemons
[20:03:38] highbass: ok i was just reading about that one
[20:03:51] norc-2: highbass, there was another one much more high level, cant find it.
[20:04:01] aberen: has joined #ruby
[20:05:08] norc-2: highbass, anyway. It does not seem to be actively developed though.
[20:05:13] jackjackdripper: has joined #ruby
[20:06:32] highbass: norc__: thank you! i am looking into daemon
[20:06:58] choke: has joined #ruby
[20:07:29] nettoweb: has joined #ruby
[20:07:52] toretore: highbass: why do you want to daemonize?
[20:07:54] norc-2: highbass, https://www.ruby-toolbox.com -- this can be a useful tool when you are looking for various options for different tasks by the way.
[20:07:56] AcidCrash: has joined #ruby
[20:07:59] rkazak: has joined #ruby
[20:08:05] norc-2: Take the top rated gems with a grain of salt, use it just to explore.
[20:09:02] gregf: has joined #ruby
[20:09:53] blackgoat: has joined #ruby
[20:09:55] tAn: has joined #ruby
[20:10:14] roamingdog: has joined #ruby
[20:12:11] ckrailo: has joined #ruby
[20:12:14] jmcc___________: has joined #ruby
[20:12:26] Madplatypus: has joined #ruby
[20:14:13] ramfjord: has joined #ruby
[20:14:21] emilkarl: has joined #ruby
[20:16:03] safetypin: has joined #ruby
[20:17:27] coyo: has joined #ruby
[20:17:27] coyo: has joined #ruby
[20:17:53] nankyokusei: has joined #ruby
[20:18:00] jhass: highbass: that said, http://www.mikeperham.com/2014/09/22/dont-daemonize-your-daemons/
[20:18:58] ChiefAlexander: has joined #ruby
[20:19:10] jhass: riceandbeans: ... but I would tend to no, it creates a Class which is quite expensive, so unless it's long-lived...
[20:19:48] whathappens: has joined #ruby
[20:22:38] jancel: has joined #ruby
[20:22:54] tAn: has joined #ruby
[20:24:51] dcunit3d: has joined #ruby
[20:25:41] ekinmur: has joined #ruby
[20:26:13] bmurt: has joined #ruby
[20:29:10] duncannz: has joined #ruby
[20:29:57] emilkarl: has joined #ruby
[20:30:28] highbass: norc__: i want to daemonize because using app in ec2 with autoscaling
[20:30:38] highbass: and like a easy way for ti to be run up and down
[20:30:45] highbass: i use monit to monitor the processes
[20:31:05] highbass: i agree with that artcle
[20:31:07] highbass: read it earlier
[20:31:31] Arney: has joined #ruby
[20:31:38] Arney: ACTION wishes there was a good GUI editor
[20:31:55] highbass: i was thinking of going that way next
[20:38:40] gizless: has joined #ruby
[20:39:26] skade: has joined #ruby
[20:40:14] Rodya_: has joined #ruby
[20:41:00] safetypin: has joined #ruby
[20:46:17] safetypin: has joined #ruby
[20:46:46] wrkrcoop: has joined #ruby
[20:48:16] workmad3: has joined #ruby
[20:48:24] JakFrist: has joined #ruby
[20:48:51] nofxx: has joined #ruby
[20:49:42] danostrowski: has joined #ruby
[20:50:44] vqrs: has joined #ruby
[20:50:52] aswen: has joined #ruby
[20:52:05] jhack: has joined #ruby
[20:52:05] codeurge: has joined #ruby
[20:54:12] gizmore: has joined #ruby
[20:55:13] gizmore|2: has joined #ruby
[20:55:56] mattwashere: has joined #ruby
[20:55:58] emilkarl: has joined #ruby
[20:57:11] moeabdol: has joined #ruby
[20:57:42] gizless: has joined #ruby
[20:59:18] joonty: has joined #ruby
[21:01:01] elifoster: has joined #ruby
[21:01:02] that2: has joined #ruby
[21:01:39] that2: has left #ruby: ()
[21:02:21] jancel: has joined #ruby
[21:04:34] pilne: i understand that a good gem can be older, and not require updates to work properly, what is a good way to tell "at a glance" if an older gem is ok though?
[21:06:04] aberen: has joined #ruby
[21:06:19] hutch34: has joined #ruby
[21:07:17] SilverKey: has joined #ruby
[21:07:41] wrkrcoop: how can i stub objects without knowing the class they belong to?
[21:07:57] kawb: has joined #ruby
[21:08:05] jhass: just do it!
[21:08:14] dcunit3d: has joined #ruby
[21:08:17] jhass: .any_instance is evil anyway
[21:08:39] wrkrcoop: :my_method.stub() ?
[21:10:29] CausaMortis: has joined #ruby
[21:10:45] gse: has joined #ruby
[21:11:58] gusrub: has joined #ruby
[21:12:18] riceandbeans: jhass: let's say i wanted to do something like this
[21:12:50] riceandbeans: User = Struct.new(:username,:password,:homedir,:shell)
[21:13:12] riceandbeans: file = '/etc/passwd'
[21:13:23] riceandbeans: File.open(file) do |line|
[21:13:43] lxsameer: has joined #ruby
[21:13:44] ruby[bot]: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[21:13:52] roamingdog: has joined #ruby
[21:13:54] riceandbeans: I don't know, some magic in there, with foo = User.new
[21:13:55] pawnbox: has joined #ruby
[21:14:05] JesseH2: has joined #ruby
[21:14:10] riceandbeans: and having an array like users and doing users.push(foo)
[21:14:22] riceandbeans: and then consuming users somewhere else
[21:14:30] gse: Hi all. I've noticed different behaviour between OS/X and Linux when working with 'tempfile' (which supports all the 'file' methods). If you open a 'tempfile' and, say, call out to a system editor so you can edit the file, and then rewind/read the file afterwards, on Linux this works fine. On OS/X, changes made to the file are not seen. Any ideas?
[21:15:00] allcentury: has joined #ruby
[21:16:34] jhass: riceandbeans: perfectly fine
[21:16:46] jhass: riceandbeans: not different from having class User; end; and doing that
[21:17:05] riceandbeans: jhass: what if it wasn't just a few users though, what if it was say....8000
[21:17:21] elton: has joined #ruby
[21:17:45] jhass: riceandbeans: Struct.new is just defining a class, it's just avoiding boilerplate, no difference to writing the class on your own
[21:18:06] riceandbeans: right, but making an array of new classes like that, would that eat ram and be useless?
[21:18:35] JW1: has joined #ruby
[21:20:28] CausaMortis: has left #ruby: ()
[21:20:38] purrist: has joined #ruby
[21:21:17] toretore: riceandbeans: only one class is creates, User, User.new creates an instance of User
[21:21:52] JW1: has left #ruby: ("Leaving")
[21:21:56] whathapp_: has joined #ruby
[21:22:04] skweek: has joined #ruby
[21:23:30] wrkrcoop: how can i find out the class a method belongs to?
[21:24:17] SCHAAP137: has joined #ruby
[21:24:50] hutch34: has joined #ruby
[21:24:54] aldodelgado: has joined #ruby
[21:25:01] nankyokusei: has joined #ruby
[21:25:28] giz|work: has joined #ruby
[21:25:57] shevy: you mean like in "class Foo; def bar; end; end" ?
[21:26:30] jhass: wrkrcoop: .method(:foo).owner
[21:26:42] wrkrcoop: jhass: thanks
[21:27:33] choke: has joined #ruby
[21:28:23] Sammichmaker: has joined #ruby
[21:28:30] jhass: riceandbeans: it won't take more memory than say a hash
[21:28:43] jhass: probably less actually
[21:30:00] ur5us: has joined #ruby
[21:32:40] jgt: has joined #ruby
[21:33:30] yfeldblum: has joined #ruby
[21:39:39] Lord_of_Life: has joined #ruby
[21:40:04] norc: has joined #ruby
[21:40:11] safetypin: has joined #ruby
[21:40:29] panpainter: has joined #ruby
[21:42:17] giz|work|2: has joined #ruby
[21:42:54] wrkrcoop: i only know how to create a class double with let, could someone say how i canc reate a double without using let?
[21:44:33] solocshaw: has joined #ruby
[21:44:33] norc: wrkrcoop, let is not about doubles
[21:44:46] wrkrcoop: i didnt say it was
[21:44:57] sdothum: has joined #ruby
[21:45:07] norc: wrkrcoop, leave the let away...
[21:45:10] norc: a = double()
[21:46:05] norc: wrkrcoop, if you dont understand let, then you shouldn't proceed with doubles but understand the basic core features of rspec first.
[21:46:35] wrkrcoop: … i understand what let is, i said i only know how to define a class double when using let
[21:47:08] norc: What you just said makes no sense unless you really don't understand what let does.
[21:47:39] wrkrcoop: let(:this_value) {SomeClass = double()}
[21:48:11] norc: wrkrcoop, please follow this for a second. Can you tell me in a nutshell what let does?
[21:48:27] wrkrcoop: creates the value when it gets evaluated for the first time
[21:48:31] wrkrcoop: so it is memoized
[21:48:39] norc: wrkrcoop, alright. How is it memoized?
[21:48:45] norc: What is the value of the memoization?
[21:48:57] wrkrcoop: whatever u say the value is
[21:49:06] norc: wrkrcoop, right. So the assignment to a constant is pretty pointless there.
[21:49:20] norc: In fact it will lead to warnings across your spec suite when it gets reevaluated.
[21:49:29] norc: so let(:something) { double() }
[21:49:33] wrkrcoop: can u explain?
[21:49:59] norc: wrkrcoop, let(:f) { A = double } will do two things when it gets evaluated.
[21:50:21] norc: first A = double gets evaluated, which assigns the double to a constant (you dont need that)
[21:50:33] norc: and the result of that expression is then memoized.
[21:50:39] pawnbox: has joined #ruby
[21:50:49] wrkrcoop: oh so if i want to create a stub i dont actually need to say what class its on?
[21:51:22] wrkrcoop: i thought if i wanted to stub a method i had to say it belonged to some class
[21:51:22] norc: wrkrcoop, please go back and read up on let/let!
[21:51:30] norc: To understand why you do not need them here.
[21:52:27] hightower3: has joined #ruby
[21:52:38] norc: wrkrcoop, if you understood let/let! you would know how to use a double with or without let.
[21:52:59] wrkrcoop: norc: do i need doubles in order to stub methods?
[21:53:10] norc: wrkrcoop, not necessarily.
[21:53:21] wrkrcoop: but is that how everyone does it?
[21:53:29] norc: wrkrcoop, depends on the context.
[21:53:37] wrkrcoop: what what make it matter?
[21:53:52] wrkrcoop: what would*
[21:53:59] danostrowski: has joined #ruby
[21:54:07] norc: wrkrcoop, sometimes you just mock them using allow(o).to receive(:msg) if you just need to handle a single object.
[21:55:32] jgt: has joined #ruby
[21:56:40] chouhoul_: has joined #ruby
[21:58:18] nettoweb: has joined #ruby
[21:58:25] norc: wrkrcoop, doubles are rather if you need to replace the entire object with.. well. a double.
[21:59:06] norc: So it really depends. Sometimes you just need to stub out single methods because they cannot work in an isolated test (for example a logging method)
[22:00:34] certainty: has joined #ruby
[22:01:47] ips|malc: has joined #ruby
[22:01:52] Sashimi: has joined #ruby
[22:02:16] havenwood: Sashimi: hi
[22:03:10] Sashimi: as i use a mac, and about to begin to learn to code in RoR, i was wondering if there is a way to use xcode i already have installed as an IDE to code/build RoR
[22:03:27] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[22:03:54] baweaver: Also as an aside, you don't "build" ruby code
[22:03:55] havenwood: Sashimi: Yeah, you can use Xcode as a text editor. But it's a bit clunky for just a text editor.
[22:04:11] baweaver: Most tend to use Vim, Sublime, or Emacs
[22:04:17] norc: Sashimi, generally though since this is not necessarily rails specific - you can use it for Rails but you really do not get many benefits.
[22:04:23] lupine: or gedit ^^
[22:04:28] havenwood: Sashimi: Maybe give Atom a try if vim/emacs isn't something you want to do right now: https://atom.io
[22:04:35] norc: Sashimi, but! If XCode is your favourite IDE - then by all means.
[22:04:56] norc: and let's not end up in an editor/IDE war please. :D
[22:04:58] havenwood: Sashimi: You can certainly write your Ruby code in Xcode if you prefer!
[22:05:07] Sashimi: havenwood ▸ yeah, is atom same kind of stuff as sublime ?
[22:05:15] havenwood: Sashimi: Yes.
[22:06:14] StevenXL: has joined #ruby
[22:06:48] aberen: has joined #ruby
[22:06:50] SCHAAP137: has joined #ruby
[22:07:15] edwinvdgraaf: has joined #ruby
[22:07:36] Sashimi: okay thanks everyone :)
[22:08:08] Sashimi: might as well keep of running a full fledged nuclear plant if it's only to edit a text file
[22:08:34] norc: Sashimi, just remember the golden rule about editors.
[22:08:35] Sashimi: i suppose both atom and sublime must have specific plugins to help coding ruby / RoR
[22:08:42] norc: Sashimi, pick one you like... but do NOT talk about it.
[22:08:51] whathappens: has joined #ruby
[22:08:53] norc: It's like religion..
[22:09:24] Sashimi: norc ▸ oh yeah, made the mistake years ago on a #debian channel waking up the vim and emacs ghosts haha
[22:09:38] havenwood: echo "puts 'the best editor'" > ship_it.rb
[22:11:20] baweaver: havenwood: nil?
[22:12:07] havenwood: write by hand, run it in your mind, ship it by hand
[22:12:28] norc: Obligatory mention: https://xkcd.com/378/
[22:13:20] Brklyn: has joined #ruby
[22:13:29] spiette: has joined #ruby
[22:14:37] Brklyn: Hi... I've got a quick Rake question... hopefully somone can help me figure out what's going on. I have a Rakefile with a few tasks, some of these tasks receive an argument (not sure if this is part of the issue). So the deal is, I'm invoking a task once, but it's actually getting executed twice.... Any hints?
[22:14:55] toretore: ?code Brklyn
[22:14:56] ruby[bot]: Brklyn: We can't help you without your code, please post it to https://gist.github.com
[22:15:09] elifoster: has joined #ruby
[22:15:35] panpainter: has joined #ruby
[22:17:04] theRealAlexz: has joined #ruby
[22:17:47] rshackleford: has left #ruby: ("WeeChat 1.5")
[22:19:02] tatsuo: has joined #ruby
[22:23:50] jancel: has joined #ruby
[22:24:47] flashpoint9: has joined #ruby
[22:25:00] choke: has joined #ruby
[22:26:05] ceej: has joined #ruby
[22:27:23] Guest63: has joined #ruby
[22:28:31] jhass: Brklyn: also --trace
[22:29:33] ncthom91: has joined #ruby
[22:33:44] Axsuul: has joined #ruby
[22:34:16] eljimmy: has joined #ruby
[22:37:46] wrkrcoop: im calling a client inside of my method
[22:37:52] wrkrcoop: how can i stub out that class?
[22:38:07] wrkrcoop: i tried Httparty = double()
[22:38:09] wrkrcoop: but that didnt work
[22:38:17] jenrzzz: has joined #ruby
[22:38:17] jenrzzz: has joined #ruby
[22:38:33] tubuliferous_: has joined #ruby
[22:39:24] davidjd: has joined #ruby
[22:39:27] davidjd: has left #ruby: ()
[22:39:53] bigkevmcd: has joined #ruby
[22:43:59] pawnbox: has joined #ruby
[22:44:24] blackmesa: has joined #ruby
[22:44:30] nb_bez___: has joined #ruby
[22:47:33] ruby-lang342: has joined #ruby
[22:48:04] ruby-lang342: Hello. I need a little help with nimage please.
[22:50:12] leitz: has joined #ruby
[22:51:26] havenwood: ruby-lang342: Wrong channel? Did you mean #nim or is nimage something else?
[22:51:52] leitz: Basic OOP question. If an object has an attribute that's a hash, where do you put the method that displays the hash contents? In the object itself, or in the caller? The former means the object must know how it is to be called. The latter means the caller must know the internals of the object.
[22:52:25] ruby-lang342: havenwood: nimage is a ruby library related to narray
[22:53:11] toretore: leitz: you must define a clear interface for the object, where a contract exists for others to interact with it, including what data is returned from a method
[22:53:44] toretore: leitz: in general, prefer to return data instead of defining behavior
[22:53:55] ruby-lang342: I am new to ruby so I hope my terminology is right when I call it a "library". It is invoked via a "require" statement.
[22:54:04] toretore: leitz: meaning, the second option
[22:54:25] toretore: ruby-lang342: where did you find it?
[22:54:28] blackmesa: has joined #ruby
[22:54:47] havenwood: ruby-lang342: Is it the minimage gem but missing the first two letters?
[22:54:53] leitz: toretore, so the object and the caller agree that if the caller does X, it gets a hash back"
[22:55:04] toretore: leitz: exactly
[22:55:10] leitz: That way the caller can digest or display the hash as it sees fit.
[22:55:21] leitz: Makes sense.
[22:55:29] ruby-lang342: I found it when exploring the narray gem .. let me get a link...
[22:55:29] toretore: leitz: this then means that the first object can't change the structure of the hash
[22:55:34] chopin: has joined #ruby
[22:55:40] toretore: leitz: but this is not a problem with proper encapsulation
[22:55:59] rkazak: has joined #ruby
[22:56:40] ruby-lang342: toretore & havenwood ... here is a link that started me looking for more information on it: https://masa16.github.io/narray/demo/smooth.en.html
[22:56:57] gnufied: has joined #ruby
[22:58:07] ruby-lang342: and actually, here is the demo I am trying to run: https://masa16.github.io/narray/demo/mandel.en.html
[22:59:43] SilverKey: has joined #ruby
[22:59:43] ruby-lang342: I successfully installed the narray gem but the system balks at the require 'nimage' statement
[23:00:28] tildes: has joined #ruby
[23:00:44] ruby-lang342: eep --- sorry folks, I gotta run and take care of something for my sister -- I'll be back later
[23:00:44] toretore: it looks like it's just to open up a window to show the image; you can probably render it to a file and then open it up with a different program
[23:01:34] ruby-lang342: toretore -- gotta run but I dont think so ... see this https://docs.omniref.com/ruby/gems/narray/0.5.9.4/symbols/NImage
[23:02:50] toretore: "A Ruby Extension Library for displaying Images on X11
[23:04:16] lightt: has joined #ruby
[23:04:35] B1n4r10: has joined #ruby
[23:05:46] Brklyn: jhass: thanks for the advice... Yeah I was checking with trace. I was actually requiring a file twice, by another rakefile. So apparently, both tasks with the matching name were getting called. Glad I finally sorted it out.
[23:05:50] Brklyn: Thanks a lot eeryone
[23:07:33] aberen: has joined #ruby
[23:09:55] jgt1: has joined #ruby
[23:11:52] danostrowski: has joined #ruby
[23:13:01] jenrzzz: has joined #ruby
[23:14:49] elifoster: has joined #ruby
[23:14:59] ramfjord: has joined #ruby
[23:15:06] skade: has joined #ruby
[23:17:49] mattwashere: has joined #ruby
[23:18:09] elton: has joined #ruby
[23:18:58] Vile`: has joined #ruby
[23:19:01] Azure|dc: has joined #ruby
[23:20:16] mistermocha: has joined #ruby
[23:21:13] Dolby_: has joined #ruby
[23:21:25] leitz: Ups and downs. Down is when you don't know if your lack of skill with Ruby or lack of skill with rspec is causing the issue. Up is when it finally works. :)
[23:21:54] hutch34: has joined #ruby
[23:22:26] qasaur: has joined #ruby
[23:23:16] rigel_: has joined #ruby
[23:23:23] mattwashere: has joined #ruby
[23:24:02] choke: has joined #ruby
[23:25:38] nankyokusei: has joined #ruby
[23:25:43] tildes_: has joined #ruby
[23:25:55] Sashimi: has joined #ruby
[23:29:24] ruby-lang342: toretore: / havenwood: I'm back, didn't take as long as I thought it would this time. Soooo, as I was saying...
[23:29:45] hightower3: has joined #ruby
[23:30:32] ruby-lang342: I am trying to run the mandelbrot demo and it does not recognize the require 'nimage' and apparently gem does not recognize it either.
[23:32:35] yfeldblum: has joined #ruby
[23:32:51] dnewkerk: has joined #ruby
[23:33:39] ruby-lang342: that is to say gem finds no repository called "nimage"
[23:33:44] Sashimi: has joined #ruby
[23:34:05] mattwashere: has joined #ruby
[23:34:45] rizenine: has joined #ruby
[23:37:00] ruby-lang342: I guess they left for awhile ... is anybody here familiar with the narray and nimage libraries?
[23:38:32] RobertBirnie: has joined #ruby
[23:39:12] palms: has joined #ruby
[23:39:18] aeterne: has joined #ruby
[23:40:03] shevy: there is no such gem: https://rubygems.org/gems/nimage
[23:40:15] toretore: ruby-lang342: "A Ruby Extension Library for displaying Images on X11"
[23:40:26] Sashimi: has joined #ruby
[23:40:30] toretore: it is for taking the data and displaying it in a window
[23:40:55] JJM: has joined #ruby
[23:41:21] maloik: has joined #ruby
[23:42:06] ruby-lang342: Hi shevy. I'm new to ruby. If there is no such gem then where do I get it in order to use it per the require 'nimage' in this demo: https://masa16.github.io/narray/demo/mandel.en.html
[23:42:54] tildes: has joined #ruby
[23:43:18] ruby-lang342: toretore -- yeah, I see that, it also has a few methods relating to color and such. But where do I get it? / how do I install it?
[23:43:18] toretore: ruby-lang342: what is your operating system?
[23:44:17] shevy: ruby-lang342 he did not tell people how to get it https://masa16.github.io/narray/
[23:44:37] shevy: a changelog refers to it as nimage/nimage.c so somewhere there must be some C file
[23:44:58] ruby-lang342: toretore I am on a Win8 x64 system using the Bitnami RubyStack (see https://bitnami.com/stack/ruby/README.txt) for Ruby 2.2.5
[23:45:11] swills: has joined #ruby
[23:45:12] toretore: so it wouldn't even work
[23:45:26] toretore: you don't have x11
[23:45:43] ruby-lang342: toretore -- why not? Bitnami is a virtual linux system.
[23:45:58] Arsin: has joined #ruby
[23:46:40] moeabdol: has joined #ruby
[23:47:40] koooge: has joined #ruby
[23:47:52] toretore: do you know that this vm works with x11?
[23:48:26] ruby-lang342: toretore -- good question, I'll have to look into that ... brb
[23:49:10] skweek: has joined #ruby
[23:49:20] toretore: i don't know how much pain you're willing to go through to get this to work, but it's probably going to be a lot
[23:50:30] tAn: has joined #ruby
[23:53:37] freerobby: has joined #ruby
[23:53:54] ruby-lang342: toretore -- sigh, looks like you are right, it will be a pain. I'd have to install a opensuse vm and zypper in the x11 stuff, then install ruby -- not worth it. My chief interest is in narray and that installed just fine.
[23:54:42] ruby-lang342: shevy, yeah -- weird that it is documented by API but not explained for install. oh well. Thanks for helping.
[23:56:57] ruby-lang342: shevy: AHA! here is that C file you mentioned (not that I can use it without x11) -- just FYI : https://docs.omniref.com/ruby/gems/narray/0.5.9.4/files/src/nimage/lib/nimage.rb
[23:56:57] Dolby_: has joined #ruby
[23:57:51] ruby-lang342: also it looks like maybe it has not been updated since ruby 1.9.x
[23:58:04] lightt: has joined #ruby
[23:58:19] shevy: yeah it looks really bad
[23:58:26] snguyen: has joined #ruby
[23:59:14] ruby-lang342: ah well -- it looked like it would have been a nice way to interact with narray but so be it, I'll have to write my own display code for the system I have.
[23:59:35] ekinmur: has joined #ruby