« Back to channel list

#ruby - 04 May 2016

« Back 1 day Forward 1 day »
[00:00:50] jaguarmagenta: has joined #ruby
[00:01:40] graft: seems unlikely rails would help me here since it's downstream of rack
[00:01:47] graft: on the other hand, this bug makes no sense
[00:03:10] s00pcan: has joined #ruby
[00:03:13] rbennacer: has joined #ruby
[00:03:37] cjbottaro: has joined #ruby
[00:04:38] idefine: has joined #ruby
[00:07:00] Ropeney: has joined #ruby
[00:08:35] Xeago_: has joined #ruby
[00:09:16] ruby-lang235: has joined #ruby
[00:09:30] ruby-lang235: http://volrac.com
[00:09:37] ruby[bot]: ruby-lang235: You can find a list of my commands on http://ruby-community.com/ruboto/commands and my factoids on http://ruby-community.com/ruboto/facts
[00:11:01] RegulationD: has joined #ruby
[00:11:33] iddk: has joined #ruby
[00:11:41] ruby[bot]: iddk: You can find a list of my commands on http://ruby-community.com/ruboto/commands and my factoids on http://ruby-community.com/ruboto/facts
[00:14:48] hahuang65: has joined #ruby
[00:14:56] ellisTAA: has joined #ruby
[00:15:30] ellisTAA: if i run exec ruby in terminal it seems to start a ruby process, how can i end that process without killing the processs?
[00:15:36] rkazak: has joined #ruby
[00:16:55] discounted: has joined #ruby
[00:22:17] araujo: has joined #ruby
[00:22:18] araujo: has joined #ruby
[00:28:03] Limix: has joined #ruby
[00:28:43] jsaak: has joined #ruby
[00:28:51] tAn: has joined #ruby
[00:28:56] rbennacer: has joined #ruby
[00:29:45] yfeldblum: has joined #ruby
[00:30:04] ellisTAA: has joined #ruby
[00:30:56] Kus: has joined #ruby
[00:31:44] ellisTAA: has joined #ruby
[00:34:10] ellisTAA: has joined #ruby
[00:34:16] Arcaire: graft: We still see people running Ruby 1.9 or Ruby 1.8
[00:34:19] Arcaire: 2.2 is fine
[00:37:48] tristanp: has joined #ruby
[00:37:53] blur3d: has joined #ruby
[00:37:55] Guest43: has joined #ruby
[00:40:05] ellisTAA: has joined #ruby
[00:41:35] ellisTAA: has joined #ruby
[00:42:34] tAn: has joined #ruby
[00:43:57] bronson: has joined #ruby
[00:44:23] `tim`: has joined #ruby
[00:47:07] nando293921: has joined #ruby
[00:47:44] GodFather: has joined #ruby
[00:50:13] zeroDivisible: has joined #ruby
[00:50:17] oncall-pokemon: has joined #ruby
[00:50:41] freerobby: has joined #ruby
[00:52:19] jenrzzz: has joined #ruby
[00:52:19] jenrzzz: has joined #ruby
[00:52:24] freerobby1: has joined #ruby
[00:53:08] johnny56_: has joined #ruby
[00:55:56] havenwood: iddk: Please don't spam the bot.
[00:56:28] rbennacer: has joined #ruby
[00:57:12] rbennacer: has joined #ruby
[00:57:13] chipotle: has joined #ruby
[00:57:35] brianpWins: has joined #ruby
[01:01:40] whathappens: has joined #ruby
[01:02:12] zacts: so is 2.3.* an unstable / testing branch of ruby?
[01:02:23] whathapp_: has joined #ruby
[01:02:36] zacts: (i.e. are the odd minor versioned 2.3.* unstable, whereas the even numbered minor versions 2.2.* are stable?)
[01:02:49] havenwood: zacts: 2.3.1 is the latest stable Ruby.
[01:02:49] hays: has joined #ruby
[01:02:59] havenwood: zacts: Nope.
[01:03:02] zacts: oh, so all features in 2.3.1 will always remain in future versions?
[01:03:19] zacts: so I should be using 2.3.1 on my local laptop versus 2.2.5
[01:03:47] tAn: has joined #ruby
[01:03:52] havenwood: zacts: Because you're a Christmas behind on 2.2.5.
[01:03:59] zacts: heh, I see cool
[01:04:03] zacts: I'll use 2.3.1 then
[01:09:18] CloCkWeRX: has joined #ruby
[01:10:33] whathappens: has joined #ruby
[01:11:25] tvon: has joined #ruby
[01:12:03] dikaio: has joined #ruby
[01:12:13] kareeoleez: has joined #ruby
[01:14:50] akitada: has joined #ruby
[01:15:22] ur5us: has joined #ruby
[01:18:06] yfeldblum: has joined #ruby
[01:26:49] bronson: has joined #ruby
[01:27:54] Limix: has joined #ruby
[01:28:25] zacstewart: has joined #ruby
[01:31:18] rkazak: has joined #ruby
[01:31:24] nettoweb: has joined #ruby
[01:32:22] trinaldi: has joined #ruby
[01:35:37] edavis: has joined #ruby
[01:35:38] nettoweb: has joined #ruby
[01:37:29] Guest43: has joined #ruby
[01:40:00] weemsledeux: has joined #ruby
[01:40:10] jhack: has joined #ruby
[01:43:43] nanoz: has joined #ruby
[01:44:40] tAn: has joined #ruby
[01:46:59] rkazak: has joined #ruby
[01:50:44] pawnbox: has joined #ruby
[01:50:56] benlieb: has joined #ruby
[01:51:09] cdg: has joined #ruby
[01:53:17] ensyde: has joined #ruby
[01:53:29] elifoster: has joined #ruby
[01:55:52] Limix: has joined #ruby
[01:59:10] Coldblackice: has joined #ruby
[02:01:05] emilford: has joined #ruby
[02:01:39] jaguarmagenta: has joined #ruby
[02:02:06] crystal77: has joined #ruby
[02:02:46] tAn: has joined #ruby
[02:04:43] diegoaguilar: has joined #ruby
[02:05:27] jhack: has joined #ruby
[02:08:45] crystal77: has joined #ruby
[02:09:51] flashpoint9: has joined #ruby
[02:11:33] xcesariox: has joined #ruby
[02:12:03] crystal77: has joined #ruby
[02:12:38] zacstewart: has joined #ruby
[02:12:48] Es0teric: has joined #ruby
[02:13:00] Yiota_: has joined #ruby
[02:14:49] crystal77: has joined #ruby
[02:15:18] SilverKey: has joined #ruby
[02:17:03] pipework: havenwood: We need to start a new naming convention for ruby so we can easily 'include' apostrophes. users_.oranges for a single user's oranges, users__oranges, etc.
[02:17:06] govg: has joined #ruby
[02:17:28] pipework: Remove the uncertainty of plurality or ownership!
[02:17:37] zacts: ruby.json_for_versioning_here
[02:22:29] discounted: has joined #ruby
[02:23:31] howdoico1: has joined #ruby
[02:23:37] tAn: has joined #ruby
[02:25:00] mjuszczak: has joined #ruby
[02:25:39] Ebok: has joined #ruby
[02:26:52] crystal77: has joined #ruby
[02:32:17] dikaio: has joined #ruby
[02:32:52] discounted: has joined #ruby
[02:36:02] crystal77: has joined #ruby
[02:36:27] crdpink: has joined #ruby
[02:40:44] crystal77: has joined #ruby
[02:41:16] Infinite_182: has joined #ruby
[02:42:21] tax: has joined #ruby
[02:43:46] malcolmva: has joined #ruby
[02:44:17] tAn: has joined #ruby
[02:44:28] crystal77: has joined #ruby
[02:47:42] syndikate: has joined #ruby
[02:47:55] rojomisin: has joined #ruby
[02:48:30] havenwood: syndikate: Happy Ruby to you!
[02:48:42] syndikate: same to you havenwood
[02:48:47] syndikate: I am stuck with a small problem
[02:48:59] havenwood: syndikate: Pray tell?
[02:49:23] syndikate: I have a function with a case statement inside, I have defined a variable before the case statement, and initialising it in one of the case when clause, but it is unavailable in the next case where clause
[02:50:36] syndikate: havenwood, what is that am doing wrong here..
[02:50:52] ruby[bot]: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[02:51:13] baweaver: if you paste your code there, it'll be a lot easier to help
[02:51:23] mattp_: has joined #ruby
[02:51:32] crystal77: has joined #ruby
[02:51:40] syndikate: Oh sorry, hold on
[02:51:56] baweaver: not a problem
[02:53:06] bazz_: if I have an [ ["1","a"],["2","b"] ] is to possible to sort it based on one of the "sub-members" specifically ?? for instance by "1" and "2" array members
[02:53:27] baweaver: bazz_ what have you tried?
[02:53:49] bazz_: I'm not sure if I'm implementing the "connections properly" mind if I invest you into greater detail?
[02:54:15] crystal77: has joined #ruby
[02:54:15] baweaver: &ri Enumerable#sort_by
[02:54:15] `derpy: http://ruby-doc.org/core-2.3.0/Enumerable.html#method-i-sort_by
[02:54:37] baweaver: that should do it
[02:54:47] bazz_: I don't see how that answers the multi-dimensional aspect
[02:54:58] bazz_: hm I got it~
[02:55:16] bazz_: so i would do .. array.sort_by { |a, b| b }
[02:55:19] syndikate: https://gist.github.com/anonymous/1bd82a200532265a3a24bea023e26c9d
[02:55:32] baweaver: won't work bazz_
[02:55:41] KensoDev: has joined #ruby
[02:55:45] syndikate: havenwood, baweaver have pasted above
[02:55:47] bazz_: I am pseudo-coding
[02:55:56] bazz_: I'll let you know if my real code fails
[02:56:00] baweaver: I'm real answering :D
[02:56:34] baweaver: >> [[1, ?a], [2, ?b]].sort_by(&:last)
[02:56:35] ruby[bot]: baweaver: # => [[1, "a"], [2, "b"]] (https://eval.in/564831)
[02:56:47] baweaver: or just use the index
[02:56:53] bazz_: I need a better array example that shows the difference
[02:57:12] bazz_: [[1,"z"], [2, "a"]]
[02:57:34] bazz_: >> [[1,"z"], [2, "a"]].sort_by(&:first)
[02:57:35] ruby[bot]: bazz_: # => [[1, "z"], [2, "a"]] (https://eval.in/564832)
[02:57:49] bazz_: that is using syntax I am unfamiliar with
[02:58:01] htmldrum: has joined #ruby
[02:58:03] bazz_: specifically the amp
[02:58:04] baweaver: if you want to sort by an arbitrary index, just use the array accessor
[02:58:11] baweaver: symbol to proc
[02:58:16] baweaver: it's shorthand for:
[02:58:30] baweaver: >> [[1,"z"], [2, "a"]].sort_by { |a| a.first }
[02:58:31] ruby[bot]: baweaver: # => [[1, "z"], [2, "a"]] (https://eval.in/564833)
[02:58:39] baweaver: effectively
[02:58:50] baweaver: >> [[1,"z"], [2, "a"]].sort_by { |a| a[0] }
[02:58:51] ruby[bot]: baweaver: # => [[1, "z"], [2, "a"]] (https://eval.in/564834)
[02:59:05] bazz_: do you mind if I ask for high-level advice form you? It requires some minutes
[02:59:12] baweaver: now then, syndikate... What are you trying to do?
[02:59:21] baweaver: bazz_ might take me some minutes to answer
[02:59:22] bazz_: oh yes, help syndikate I'll be OK
[02:59:34] bazz_: baweaver, I'll write down the thoughts anyways
[02:59:36] baweaver: ACTION is also cooking food :D
[02:59:45] bazz_: o, nvrmnd then
[02:59:53] bazz_: Enjoy your food :)
[02:59:54] baweaver: na, don't worry about it
[02:59:58] CloCkWeRX: has joined #ruby
[03:00:03] baweaver: just means I take a few more clicks to answer
[03:00:10] bazz_: Are you familiar with Redis? ZSets?
[03:00:35] baweaver: I know it's a KV store that runs Lua
[03:01:05] baweaver: syndikate line 7 does something that'll break it
[03:01:18] baweaver: syndikate but in any case, what's the expected input and output?
[03:01:23] syndikate: baweaver, actullay I initialise $myVar = nil
[03:01:25] syndikate: so that is a typo
[03:01:27] tAn: has joined #ruby
[03:01:43] syndikate: baweaver, so when I try to do the add function it fails
[03:01:49] crystal77: has joined #ruby
[03:02:00] baweaver: syndikate because right now I think you might need to solve this a different way, but seeing your expected input and output would help with that.
[03:02:40] baweaver: syndikate or a problem description if you have one
[03:02:59] syndikate: baweaver, okay how do I do it? What I am trying to do is create a class instance and then run various methods of that class using switch
[03:03:27] baweaver: syndikate do you have an example of a line I can see?
[03:03:34] syndikate: Sure, hold on
[03:03:35] bazz_: baweaver, I spent a couple minutes writing my scenario but it's a bit too much for the chatroom .. and a code example would be too time-consuming, I'll trust myself to handle it. Thanks for your help thus far
[03:03:50] baweaver: bazz_ we'll be about if you need some advice.
[03:08:50] Eiam_: has joined #ruby
[03:09:55] rojomisi1: has joined #ruby
[03:10:40] JesseH: has joined #ruby
[03:10:56] JesseH: has joined #ruby
[03:14:01] crdpink2: has joined #ruby
[03:17:33] braincrash: has joined #ruby
[03:19:23] arescorpio: has joined #ruby
[03:22:56] bazz_: >> [[2,"a"], [1, "z"]].sort_by { |a, b| a }
[03:22:57] ruby[bot]: bazz_: # => [[1, "z"], [2, "a"]] (https://eval.in/564843)
[03:22:58] lxsameer: has joined #ruby
[03:23:01] bazz_: >> [[2,"a"], [1, "z"]].sort_by { |a, b| b }
[03:23:02] ruby[bot]: bazz_: # => [[2, "a"], [1, "z"]] (https://eval.in/564844)
[03:23:15] mlehrer_: has joined #ruby
[03:24:59] xMopxShell: has joined #ruby
[03:25:14] emilford: has joined #ruby
[03:25:30] camilasan: has joined #ruby
[03:27:25] dikaio: has joined #ruby
[03:27:32] tAn: has joined #ruby
[03:28:01] baweaver: so it does splat without parens
[03:28:29] gix: has joined #ruby
[03:28:41] bronson: has joined #ruby
[03:32:34] rkazak: has joined #ruby
[03:35:40] Moosashi: has joined #ruby
[03:38:26] Devalo: has joined #ruby
[03:39:33] `tim`: has joined #ruby
[03:45:50] Moosashi: has joined #ruby
[03:46:31] Limix: has joined #ruby
[03:47:57] tAn: has joined #ruby
[03:50:35] pawnbox: has joined #ruby
[03:54:30] fedexo: has joined #ruby
[03:55:44] justin_pdx: has joined #ruby
[03:58:02] SilverKey: has joined #ruby
[03:59:14] godzillaenlacasa: has joined #ruby
[04:00:23] Moosashi: has joined #ruby
[04:01:12] AccordLTN: has joined #ruby
[04:01:56] justin_pdx: has joined #ruby
[04:02:23] jaguarmagenta: has joined #ruby
[04:02:24] dikaio: has joined #ruby
[04:02:28] rickmasta: has joined #ruby
[04:03:43] yfeldblum: has joined #ruby
[04:05:12] benlieb: has joined #ruby
[04:05:22] rickmasta: has joined #ruby
[04:06:00] tAn: has joined #ruby
[04:07:51] hhee: has joined #ruby
[04:08:30] brent__: has joined #ruby
[04:08:39] nofxx: has joined #ruby
[04:08:53] nofxx: has joined #ruby
[04:09:55] brent__: hello. i'm doing a small problem that involves factorials and am getting a stack level too deep
[04:10:21] brent__: i was using a recursive method
[04:10:37] Guest43: has joined #ruby
[04:10:44] htmldrum: has joined #ruby
[04:11:07] TheWhip: has joined #ruby
[04:11:08] saramic: has joined #ruby
[04:11:15] shinnya: has joined #ruby
[04:11:19] jenrzzz: has joined #ruby
[04:13:20] RegulationD: has joined #ruby
[04:13:50] rickmasta: has joined #ruby
[04:14:14] Yiota_: has joined #ruby
[04:15:00] ICantCook: has joined #ruby
[04:15:51] chipotle: has joined #ruby
[04:17:58] Limix: has joined #ruby
[04:21:08] d0lph1n98: has joined #ruby
[04:21:21] hk238: has joined #ruby
[04:21:39] duncannz: has joined #ruby
[04:24:13] rbennacer: has joined #ruby
[04:24:23] kareeoleez: has joined #ruby
[04:24:42] idefine: has joined #ruby
[04:25:16] tAn: has joined #ruby
[04:26:08] emilford: has joined #ruby
[04:29:56] pelegreno: has joined #ruby
[04:30:36] Guest43: has joined #ruby
[04:31:01] pelegreno: has joined #ruby
[04:31:11] fedexo: has joined #ruby
[04:31:46] hhee: has left #ruby: ("Leaving")
[04:36:12] northrup: has joined #ruby
[04:36:57] Xeago_: has joined #ruby
[04:39:59] grenierm: has joined #ruby
[04:40:23] pelegreno: has joined #ruby
[04:40:41] chipotle: has joined #ruby
[04:41:05] CausaMortis: has joined #ruby
[04:44:22] vdamewood: has joined #ruby
[04:46:26] d0lph1n98: has joined #ruby
[04:47:54] gambl0re: has joined #ruby
[04:48:32] havenwood: brent__: Ruby disables Tail Call Optimization (TCO) by default in favor or trace instructions.
[04:48:36] havenwood: gambl0re: Hi.
[04:48:49] Radar: gambl0re: hello, friend.
[04:48:52] TheWhip: has joined #ruby
[04:48:53] pelegreno: has joined #ruby
[04:49:50] havenwood: brent__: You can compile Ruby with TCO or enable it just for some code.
[04:50:12] havenwood: brent__: Or we could show you how to do it without recursion.
[04:50:48] havenwood: brent__: Here's an example or enabling TCO for code loaded with #require_relative: https://gist.github.com/havenwood/3c5a5e1476c811460992
[04:51:33] brent__: i swapped for inject
[04:51:48] brent__: but still seemed too long, it's a codewars problem i was doing
[04:52:46] brent__: how would you do it?
[04:52:59] scepticulous: has joined #ruby
[04:53:07] brent__: the problem was given n, find the # of trailing zeros of the n!
[04:54:46] brent__: i ended up caving, and looking at the solutions, looks like you had to use an algorithm i wasn't familiar with to get it to pass quick enough
[04:57:54] troys: has joined #ruby
[04:58:03] cpup: has joined #ruby
[05:00:50] vStone: has joined #ruby
[05:01:31] vStone: is '@must_be_an_array = [@must_be_an_array].flatten' generally accepted code to make sure something is always an array?
[05:02:20] Radar: brent__: trailing zeros of what? Do you have an example?
[05:02:51] Radar: >> a = [1,2,3]; a = [*a]
[05:02:52] ruby[bot]: Radar: # => [1, 2, 3] (https://eval.in/564897)
[05:02:55] Radar: vStone: ^
[05:02:59] Radar: >> a = 1; a = [*a]
[05:03:00] ruby[bot]: Radar: # => [1] (https://eval.in/564898)
[05:03:16] znz_jp: has joined #ruby
[05:03:26] brent__: zeros(12) = 2 # 1 * 2 * 3 .. 12 = 479001600
[05:03:27] brent__: that has 2 trailing zeros 4790016(00)
[05:03:37] vStone: excellent, thanks
[05:03:47] tAn: has joined #ruby
[05:04:13] bronson: has joined #ruby
[05:04:40] vStone: has left #ruby: ("<3")
[05:04:53] discounted: has joined #ruby
[05:05:43] Radar: >> 479001600.to_s.split("").reverse.take_while { |e| e == "0" }.count
[05:05:44] ruby[bot]: Radar: # => 2 (https://eval.in/564900)
[05:05:45] Radar: brent__: ^
[05:05:51] Radar: Someone can probably write that neater than I can
[05:06:19] moeabdol: has joined #ruby
[05:06:26] sauvin: has joined #ruby
[05:06:56] brent__: Rader, yeah i had something like that
[05:07:21] firstdayonthejob: has joined #ruby
[05:07:21] Moosashi: has joined #ruby
[05:07:45] havenwood: >> 479001600.to_s[/0*\z/].size
[05:07:46] ruby[bot]: havenwood: # => 2 (https://eval.in/564901)
[05:08:01] brent__: factorial.to_s.chars.reverse.each { |el| el == 0 ? zeros += 1 : break }
[05:08:13] htmldrum: has joined #ruby
[05:08:24] brent__: that was w/ facotiral being made via #reduce and it seemed to be taking too long
[05:09:21] Arcaire: havenwood's solution is 15% faster or so
[05:09:22] Arcaire: if you care
[05:09:37] brent__: i may try it with that
[05:09:46] brent__: see if it will work
[05:09:53] terminalrecluse: has joined #ruby
[05:09:58] iooner: has joined #ruby
[05:11:03] discounted: has joined #ruby
[05:11:11] shout-user28: has joined #ruby
[05:12:18] brent__: still timed out
[05:12:22] brent__: w/ havenwoods regex
[05:13:01] Arcaire: What timed out?
[05:13:03] brent__: the formula it was looking for was: zeros = 0 ; zeros += n /= 5 while n >= 1
[05:13:21] brent__: it was a codewars challenge
[05:13:32] brent__: so the tests timed out
[05:13:52] brent__: right, still don't really understand how that algorithm works
[05:15:23] terminalrecluse: has joined #ruby
[05:15:30] roadt__: has joined #ruby
[05:16:13] tildes_: has joined #ruby
[05:16:30] Arcaire: That's slower than havenwood's solution, but only because it has to calculate the factorial.
[05:16:48] zeroDivisible: has joined #ruby
[05:17:36] brent__: i did havenwoods regex w/ (1..n).reduce(:*) || 0
[05:17:43] brent__: and it was timing out
[05:17:54] saramic: has joined #ruby
[05:18:00] brent__: is that faster than the solution it was looking for?
[05:18:04] Arcaire: https://eval.in/564912
[05:18:40] roadt_: has joined #ruby
[05:19:09] ruby-lang290: has joined #ruby
[05:19:34] saramic: has joined #ruby
[05:19:42] brent__: take into account, the solution they wanted never calculated the factorial of n
[05:19:49] brent__: they just did those calcs on n
[05:21:20] Arcaire: They didn't want the factorial though, only the trailing zeros.
[05:21:29] Arcaire: To be completely honest I have no idea how it works mathematically because I'm trash at math.
[05:21:36] zacstewart: has joined #ruby
[05:21:58] Arcaire: Programmatically this is it expanded: https://eval.in/564920
[05:23:30] brent__: the difference speed wise between finidng the factorial and using regex is .11sec vs .08sec
[05:24:00] Arcaire: 564920 just basically divides it by 5
[05:24:04] brent__: for z(1000)
[05:24:07] Arcaire: which is apparently sufficient to calculate the trailing zeros
[05:24:13] brent__: apparently
[05:24:30] Arcaire: i don't have to math thankfully
[05:24:35] Arcaire: and when i do it's my gf proving i'm bad at math
[05:24:35] dionysus69: has joined #ruby
[05:24:56] brent__: i don't know how you get started to look for a solution like that
[05:25:11] Arcaire: some people have lots of time but little responsibility
[05:25:44] tAn: has joined #ruby
[05:26:38] brent__: is that speed diference actually significant?
[05:26:53] Arcaire: Not for what you're doing.
[05:26:57] saramic: has joined #ruby
[05:27:01] Arcaire: If you were a bank infrastructure, yes.
[05:27:02] emilford: has joined #ruby
[05:28:04] duderonomy: has joined #ruby
[05:29:46] jaguarmagenta: has joined #ruby
[05:32:07] saramic: has joined #ruby
[05:32:49] saramic: has joined #ruby
[05:34:11] shevy: brent__ the bank!
[05:34:21] PedramT: has joined #ruby
[05:34:41] brent__: the big banks, especially
[05:34:49] brent__: wont' stand for those delays
[05:37:56] Guest64287: has joined #ruby
[05:37:56] Guest64287: has joined #ruby
[05:38:33] sorryiamnew: has joined #ruby
[05:38:41] Arcaire: https://bugs.ruby-lang.org/issues/9569
[05:39:14] sorryiamnew: can someone please point me to the documentation for #hash method?
[05:39:29] Arcaire: >fix securerandom functionality
[05:39:30] sorryiamnew: it seems that it can be called for any object
[05:39:30] Arcaire: >status: rejected
[05:39:47] Arcaire: sorryiamnew: it can! :D
[05:39:48] Arcaire: http://ruby-doc.org/core-2.3.1/Object.html#method-i-hash
[05:40:39] matt_d: sorryiamnew: just about :)
[05:40:40] nickjj: has joined #ruby
[05:41:23] aiguu_: has joined #ruby
[05:41:26] Keltia: has joined #ruby
[05:41:35] Arcaire: >i did a presentation to 32C3 about this
[05:41:37] Arcaire: >no you're still wrong
[05:41:46] Arcaire: gooooooooooooood stuff who needs cves when we have this MAINTENANCE
[05:45:24] shibly: has joined #ruby
[05:45:32] shibly: has left #ruby: ()
[05:45:44] last_staff: has joined #ruby
[05:45:45] Arcaire: that php security guy has even weighed in
[05:45:52] Arcaire: you know you done goofed when php > your language
[05:46:06] lvn: has joined #ruby
[05:49:37] Prawnzy: has joined #ruby
[05:50:52] yfeldblum: has joined #ruby
[05:51:14] ramfjord: has joined #ruby
[05:55:43] TheWhip_: has joined #ruby
[05:56:23] pawnbox_: has joined #ruby
[05:57:34] kareeoleez: has joined #ruby
[05:57:58] justin_pdx: has joined #ruby
[05:58:14] AccordsLTN: has joined #ruby
[05:58:58] kareeoleez: has joined #ruby
[05:58:59] dikaio: has joined #ruby
[05:59:59] moeabdol: has joined #ruby
[06:00:36] rbennacer: has joined #ruby
[06:01:15] dionysus69: has joined #ruby
[06:01:16] TheWhip: has joined #ruby
[06:02:46] Spami: has joined #ruby
[06:07:19] EdwardIII: has joined #ruby
[06:09:10] skade: has joined #ruby
[06:09:50] d0nn1e: has joined #ruby
[06:10:50] malcolmva: has joined #ruby
[06:13:35] PedramT: has joined #ruby
[06:13:54] tAn: has joined #ruby
[06:13:56] aufi: has joined #ruby
[06:14:05] RegulationD: has joined #ruby
[06:14:43] scepticulous: has joined #ruby
[06:15:02] kareeole_: has joined #ruby
[06:15:19] pawnbox: has joined #ruby
[06:16:04] TheWhip: has joined #ruby
[06:16:58] PedramT: has joined #ruby
[06:17:50] rkazak: has joined #ruby
[06:19:43] al2o3-cr: has joined #ruby
[06:20:30] pLaToOn: has joined #ruby
[06:23:18] jordanm: has joined #ruby
[06:24:01] raeoks: has joined #ruby
[06:24:09] PedramT: has joined #ruby
[06:25:16] jud: has joined #ruby
[06:25:17] jud: has joined #ruby
[06:28:09] pelegreno: has joined #ruby
[06:28:26] dionysus69: has joined #ruby
[06:29:07] emilford: has joined #ruby
[06:31:54] emilkarl: has joined #ruby
[06:35:05] codecop: has joined #ruby
[06:35:54] toretore: has joined #ruby
[06:38:39] tvw: has joined #ruby
[06:41:11] lkba: has joined #ruby
[06:42:07] htmldrum: has joined #ruby
[06:42:52] djbkd: has joined #ruby
[06:42:57] ponga: has joined #ruby
[06:44:17] anisha: has joined #ruby
[06:44:17] PedramT: has joined #ruby
[06:44:36] ponga: has left #ruby: ()
[06:45:12] govg: has joined #ruby
[06:46:03] discounted: has joined #ruby
[06:47:34] Moosashi: has joined #ruby
[06:51:55] dikaio: has joined #ruby
[06:52:15] lkba_: has joined #ruby
[06:54:28] pawnbox: has joined #ruby
[06:56:00] Coldblackice: has joined #ruby
[06:56:36] aganov: has joined #ruby
[06:57:34] biberu: has joined #ruby
[06:57:34] dikaio: has joined #ruby
[07:03:43] hahuang61: has joined #ruby
[07:04:55] Phanes: has joined #ruby
[07:04:55] Phanes: has joined #ruby
[07:05:31] bronson: has joined #ruby
[07:06:07] devbug: has joined #ruby
[07:12:27] tagaulap: has joined #ruby
[07:12:32] dopie: has joined #ruby
[07:17:14] edwinvdgraaf: has joined #ruby
[07:17:53] hahuang65: has joined #ruby
[07:18:44] andikr: has joined #ruby
[07:19:28] PedramT: has joined #ruby
[07:23:41] rbennacer: has joined #ruby
[07:23:44] pawnbox: has joined #ruby
[07:24:08] jimmybomb: has joined #ruby
[07:26:11] jimmybomb: hey guys, just wondering this is more about api design. if i have a url like api/item. and lets say i want to bulk update multiple items, is it better to have an endpoint like so "Post api/item/bulk-update" and post gazilion item in the body or is it better to do a gazilion async calls using promises to "put /api/item/x" ?
[07:26:42] Seich: has joined #ruby
[07:27:19] antgel: has joined #ruby
[07:27:24] isxek: has joined #ruby
[07:27:27] grenierm: has joined #ruby
[07:28:02] nerium: has joined #ruby
[07:28:41] Xeago_: has joined #ruby
[07:30:02] emilford: has joined #ruby
[07:34:18] bluOxigen: has joined #ruby
[07:34:29] CausaMortis: has joined #ruby
[07:34:46] canton7: are you an idealist or a pragmatist? :P
[07:35:10] zenspider: has joined #ruby
[07:35:24] jimmybomb: im an idealist
[07:35:35] jimmybomb: but programming is so hard im fine with anything
[07:36:57] rbennacer: has joined #ruby
[07:38:09] mark_66: has joined #ruby
[07:39:23] mikecmpbll: has joined #ruby
[07:39:24] htmldrum: has joined #ruby
[07:39:52] lsmola: has joined #ruby
[07:40:00] Devalo: has joined #ruby
[07:40:03] snowy: has joined #ruby
[07:40:17] igam: has joined #ruby
[07:40:25] aiguu_: @canton7: Why not have `POST|PUT /api/items` be bulk update, and `POST /api/items/:id` be a single update.
[07:40:39] igam`: has joined #ruby
[07:41:46] canton7: sure, that works
[07:43:45] PedramT: has joined #ruby
[07:44:35] Infra-Red: has joined #ruby
[07:44:42] jimmybomb: @alguu_: yeah but is that better than having multiple async call ?
[07:44:51] moeabdol: has joined #ruby
[07:45:09] discounted: has joined #ruby
[07:45:44] Couch: has joined #ruby
[07:45:53] jaruga___: has joined #ruby
[07:46:03] roshanavand: has joined #ruby
[07:46:49] rbennacer: has joined #ruby
[07:48:15] dafull97: has left #ruby: ()
[07:48:20] PedramT: has joined #ruby
[07:49:49] skade: has joined #ruby
[07:51:16] lubekpl: has joined #ruby
[07:53:20] pawnbox_: has joined #ruby
[07:54:44] PedramT: has joined #ruby
[07:55:24] hahuang65: has joined #ruby
[07:56:00] evidex: has joined #ruby
[07:59:26] syndikate: Hey guys, how do I unit test a console input/output application?
[08:00:00] rbennacer: has joined #ruby
[08:01:57] Azure: has joined #ruby
[08:02:19] mikecmpbll: has joined #ruby
[08:03:35] apeiros: you don't. that's a systemtest.
[08:04:02] syndikate: I have this small test program which prints lines of output, is there a way to test that?
[08:04:05] apeiros: and you'd probably test it by running it with given outputs and compare expected outputs
[08:04:13] ledestin: has joined #ruby
[08:04:19] apeiros: and you'd probably test it by running it with given inputs and compare expected outputs
[08:04:54] nofxx: has joined #ruby
[08:04:54] nofxx: has joined #ruby
[08:04:55] syndikate: That's what I did
[08:05:06] syndikate: but I am asked to write tests
[08:05:17] syndikate: I see minitest, test-unit etc
[08:05:42] apeiros: "by running it" -> "via an automated test"
[08:05:48] apeiros: I thought that was obvious
[08:06:57] syndikate: Yeah, I think I understood that part. My confusion was when I write the test for a function which provides lines of output, how do I verify that
[08:07:24] apeiros: assert_equal "expected output", actual_output
[08:07:55] PedramT: has joined #ruby
[08:08:28] apeiros: or are you saying you don't know how to shell out in ruby and capture the stdout/stderr of the shelled out command?
[08:09:04] xcesariox: has joined #ruby
[08:09:06] syndikate: Maybe, coz for single line outputs I can write assert_equal "expect this, function_call
[08:09:21] syndikate: but for multiline output I can't figure
[08:09:40] apeiros: so you don't know how to write a string with multiple lines in it in ruby?
[08:09:53] syndikate: No, I don't know how to test that
[08:10:00] Moosashi: has joined #ruby
[08:10:01] syndikate: My program returns it correctly
[08:10:14] apeiros: assert_equal "wow\nmultiple\nlines", expected_output
[08:10:22] apeiros: there's absolutely no difference
[08:10:49] apeiros: a string with multiple lines is still a string. and you can still test it with assert_equal.
[08:11:03] TheWhip: has joined #ruby
[08:11:08] syndikate: yes, I had one more question, but I guess I need to work a bit more, Ty.
[08:11:22] troulouliou_div2: has joined #ruby
[08:12:12] syndikate: Ah yes, so this was the actual trouble
[08:12:27] syndikate: When I call the function, it actually calls another function which prints the output
[08:12:34] syndikate: So, assert is never recieving the output
[08:13:16] syndikate: That second function prints stuff line by line, and I can not think of a way to assert that as it is never returned
[08:13:19] drptbl: has joined #ruby
[08:13:42] apeiros: syndikate: for future reference - you do realize that "testing a function" is *not* "testing an input/output application", yes?
[08:13:52] apeiros: (also it's methods in ruby, not functions)
[08:14:51] RegulationD: has joined #ruby
[08:14:57] platzhirsch: has joined #ruby
[08:15:02] Yiota: has joined #ruby
[08:15:11] apeiros: if you want to test a method which prints output, you can do that by stubbing/mocking the IO it prints to. in this case, probably $stdout. just make sure you don't interfere with your test-framework.
[08:15:38] davedev24: has joined #ruby
[08:15:44] syndikate: Oh okay, methods. actually no I am not much aware of testing. Could you explain that a bit more
[08:16:43] apeiros: io = StringIO.new; sut = TestSubject.new(io); sut.method_which_prints_to_io; assert_equal "expected output", io.string
[08:17:09] apeiros: this assumes that you can pass in the io to which the method prints.
[08:17:30] dANOKELOFF: has joined #ruby
[08:17:57] apeiros: if you have to actually modify $stdout, then it's a bit more messy, but still same principle. `$stdout = io; method_which_prints_to_stdout; $stdout = STDOUT; …assert…`
[08:18:43] syndikate: Okay, just as a side note, theoretically how is testing of a function done then? Not by checking outputs?
[08:19:16] syndikate: yes, sorry methods
[08:19:38] apeiros: theoretically? by comparing expected behavior with actual behavior.
[08:19:54] syndikate: So that behavior, is output, right?
[08:20:42] apeiros: in ruby, there's 5 basic types of behavior: return value, yielded value(s), raised exception, thrown value, side effects
[08:20:52] apeiros: output to an IO falls into the side effects category
[08:21:11] apeiros: other side effects: modifications on the file system, changes to a database, etc.
[08:22:17] Xeago_: has joined #ruby
[08:22:22] yfeldblum: has joined #ruby
[08:22:23] pandaant: has joined #ruby
[08:23:08] apeiros: and when you test side effects, you have to decide whether you do a unit test, which is isolated, or a system test, which makes use of the external systems (db, filesystem, webservice etc.)
[08:23:10] djbkd: has joined #ruby
[08:23:17] kp666: has joined #ruby
[08:23:24] zapata: has joined #ruby
[08:23:36] apeiros: if you do a unit test, you isolate the test by using a test double (stubbing or mocking the test dependency, in your case the IO)
[08:24:31] apeiros: oh, failed to mention one important class of side effects: modifying the state of your application.
[08:25:16] syndikate: Oh okay, these were all unknown to me, I thought testing means validating output
[08:26:02] syndikate: Could you please help me figure with an example how I can write unit test for this function then? I know you have already explained, but I want to have a bit more clarity
[08:26:45] gdp: has joined #ruby
[08:26:48] syndikate: So, do I print the lines and make the method return true?
[08:26:52] apeiros: I've already provided you an example. two even.
[08:26:58] PedramT: has joined #ruby
[08:27:39] syndikate: Yes, I saw it. So this is my final doubt, once I print everything I make the function return true, is that how it should be?
[08:28:41] apeiros: I do not know what your method does. so how am I supposed to judge whether `true` is a sensible return value for it?
[08:29:47] htmldrum: has joined #ruby
[08:30:38] apeiros: I generally consider a status value, self or nil as sensible return values for methods with side effects. status values being an information on whether the side effect was applicable or failed. but depending on the specifics, I much rather have an exception instead.
[08:30:57] emilford: has joined #ruby
[08:32:31] tobiasvl: also you don't have to return true itself for the return value to be truthy
[08:32:39] tobiasvl: depending on what you test for
[08:34:03] syndikate: Currently I get a nil
[08:34:23] pawnbox: has joined #ruby
[08:34:38] apeiros: if the method is supposed to just print stuff, then nil is IMO fine.
[08:34:45] mrgrieves: has joined #ruby
[08:34:45] apeiros: c.f. Kernel#puts, which returns nil too.
[08:35:28] ujjain: This is my test https://gist.github.com/anonymous/77ebf42fa77ed3ec843d2f50b4f6bab7, but even though @timeout_exception is working during running of the code, it's empty during the test. So how can I test if this variable is set?
[08:35:51] jaguarmagenta: has joined #ruby
[08:36:13] emilkarl: has joined #ruby
[08:38:44] apeiros: ujjain: @ivars are scoped to the object they belong to. you can't just write @ivar anywhere and expect it to be the same as somewhere else.
[08:38:52] blackmes1: has joined #ruby
[08:39:02] apeiros: you'll have to read it from the object it's stored in.
[08:40:33] sleetdrop: has joined #ruby
[08:42:02] ujjain: apeiros, hmm, how do I do that exactly? I have class bla def something that has @timeout_exception printed fine.
[08:42:07] gamov: has joined #ruby
[08:42:17] ujjain: https://gist.github.com/anonymous/5468bcb900ba6777e11555d88d81b08b log.error works fine
[08:42:30] apeiros: ujjain: I'm sorry, I don't teach ruby 101. please read a book on ruby's object model.
[08:42:38] ujjain: ok, I'm sorry.
[08:44:28] igam`: has joined #ruby
[08:44:45] aupadhye: has joined #ruby
[08:44:52] platzhirsch: has left #ruby: ()
[08:47:22] pawnbox: has joined #ruby
[08:48:09] akem: has joined #ruby
[08:48:30] jenrzzz: has joined #ruby
[08:50:37] Alina-malina: has joined #ruby
[08:50:37] Alina-malina: has joined #ruby
[08:50:41] Amnez777: has joined #ruby
[08:54:10] Amnez777: has joined #ruby
[08:54:35] johnny56: has joined #ruby
[08:55:53] joonty: has joined #ruby
[08:58:20] zacstewart: has joined #ruby
[08:59:12] madgen: has joined #ruby
[09:00:23] nisstyre: has joined #ruby
[09:00:34] roadt_: has joined #ruby
[09:02:43] binaryplease: has joined #ruby
[09:03:07] Xiti`: has joined #ruby
[09:03:20] roshanavand: has joined #ruby
[09:03:32] emilkarl: has joined #ruby
[09:03:38] shevy: ujjain class Foo; @bar = 5; end will be different from: @bar = 5 without any classes, and also different from: class Foo; def initialize; @bar = 5; end; end
[09:04:18] devbug: has joined #ruby
[09:04:26] ujjain: ah ok, I just found http://www.sitepoint.com/understanding-object-model/. Do other programming languages like python have the same behaviour?
[09:04:37] ujjain: it's not just scoping, right?
[09:04:44] shevy: a simple way to test for it could be via reader methods; and default the @ivars to nil when they are not initialized
[09:05:25] shevy: I am not completely sure how python does it. They don't use a special @ symbol but use "self.foo =" or something like that right? not sure
[09:05:49] ujjain: ah ok, I see.
[09:06:27] shevy: I guess the most common way is the "class Foo; def initialize; @bar = 5; end; end" variant
[09:06:54] mikecmpbll: has joined #ruby
[09:07:10] shevy: for the second variant, I sometimes do something such as: module Foo; @config = YAML.load_file('path/to/lots/of/config/values.yml') ... like when I need a per-project config file
[09:07:34] ujjain: I'm trying to find out if @expectedException is in @messages, but the result is 4 instead of my expected 1. puts @messages.select{|m| m.include? "#{@expectedException}"}
[09:07:44] bronson: has joined #ruby
[09:07:49] shevy: hmm that looks weird
[09:08:09] ujjain: I don't know how you can even let gherkins tests check for variables though. I know that $bar and $foo worked fine for me, but not sure they were the solution.
[09:08:10] shevy: do you know the content of @messages?
[09:08:12] digneety: has joined #ruby
[09:08:33] shevy: ok so if the global variables work, it must be a scope issue
[09:09:18] shevy: can you put the code that works with the global variables on a gist?
[09:09:38] shevy: or the smallest, reproducible variant
[09:11:14] ujjain: https://gist.github.com/ujjain/3c76eb7610c9d832f5fb499106ccb357 this worked fine with dollars
[09:13:49] shevy: not reproducible ;)
[09:13:55] Yiota: has joined #ruby
[09:15:20] FooMunki: has joined #ruby
[09:18:02] maokomioko: has joined #ruby
[09:19:37] sigurding: has joined #ruby
[09:19:50] pawnbox: has joined #ruby
[09:20:48] enslavedtuna: has joined #ruby
[09:21:06] enslavedtuna: Time.mktime('1987-01-09T00:00:00+00:00')
[09:22:04] enslavedtuna: => 1987-01-01 00:00:00 UTC
[09:23:27] enslavedtuna: why does it lose the day when converting a string to timestamp?
[09:23:29] apeiros: interesting that you didn't get an outright exception
[09:23:41] djbkd: has joined #ruby
[09:23:47] apeiros: enslavedtuna: I presume you didn't bother to actually look the answer up in the docs?
[09:24:05] rbennacer: has joined #ruby
[09:24:50] apeiros: >> '1987-01-09T00:00:00+00:00'.to_i
[09:24:51] ruby[bot]: apeiros: # => 1987 (https://eval.in/565043)
[09:25:04] apeiros: ^ would be the reason. combined with how Time.mktime is supposed to be used.
[09:25:19] marr: has joined #ruby
[09:26:36] enslavedtuna: oh i was thrown of because i thought it did month correctly, but that was just because my example used 01 as it's month! I'll look up the correct usage, thanks
[09:26:52] solars: has joined #ruby
[09:27:16] toretore: you're looking for Time.iso8601
[09:28:11] apeiros: remember to `require 'time'` for that one.
[09:28:26] d0lph1n98: has joined #ruby
[09:29:02] blaxter: has joined #ruby
[09:29:37] workmad3: has joined #ruby
[09:30:02] govg: has joined #ruby
[09:30:12] joonty: has joined #ruby
[09:31:47] emilford: has joined #ruby
[09:32:33] PedramT: has joined #ruby
[09:33:42] Moosashi: has joined #ruby
[09:34:36] lessless: has joined #ruby
[09:35:09] lessless: is it possible to a rescue in the enumerator block similar to how it is used in the methods?
[09:35:27] apeiros: you can rescue anywhere
[09:35:42] apeiros: also, "is it possible" -> just try in pry (or irb)
[09:36:08] heftig: well, you can't do "do rescue end" but you can do "do begin rescue end end"
[09:36:27] apeiros: um, yeah, "valid syntax implied".
[09:37:55] sangeet: has joined #ruby
[09:38:00] TheWhip: has joined #ruby
[09:38:06] heftig: apeiros: I wonder if `do begin ... rescue ... end end` is common enough for `do ... rescue ... end` to be considered
[09:38:27] yfeldblum: has joined #ruby
[09:39:09] Caerus: ACTION greets #ruby
[09:39:22] apeiros: heftig: you could run an analysis over github and/or popular gems?
[09:40:10] sangeet: facing issue with installing carrierwave-base64 gem. Any help ?
[09:40:43] sgambino: has joined #ruby
[09:42:18] apeiros: sangeet: "facing issue" is your idea of a problem description?
[09:42:41] apeiros: also spammy "bump!!" and "!!" messages are not welcome.
[09:42:42] Caerus: gem install carrierwave-base64?
[09:43:06] ujjain: https://gist.github.com/ujjain/3813f80c03de8cae0fdc0704a9e25d6c is this proper indentation?
[09:43:41] apeiros: ujjain: ruby convention is 2 spaces
[09:43:44] apeiros: other than that, yes
[09:45:38] ujjain: thanks apeiros
[09:46:10] Caerus: whew carrierwave-base64 has 10 gem dependencies :o
[09:47:16] Caerus: *9* + itself
[09:48:39] PedramT: has joined #ruby
[09:50:14] Gasher: has joined #ruby
[09:50:15] enslavedtuna: toretore: That works great, thank you!
[09:51:57] rbennacer: has joined #ruby
[09:52:17] nullFxn: has joined #ruby
[09:53:05] shevy: oh this sangeet person
[09:53:10] ujjain: which end is too much here? https://gist.github.com/ujjain/8097742c0184a3b0ea137fcf28ac39b3
[09:53:17] shevy: is this like find waldo
[09:53:40] shevy: usually ensure should go into begin/rescue/end clause
[09:53:41] Pupeno: has joined #ruby
[09:54:07] shevy: http://stackoverflow.com/a/2192010/722915
[09:54:17] shevy: stackoverflow is really convenient :)
[09:54:32] shevy: I think Ox0dea or jhass told me what the share link is good for :P
[09:55:39] CausaMortis: has joined #ruby
[09:59:42] CausaMortis: has joined #ruby
[10:01:00] rbennacer: has joined #ruby
[10:01:03] nofxx: has joined #ruby
[10:01:03] nofxx: has joined #ruby
[10:02:41] mtkd: has joined #ruby
[10:03:42] Caerus: I need an opinion. Would you say WEB REST API has completely overtaken SOAP? or is there a case where a WEB SOAP Service would still be relevant/needed?
[10:04:34] blackgoat: has joined #ruby
[10:05:43] Caerus: I might be confused because the terms seem to overlap, I'm by no means versed in this matter so sorry in advance if it's dumb :P
[10:06:08] glcx: has joined #ruby
[10:06:13] Ox0dea: Caerus: What is WEB?
[10:06:23] ur5us: has joined #ruby
[10:06:29] Sebastia1Thorn: well, same same but different kind of. When i build stuff i build rest
[10:06:40] sgambino: has joined #ruby
[10:07:01] Ox0dea: http://i.imgur.com/pIvKZxD.gif
[10:07:02] Caerus: I guess web is redundant xD
[10:07:19] Ox0dea: I just didn't understand the all-caps.
[10:07:25] madgen: has joined #ruby
[10:07:29] Sebastia1Thorn: Ox0dea: i was just googleing for that one :D
[10:07:29] edwinvdgraaf: has joined #ruby
[10:09:19] Caerus: my bad, I guess it would be better to just do some more research about SOAP and REST.
[10:10:33] ferr: has joined #ruby
[10:11:05] Sebastia1Thorn: in my experience, SOAP is more used for enterprise software, where many 3rd party applications connect to it
[10:13:26] Caerus: it seems obsolete to me but since I have limited knowledge about I cant be sure it actually is.
[10:14:55] rbennacer: has joined #ruby
[10:17:37] Caerus: Ox0dea, lol @ gif
[10:22:29] nofxx: has joined #ruby
[10:23:05] n008f4g_: has joined #ruby
[10:23:51] voidDotClass: has joined #ruby
[10:24:11] voidDotClass: How do I convert a Date to unix milliseconds?
[10:24:43] anisha: has joined #ruby
[10:24:44] djbkd: has joined #ruby
[10:28:11] sdothum: has joined #ruby
[10:28:53] Caerus: voidDotClass, afaik ruby has no Date class. date = Time.now .That being said. I believe you could do date.to_i to get nix format
[10:29:17] skade: has joined #ruby
[10:29:19] mjuszczak: has joined #ruby
[10:29:30] Ox0dea: Caerus: Of course Ruby has a Date class.
[10:29:38] Ox0dea: voidDotClass: `date.to_time.to_i` will get you there.
[10:29:53] Caerus: i always get an error
[10:30:02] voidDotClass: Caerus, thanks
[10:30:17] Caerus: doing date = Date.now, voidDotClass read Ox0dea's
[10:30:23] blackmes1: has joined #ruby
[10:30:25] janelleb_: has joined #ruby
[10:30:37] Ox0dea: >> require 'date'; Date.today.to_time.to_i
[10:30:39] ruby[bot]: Ox0dea: # => 1462320000 (https://eval.in/565068)
[10:30:42] Ox0dea: Nailed it.
[10:31:07] voidDotClass: Caerus, if i have an incoming date coming in as unix milliseconds, and i want to save that to a db column in rails, any ideas what the best way to do that is?
[10:31:20] Caerus: ACTION cratered
[10:32:14] Ox0dea: voidDotClass: I bet your choice of database has a tailor-made column type for dates and times.
[10:32:22] Hanmac: depends on the database i would use Timestamp type
[10:32:22] comforte: has joined #ruby
[10:32:25] Caerus: <--- confusing other unsuspecting newbies since joining #ruby \o/
[10:32:42] emilford: has joined #ruby
[10:32:51] comforte: Hey, what's a small ruby installation actually in size on a disk? I am just using python and it's like 80M... like java :)
[10:32:52] voidDotClass: yeah it has a date column which i'm using
[10:33:05] voidDotClass: question is how to convert the timestamp into the date
[10:33:22] apeiros: voidDotClass, Ox0dea: mind you, Time#to_i will give you seconds, not milliseconds. but I hope you know how to get one from the other.
[10:33:59] voidDotClass: apeiros, yep, *1000
[10:34:03] Ox0dea: voidDotClass: Time has #to_date and Time.at accepts a Unix timestamp.
[10:34:04] apeiros: voidDotClass: and Time.at is the reverse
[10:34:05] Arahael: connor_goodwolf: you can get that down to about ~26MB fairly easily,
[10:34:12] Ox0dea: apeiros: o/
[10:34:19] apeiros: Ox0dea: sniper!
[10:34:44] Hanmac: hm did Time#to_f return the miliseconds or the nanoseconds?
[10:35:41] Ox0dea: I'm seeing microseconds here.
[10:35:48] shevy: I'm seeing dead people!
[10:36:16] shevy: I guess nanoseconds may only be useful for laser people
[10:36:39] jaguarmagenta: has joined #ruby
[10:38:36] apeiros: to_f is still seconds
[10:39:14] GodFather: has joined #ruby
[10:39:14] Ox0dea: >> Time.new.to_f
[10:39:15] ruby[bot]: Ox0dea: # => 1462358355.1393492 (https://eval.in/565069)
[10:39:30] Ox0dea: With some microsecond-y goodness as well.
[10:39:41] Ox0dea: Er, no, I guess those are nanoseconds.
[10:39:45] apeiros: yes, it includes a fractional part. yet still seconds ;-)
[10:40:09] apeiros: and iirc only milliseconds are precise, the microseconds can already deviate. but that's from memory, so might be wrong.
[10:40:40] Azure: has joined #ruby
[10:41:20] apeiros: Time#usec if you want the fractional part precisely.
[10:41:31] mdw: has joined #ruby
[10:41:33] Devalo: has joined #ruby
[10:41:34] syndikate: Hey again, so I have figured and is capturing stdio and comparing now
[10:41:36] Azure: has joined #ruby
[10:41:42] Caerus: ACTION double-checks...
[10:42:44] apeiros: ah, it was nanoseconds which Time#to_f can't represent: "Note that IEEE 754 double is not accurate enough to represent the number of nanoseconds since the Epoch"
[10:42:48] Caerus: "Beginning Ruby 2nd edition" only references Time class when introducing date and time :(
[10:43:48] PedramT: has joined #ruby
[10:46:12] Ox0dea: Caerus: That's probably because Time is in core, whereas Date is part of the standard library.
[10:46:24] Ox0dea: Still, quite an oversight. :/
[10:46:27] mjuszczak: has joined #ruby
[10:47:00] xcesariox: has joined #ruby
[10:47:20] Arahael: has left #ruby: ("WeeChat 1.0.1")
[10:47:30] joonty: has joined #ruby
[10:47:43] workmad3: Ox0dea: hmm... I thought Date was in core too, but DateTime wasn't, and there are extensions to Date in stdlib too
[10:47:56] Caerus: yeah, it's struck me as weird because I have some programming background but I thought it was the ruby way, I would have eventually stumbled upon it tho, haven't really browsed stdlib.
[10:48:13] Caerus: thanks for the clarification
[10:48:28] Ox0dea: >> Date rescue $! # workmad3
[10:48:29] ruby[bot]: Ox0dea: # => #<NameError: uninitialized constant Date ...check link for more (https://eval.in/565070)
[10:48:52] apeiros: workmad3: Date used to be in stdlib. not sure how it is now since the rewrite of it in C
[10:49:18] apeiros: apparently it's still in stdlib (having caught up with the backlog :D)
[10:51:57] workmad3: ACTION goes back to writing bash
[10:52:39] apeiros: that sounds like fun
[10:52:44] apeiros: ACTION goes back to seed the mssql db
[10:54:22] workmad3: apeiros: yeah... writing a script to separate a couple of apps that were sharing a database (the decision was made years ago, taken this long for it to finally be sorted)
[10:54:40] skade: has joined #ruby
[10:55:24] sigurding: has joined #ruby
[10:56:29] skade: has joined #ruby
[10:56:59] charliesome: has joined #ruby
[10:57:01] Ishido: has joined #ruby
[10:57:04] skade: has joined #ruby
[11:00:26] rbennacer: has joined #ruby
[11:00:51] shadowdf: has joined #ruby
[11:01:04] idefine: has joined #ruby
[11:02:25] Ropeney: has joined #ruby
[11:03:54] Gasher: has joined #ruby
[11:04:53] shadowdf: has left #ruby: ()
[11:08:40] PedramT: has joined #ruby
[11:08:41] Pupeno: has joined #ruby
[11:09:01] Bloomer: has joined #ruby
[11:09:35] bronson: has joined #ruby
[11:09:42] ur5us: has joined #ruby
[11:09:55] rbennacer: has joined #ruby
[11:10:35] Pupeno_: has joined #ruby
[11:10:49] voidDotClass: has joined #ruby
[11:10:52] gnufied: has joined #ruby
[11:11:46] voidDotClass: has joined #ruby
[11:11:52] stef204: has joined #ruby
[11:12:48] voidDotClass: has joined #ruby
[11:13:45] voidDotClass: has joined #ruby
[11:14:48] fsvehla: has joined #ruby
[11:15:53] stef204: has joined #ruby
[11:17:26] PedramT: has joined #ruby
[11:17:40] freerobby: has joined #ruby
[11:17:59] jaiks: has joined #ruby
[11:18:09] johnmilton: has joined #ruby
[11:18:22] madgen: has joined #ruby
[11:19:26] deadnull_: has joined #ruby
[11:19:47] flashpoint9: has joined #ruby
[11:19:56] rodfersou: has joined #ruby
[11:22:34] Meeh: has joined #ruby
[11:22:50] sepp2k: has joined #ruby
[11:25:28] djbkd: has joined #ruby
[11:27:53] yardenbar: has joined #ruby
[11:28:03] ldnunes: has joined #ruby
[11:30:10] shevy: code written by the old egyptians
[11:30:34] IrishGringo: has joined #ruby
[11:33:32] emilford: has joined #ruby
[11:33:37] TomyLobo: has joined #ruby
[11:33:48] sgambino: has joined #ruby
[11:38:56] blackmes1: has joined #ruby
[11:40:33] CausaMortis: has joined #ruby
[11:45:43] freerobby: has joined #ruby
[11:49:24] skade: has joined #ruby
[11:50:13] godzillaenlacasa: has joined #ruby
[11:52:17] Xeago_: has joined #ruby
[11:52:23] PedramT: has joined #ruby
[11:55:27] PedramT: has joined #ruby
[11:56:17] Caerus: ACTION wakes up from keyboard nap \o/
[11:57:11] Caerus: 512 ram makes OS page a lot hehe, even linux.
[11:57:21] Caerus: see ya later #ruby
[11:57:29] Ox0dea: What year is it?
[11:58:02] Caerus: i'm poor :P
[11:58:12] PedramT: has joined #ruby
[11:58:39] Caerus: Ox0dea, you have a good day kind sire, I'm off to sleep.
[11:58:52] Ox0dea: Caerus: Bon voyage, mon amie!
[11:59:32] skade: has joined #ruby
[12:01:22] joonty: has joined #ruby
[12:02:17] minimalism: has joined #ruby
[12:02:37] mrgrieves: has joined #ruby
[12:03:38] cgfbee: has joined #ruby
[12:04:58] Stan: has joined #ruby
[12:05:59] synthroid: has joined #ruby
[12:06:14] Hanmac: has joined #ruby
[12:07:17] Pupp3tm4st3r: has joined #ruby
[12:07:46] Ishido: has joined #ruby
[12:08:05] sigurding: has joined #ruby
[12:08:12] nadir: has joined #ruby
[12:08:31] roshanavand: has joined #ruby
[12:08:34] Carella: has joined #ruby
[12:09:16] dcope: has joined #ruby
[12:09:39] mdw: has joined #ruby
[12:10:09] jaguarmagenta: has joined #ruby
[12:10:26] lxsameer: has joined #ruby
[12:10:54] Vile`: has joined #ruby
[12:11:17] soc42: has joined #ruby
[12:14:33] shadeslayer: has joined #ruby
[12:15:20] rbennacer: has joined #ruby
[12:16:13] RegulationD: has joined #ruby
[12:17:09] pawnbox: has joined #ruby
[12:17:26] maokomioko: has joined #ruby
[12:23:05] solocshaw: has joined #ruby
[12:24:40] deadnull_: has joined #ruby
[12:25:54] djbkd: has joined #ruby
[12:28:08] crystal77: has joined #ruby
[12:28:10] scepticulous: I think the time when 'even linux' was appropriate is gone, isnt it ?
[12:34:09] zacstewart: has joined #ruby
[12:34:23] emilford: has joined #ruby
[12:34:33] adaedra: Ox0dea: you should replace the last 'e' with a space here.
[12:34:58] Ox0dea: adaedra: You're being serious, and I just don't get it.
[12:35:38] Ox0dea: Is it correct that you plenk for marks of punctuation consisting of more than one "piece"?
[12:37:46] adaedra: But I'm saying shit; the e can actually be correct. (But can also not be, I don't know Caerus enough to tell.)
[12:38:53] JakFrist: has joined #ruby
[12:39:28] idefine: has joined #ruby
[12:39:56] rbennacer: has joined #ruby
[12:39:59] rodfersou: has joined #ruby
[12:40:35] A124: has joined #ruby
[12:44:43] skade: has joined #ruby
[12:46:33] Takumo: Hi all, I'm trying to installa gem (sass/compass) which has native extensions on an Alpine linux docker container
[12:46:41] nerium: has joined #ruby
[12:46:43] Takumo: however libffi is giving me the error: achine `x86_64-alpine-linux' not recognized
[12:46:54] Takumo: how do I pass build options to specify the target etc?
[12:47:47] Takumo: ah its compass
[12:48:23] malconis: has joined #ruby
[12:49:22] futilegames: has joined #ruby
[12:51:35] GinoMan2440: has joined #ruby
[12:51:40] chouhoulis: has joined #ruby
[12:52:18] GodFather: has joined #ruby
[12:53:58] flashpoint9: has joined #ruby
[12:54:15] Ebok: has joined #ruby
[12:54:17] akkmaxon: has joined #ruby
[12:54:17] malconis: has joined #ruby
[12:55:54] Dysp: has joined #ruby
[12:57:09] Ishido: has joined #ruby
[12:57:49] norc: has joined #ruby
[12:58:00] norc: Greetings #ruby
[12:58:11] nullwarp: has joined #ruby
[12:58:16] sgambino: has joined #ruby
[12:58:25] ramortegui: has joined #ruby
[12:58:26] cdg: has joined #ruby
[12:59:08] cdg: has joined #ruby
[12:59:37] lubekpl: norc: greetings traveler!
[13:01:05] norc: So. Are there any Ruby/Ruby-like implementations suitable for embedding into other languages?
[13:01:27] ChiefAlexander: has joined #ruby
[13:02:12] norc: apeiros: Sweet. By Matz too, don't know how I missed this.
[13:02:28] PedramT: has joined #ruby
[13:03:12] Dysp: Mjello. Anyone with knowledge of RubyXL? I am trying to iterate over rows until it is empty and then write. I'm inexperienced with both RubyXL and loops, so help would be appreciated.
[13:04:43] Dysp: https://gist.github.com/Dysp/7392e44edd3d951318c5666c5f1827d0
[13:04:45] norc: Dysp: Please tell us your actual problem. :)
[13:05:13] Dysp: My best try so far. I am definetly not understand how it works. And the tutorials/guides on RubyXL are sparse.
[13:06:08] Dysp: The code breaks with "nomethoderror" when it arrives at an empty cell
[13:06:25] Dysp: Undefined method '[]' for nil:NilClass
[13:06:39] Dysp: empty row*
[13:06:48] norc: Dysp: Which line on?
[13:07:24] norc: Dysp: Also note, the Ruby way to test whether a variable is nil is Object#nil?
[13:07:32] norc: >> "abc".nil?
[13:07:34] ruby[bot]: norc: # => false (https://eval.in/565202)
[13:07:42] deavid: has joined #ruby
[13:08:21] mjuszczak: has joined #ruby
[13:08:44] futilegames: has joined #ruby
[13:09:11] Dysp: norc: Thank you. Changing the line to if val.nil? == false
[13:09:19] Dysp: Doesn't really change anything
[13:09:37] norc: Dysp: Use "unless val.nil?" or "if !val.nil?"
[13:09:51] norc: Dysp: It is just style, not a functional change.
[13:10:03] akem: has joined #ruby
[13:10:56] bronson: has joined #ruby
[13:10:57] Dysp: Yeah. Hm. I dunno how to attack this.
[13:11:07] norc: Dysp: The problem can only arise when your block is yielded so that row is nil.
[13:11:18] norc: Now the real question is why that happens.
[13:11:32] norc: It basically tries to execute the following:
[13:11:35] norc: >> nil[0]
[13:11:36] ruby[bot]: norc: # => undefined method `[]' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/565204)
[13:13:39] emilford: has joined #ruby
[13:14:17] Mia: has joined #ruby
[13:14:17] Mia: has joined #ruby
[13:14:44] Dysp: norc: Part of my problem is that I don't know what "worksheet" actually holds. It's an array with huuuuge values.
[13:16:16] umdstu: has joined #ruby
[13:16:25] norc: Dysp: I would byebug/pry into it and explore it interactively to figure out the problem
[13:16:41] Dysp: I am using pry - how would you do it with Pry?
[13:16:44] IrishGringo: has joined #ruby
[13:17:05] norc: What does workbook[0] return?
[13:17:27] lxsameer: has joined #ruby
[13:17:37] norc: Does it return a Workbook object?
[13:17:41] norc: A Worksheet?
[13:17:56] umdstu: no matter how many times I build ruby with openssl, it never seems to actually be included in the final ruby build. always “cannot load such file”
[13:18:08] umdstu: ruby-2.2.2 and openssl-1.0.1
[13:18:35] Dysp: workbook[0] returns a worksheet
[13:18:49] Dysp: worksheet[0] returns row 0
[13:20:23] sfr^: has joined #ruby
[13:21:14] PedramT: has joined #ruby
[13:22:44] tlaxkit: has joined #ruby
[13:23:11] Dysp: norc: Basicly what I wanna do is iterate through column A until it hits an empty cell - and then write my data. While I normally can solve these newbie-problems, this problem is a combination of areas I poorly understand. Loops & RubyXL API. If it was just one thing that was wrong, it would be easier to solve.
[13:23:24] Dysp: Too many variables in my misunderstanding ^^
[13:23:59] norc: Dysp: Think of them as just arrays.
[13:25:14] futilegames: has joined #ruby
[13:25:24] TheWhip: has joined #ruby
[13:25:27] norc: Dysp: Also note that "puts obj.to_s" is redundant. puts will implicitly call to_s no matter what you pass to it.
[13:25:35] norc: So you can just use "puts val"
[13:25:42] norc: Anyhow, the code looks fine at first glance.
[13:26:13] Dysp: But it doesn't work and I don't know why not.
[13:26:25] Dysp: Damn programming. So hard.
[13:26:36] TomyLobo: has joined #ruby
[13:26:42] djbkd: has joined #ruby
[13:27:13] drptbl_: has joined #ruby
[13:27:31] norc: Dysp: Does access through [] work properly? i.e. worksheet[0][0]
[13:28:11] Ishido: has joined #ruby
[13:28:27] Dysp: norc: Yes. I guess.
[13:30:48] Dysp: https://gist.github.com/Dysp/c13c791b3e92d206918284d9055dd5e9
[13:31:01] norc: Dysp: Well the best thing you can try is throwing this into your pry: worksheet.each.with_index { |row, i| p i, row }
[13:31:14] norc: Try to identify the offending row.
[13:31:32] ramfjord: has joined #ruby
[13:31:42] rodfersou: has joined #ruby
[13:31:43] swills: has joined #ruby
[13:32:02] rbennacer: has joined #ruby
[13:32:08] Dysp: I don't understand what you just wrote.
[13:32:17] PedramT: has joined #ruby
[13:32:49] rbennacer: has joined #ruby
[13:33:18] norc: Dysp: .each returns an Enumerator object which can be chained with other things like .with_index to inject an index into the block.
[13:33:35] norc: Dysp: "p obj" is basically "puts obj.inspect"
[13:33:54] diegoviola: has joined #ruby
[13:34:29] Elvin: has joined #ruby
[13:34:37] Dysp: *Looking Enumerables up*
[13:34:44] norc: Dysp: *Enumerator
[13:35:18] norc: Dysp: Though Enumerable methods return Enumerator objects.
[13:36:05] norc: If you are familiar with Iterators from say C++ they are the same concept.
[13:36:56] Dysp: Just going to ask you if it was iterators
[13:37:00] Dysp: Due to a google search
[13:37:17] Dysp: Problem is - I am new to everything. Ruby is my first programming language.
[13:38:00] Dysp: So even when people answer my basic questions, they tend to introduce several new terms I have to look up and understand.
[13:38:08] norc: Dysp: The idea is simple. If your class has some sort of container semantics and implements the method #each, yielding each successive element, then you can include the module "Enumerable" and get all the methods for free.
[13:38:10] Dysp: But I am getting there. Slowly.
[13:39:04] freerobby: has joined #ruby
[13:39:36] Dysp: See, here is what I mean. You think you are answering a question with a simple answer, but you are in fact not (no offence, I really do appreciate help and getting these kind of answer provokes me to look up terminology I do not comprehend).
[13:39:36] ChiefAlexander: has joined #ruby
[13:40:14] jonathanwallace1: has joined #ruby
[13:40:33] Dysp: I have a sense of what a class is. A container I dont know of. The word "semantics" I need to look up, because english is not my first language. Method I get. Yield is something I understand poorly.
[13:40:41] norc: Dysp: Oh, I kind of stepped over your remark that Ruby is your first programming language, my apologies mate.
[13:40:44] Dysp: etc etc. Oh well, no time for whine. Google awaits. Thank you so much for your help ^^
[13:41:25] moeabdol: has joined #ruby
[13:42:54] norc: Dysp: Once you grasp the concept of Enumerators, you understood one of the core concepts of Ruby (these are basically one of the most common Ruby things around)
[13:43:13] `tim`: has joined #ruby
[13:43:21] Hanmac: Dysp: like a Bookshelf object can have a #each method (and Enumerable) to iterate over the Book objects inside of it.
[13:43:48] Dysp: Indeed! And that is my next step. I will go through some more guides and videos to get a grasp of things
[13:43:56] bsharitt: has joined #ruby
[13:44:06] Dysp: I shall return! But now. Off work I am. Thank you for your attention
[13:45:07] PedramT: has joined #ruby
[13:47:14] Xeago_: has joined #ruby
[13:47:22] duckpuppy: has joined #ruby
[13:48:14] Carella: has joined #ruby
[13:48:22] Veejay: has left #ruby: ("WeeChat 0.4.2")
[13:48:27] norc: Ox0dea: By the way, what happened to your suggestion to Enumerable#any? and the like for things like ary.any?(Fixnum)
[13:48:44] shevy: did he suggest to ruby core?
[13:49:28] Limix: has joined #ruby
[13:50:24] Xeago__: has joined #ruby
[13:51:24] sfr^: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[13:51:47] norc: A feature request including patches implementing it were made if memory serves right.
[13:51:58] fmcgeough: has joined #ruby
[13:52:35] vitinho: has joined #ruby
[13:53:10] mrgrieves: has joined #ruby
[13:54:05] SilverKey: has joined #ruby
[13:54:24] skade: has joined #ruby
[13:54:43] zacstewart: has joined #ruby
[13:54:58] bsharitt: has joined #ruby
[13:55:09] tax: has joined #ruby
[13:56:18] GodFather: has joined #ruby
[13:56:19] Xeago_: has joined #ruby
[14:00:35] whippythellama: has joined #ruby
[14:01:05] freerobby: has joined #ruby
[14:01:13] mrgrieves: has joined #ruby
[14:01:36] chouhoulis: has joined #ruby
[14:03:00] elusiveother: has left #ruby: ("Leaving")
[14:03:20] kfpratt: has joined #ruby
[14:03:33] idefine_: has joined #ruby
[14:04:55] rojomisin: has joined #ruby
[14:06:13] idefine_: has joined #ruby
[14:07:26] idletask: has joined #ruby
[14:07:31] idefine: has joined #ruby
[14:07:47] JesseH2: has joined #ruby
[14:07:51] Ispira: has joined #ruby
[14:10:31] openstruct: has joined #ruby
[14:11:27] n008f4g_: has joined #ruby
[14:12:04] dhollinger: has joined #ruby
[14:13:16] CloCkWeRX: has left #ruby: ()
[14:13:20] patientj: has joined #ruby
[14:13:41] chopin: has joined #ruby
[14:13:51] noService: has joined #ruby
[14:15:44] nofacade: has joined #ruby
[14:17:05] eljimmy: has joined #ruby
[14:17:13] M-mistake: has joined #ruby
[14:17:15] idefine: has joined #ruby
[14:17:45] enslavedtuna: has left #ruby: ()
[14:17:49] enslavedtuna: has joined #ruby
[14:18:42] agent_white: has joined #ruby
[14:19:38] madgen: has joined #ruby
[14:20:25] Robtop__: has joined #ruby
[14:22:17] idefine: has joined #ruby
[14:22:22] M-mistake: has joined #ruby
[14:23:05] PedramT: has joined #ruby
[14:25:37] tAn: has joined #ruby
[14:25:47] TheWhip: has joined #ruby
[14:26:49] idefine_: has joined #ruby
[14:26:55] bronson: has joined #ruby
[14:27:27] djbkd: has joined #ruby
[14:27:49] solocshaw: has joined #ruby
[14:28:07] 7F1AA241K: has joined #ruby
[14:29:07] ldnunes: has joined #ruby
[14:29:36] idefine: has joined #ruby
[14:29:47] Polysics: has joined #ruby
[14:29:58] filipechagas: has joined #ruby
[14:30:34] GodFather: has joined #ruby
[14:30:49] tAn: has joined #ruby
[14:31:13] statu: has joined #ruby
[14:31:15] idefine: has joined #ruby
[14:33:22] madgen: has joined #ruby
[14:35:59] Xeago_: has joined #ruby
[14:36:53] FooMunki: has joined #ruby
[14:37:37] PedramT: has joined #ruby
[14:38:31] LastWhisper____: has joined #ruby
[14:38:45] cjbottaro: has joined #ruby
[14:39:00] ifsp: has joined #ruby
[14:39:01] jhack: has joined #ruby
[14:41:26] idefine: has joined #ruby
[14:41:43] idefine: has joined #ruby
[14:41:43] Xiti: has joined #ruby
[14:42:52] davedev24: has joined #ruby
[14:48:16] mtkd: has joined #ruby
[14:50:41] polishdub: has joined #ruby
[14:51:39] lubekpl: has joined #ruby
[14:52:01] hobodave: has joined #ruby
[14:54:51] rippa: has joined #ruby
[14:55:05] boontdustie: has joined #ruby
[14:55:48] LastWhisper____: has joined #ruby
[14:59:14] ravishankarjha: has joined #ruby
[15:01:56] blackmes1: has joined #ruby
[15:02:16] SilverKey: has joined #ruby
[15:02:59] Infra-Red: has joined #ruby
[15:04:40] smathy: has joined #ruby
[15:06:37] PedramT: has joined #ruby
[15:08:33] themightyabby: has joined #ruby
[15:10:09] troulouliou_div2: has joined #ruby
[15:10:11] GnuYawk: has joined #ruby
[15:10:16] GnuYawk: has joined #ruby
[15:10:41] Xeago_: has joined #ruby
[15:11:03] noService: has joined #ruby
[15:15:55] ravishankarjha: who else is watching RailsConf?
[15:16:46] ule: ravishankarjha: streaming?
[15:16:59] bougyman: ACTION not watching
[15:17:43] SilverKey: has joined #ruby
[15:18:28] ravishankarjha: any resource to learn threading?
[15:21:12] rhg331: has joined #ruby
[15:22:15] shevy: we need rubyconf!
[15:26:04] rojomisin: has joined #ruby
[15:26:06] n008f4g_: has joined #ruby
[15:27:42] ravishankarjha: redDotRubyConf is coming in June
[15:28:10] djbkd: has joined #ruby
[15:28:18] circ-user-TARuU: has joined #ruby
[15:28:44] circ-user-TARuU: has left #ruby: ()
[15:28:51] ravishankarjha: i'm waiting for announcement on Ruby 3.0
[15:28:57] Phasee: has joined #ruby
[15:29:17] dopie: has joined #ruby
[15:29:24] jonathanwallace1: has joined #ruby
[15:31:20] idefine: has joined #ruby
[15:32:36] amclain: has joined #ruby
[15:34:15] PedramT: has joined #ruby
[15:34:41] noService: has joined #ruby
[15:36:17] cjbottaro: has joined #ruby
[15:36:29] shevy: isn't that a bit early?
[15:36:30] Maturin: has joined #ruby
[15:36:58] elifoster: has joined #ruby
[15:37:01] havenwood: ravishankarjha: Wrong conference for Ruby 3. That'd be RubyConf.
[15:37:05] havenwood: ravishankarjha: 2020
[15:37:29] ravishankarjha: hmm.. but i'm optimistic :)
[15:39:05] Guest38: has joined #ruby
[15:39:54] moeabdol: has joined #ruby
[15:40:07] shibly: has joined #ruby
[15:40:50] skade: has joined #ruby
[15:40:53] shibly: has left #ruby: ()
[15:42:18] Yiota: has joined #ruby
[15:44:11] chouhoulis: has joined #ruby
[15:45:14] chouhoulis: has joined #ruby
[15:45:56] LoneHermit: has joined #ruby
[15:48:12] bronson: has joined #ruby
[15:49:08] ramfjord: has joined #ruby
[15:51:27] duderonomy: has joined #ruby
[15:51:34] Carella: has joined #ruby
[15:52:22] bruce_lee: has joined #ruby
[15:52:22] bruce_lee: has joined #ruby
[15:53:08] davedev24: has joined #ruby
[15:53:41] [Butch]: has joined #ruby
[15:54:10] synthroid: has joined #ruby
[15:54:45] asker__: has joined #ruby
[15:55:50] asker__: hey guys, has anyone tried to setup swagger with rails ?
[15:56:48] The_Phoenix: has joined #ruby
[15:57:25] dmr8: has joined #ruby
[15:57:38] The_Phoenix: has joined #ruby
[15:58:29] apeiros: ?rails asker__
[15:58:29] ruby[bot]: asker__: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[15:58:42] nando293921: has joined #ruby
[15:59:52] ravishankarjha: has joined #ruby
[16:00:08] The_Phoenix: has joined #ruby
[16:00:26] VeryBewitching: has joined #ruby
[16:01:30] kareeoleez: has joined #ruby
[16:02:34] The_Phoenix: has joined #ruby
[16:03:33] RegulationD: has joined #ruby
[16:06:59] whathappens: has joined #ruby
[16:08:00] solocshaw: has joined #ruby
[16:08:40] CausaMortis: has joined #ruby
[16:09:01] Yiota: has joined #ruby
[16:09:30] CausaMortis: has joined #ruby
[16:10:06] bnobu: has joined #ruby
[16:10:11] dmr8: has joined #ruby
[16:11:35] 18WAAV85X: has joined #ruby
[16:12:37] djbkd: has joined #ruby
[16:12:40] madgen: has joined #ruby
[16:14:02] skolman_: has joined #ruby
[16:16:09] GnuYawk: has joined #ruby
[16:16:12] GnuYawk: has joined #ruby
[16:16:15] nisstyre: has joined #ruby
[16:17:03] Ishido: has joined #ruby
[16:17:18] SCHAAP137: has joined #ruby
[16:19:48] kareeoleez: has joined #ruby
[16:21:52] chadhs: has joined #ruby
[16:22:22] pawnbox: has joined #ruby
[16:25:25] Maturin: has left #ruby: ("Leaving")
[16:26:04] nrd_pxs: has joined #ruby
[16:28:53] kareeoleez: has joined #ruby
[16:30:59] ferr1: has joined #ruby
[16:31:42] gevans: has joined #ruby
[16:32:01] Rutix: has joined #ruby
[16:32:01] Rutix: has joined #ruby
[16:35:33] `tim`: has joined #ruby
[16:36:04] godzillaenlacasa: has joined #ruby
[16:36:09] panpainter: has joined #ruby
[16:36:37] xcesariox: has joined #ruby
[16:37:31] tAn: has joined #ruby
[16:38:11] CausaMortis: has joined #ruby
[16:38:22] scepticulous: has joined #ruby
[16:40:27] madgen: has joined #ruby
[16:41:09] Coldblackice: has joined #ruby
[16:41:20] ramfjord: has joined #ruby
[16:42:20] Limix: has joined #ruby
[16:42:34] rcvalle: has joined #ruby
[16:42:39] joaumg: has joined #ruby
[16:43:19] tinylobsta: has joined #ruby
[16:43:40] bluOxigen_: has joined #ruby
[16:44:26] rbennacer: has joined #ruby
[16:45:20] A124: has joined #ruby
[16:45:50] banister: has joined #ruby
[16:46:00] Guest37414: has joined #ruby
[16:46:55] blaxter: has joined #ruby
[16:47:04] kareeoleez: has joined #ruby
[16:47:29] pawnbox: has joined #ruby
[16:48:54] giz|work: has joined #ruby
[16:49:16] pawnbox: has joined #ruby
[16:49:50] Cohedrin: has joined #ruby
[16:49:55] bluOxigen: has joined #ruby
[16:51:10] A124: has joined #ruby
[16:52:48] mtkd: has joined #ruby
[16:52:59] madgen: has joined #ruby
[16:53:27] mikecmpbll: has joined #ruby
[16:53:33] idefine: has joined #ruby
[16:54:46] Ishido: has joined #ruby
[16:54:59] shevy: hmm what was the simple way to split up an array into chunk-sizes of 80 elements each?
[16:55:11] sarbs: has joined #ruby
[16:56:20] A124: has joined #ruby
[16:56:24] charliesome: has joined #ruby
[16:56:40] shevy: ah each slice
[16:56:56] mtkd: has joined #ruby
[16:59:53] pietr0: has joined #ruby
[17:01:39] `tim`: has joined #ruby
[17:02:46] sepp2k1: has joined #ruby
[17:04:06] roelof: has joined #ruby
[17:04:41] tinylobsta: has joined #ruby
[17:05:21] kareeoleez: has joined #ruby
[17:05:24] roelof: Can anyone explain this to me : https://gist.github.com/rwobben/93daef3effeb7f0f459d49959146c229
[17:06:13] sgambino: has joined #ruby
[17:06:16] symm-: has joined #ruby
[17:06:42] justin_pdx: has joined #ruby
[17:08:19] pipework: roelof: Read it. Look for "got" and look at your code on line 7. You aren't getting what you think you're getting.
[17:08:50] roelof: yes, that I know but I do not see why im getting the wrong output
[17:09:02] whathappens: has joined #ruby
[17:09:43] roelof: at some way ruby makes a hash instead of a string
[17:09:44] pipework: roelof: investigate what `name` is.
[17:09:52] Ishido: has joined #ruby
[17:10:02] rojomisin: has joined #ruby
[17:11:07] pipework: The test failure is telling you that name isn't what you think it is. That's how you read the test. Go fix it.
[17:11:37] pipework: Look at name after L3, puts it, do whatever you want to get at it. Pry if you like
[17:11:46] roelof: aha, name is a hash : hello(:name => 'dolly')
[17:12:08] pipework: Correct, as L4 of the first file depicted. https://gist.github.com/rwobben/93daef3effeb7f0f459d49959146c229#file-error-message-L4
[17:12:22] roelof: so, I have to take the contents of :name first out
[17:13:15] llua: and remove the additional whitespace around it
[17:14:20] diegoaguilar: has joined #ruby
[17:14:33] Puffball: has joined #ruby
[17:14:35] yardenbar: has joined #ruby
[17:15:55] banister: has joined #ruby
[17:17:21] vF3hNGxc47h8: has joined #ruby
[17:17:25] tinylobsta: has joined #ruby
[17:17:45] DoubleMalt: has joined #ruby
[17:18:25] GnuYawk: has joined #ruby
[17:18:32] GnuYawk: has joined #ruby
[17:18:49] Carella: has joined #ruby
[17:19:45] Carella: has joined #ruby
[17:20:36] mikecmpbll: has joined #ruby
[17:20:51] spiette: has joined #ruby
[17:21:17] roelof: pipework: thanks, I got it working
[17:21:45] pipework: roelof: great! cheers
[17:22:23] roelof: next time first take a look what the input is , Another learning point
[17:22:57] hahuang61: has joined #ruby
[17:23:32] kareeoleez: has joined #ruby
[17:23:35] mjuszczak: has joined #ruby
[17:23:40] minimalism: has joined #ruby
[17:24:50] haylon: has joined #ruby
[17:25:26] haylon: In my gemspec, can I specify a source per dependency, or should I do that in the Gemfile?
[17:26:27] apeiros: sources are not the concern of a gemspec
[17:26:29] mjuszczak: has joined #ruby
[17:26:57] charliesome: has joined #ruby
[17:27:24] mjuszczak: has joined #ruby
[17:29:25] sj: has joined #ruby
[17:29:39] djbkd_: has joined #ruby
[17:30:02] idefine: has joined #ruby
[17:31:21] LastWhisper____: has joined #ruby
[17:32:02] LastWhisper____: has joined #ruby
[17:32:24] Ebok: has joined #ruby
[17:32:42] karapety_: has joined #ruby
[17:32:45] blackmes1: has joined #ruby
[17:33:16] tercenya: has joined #ruby
[17:34:02] idefine: has joined #ruby
[17:35:32] haylon: apeiros: I should do it in the Gemfile explicitly then
[17:36:25] nanoz: has joined #ruby
[17:37:08] claw: has joined #ruby
[17:37:43] kareeoleez: has joined #ruby
[17:38:17] Infra-Red: has joined #ruby
[17:38:40] codecop: has joined #ruby
[17:39:16] b7u3f1ng3r: has joined #ruby
[17:39:40] rbennacer: has joined #ruby
[17:40:27] rbennacer: has joined #ruby
[17:40:32] jonathanwallace1: has joined #ruby
[17:41:33] hobodave: has joined #ruby
[17:42:31] chouhoul_: has joined #ruby
[17:44:28] whathappens: has joined #ruby
[17:44:56] fsvehla: has joined #ruby
[17:49:04] lubekpl: has joined #ruby
[17:49:23] zacstewart: has joined #ruby
[17:50:30] PedramT: has joined #ruby
[17:52:26] fsvehla: has joined #ruby
[17:54:06] blackmes1: has joined #ruby
[17:55:30] deadnull_: has joined #ruby
[17:56:04] Elvin: has joined #ruby
[17:56:44] tAn: has joined #ruby
[17:56:44] karapetyan: has joined #ruby
[17:57:10] mwlang: has joined #ruby
[17:57:34] karapetyan: has joined #ruby
[17:58:06] kaleido: has joined #ruby
[17:58:16] solocshaw1: has joined #ruby
[17:59:56] karapety_: has joined #ruby
[18:00:24] kaleido: x = 5 and i want to create server 1 - server5 based on whatever value x has
[18:00:36] karapetyan: has joined #ruby
[18:00:36] kaleido: im a noob but im also drawing a blank but it seems like it should be very simple
[18:01:10] whathappens: has joined #ruby
[18:01:15] freerobby: has joined #ruby
[18:01:51] mjuszczak: has joined #ruby
[18:02:24] LastWhisper____: has joined #ruby
[18:02:34] apeiros: what do you mean by server1 - server5? strings? local variables? methods?
[18:03:47] `tim`: has joined #ruby
[18:04:18] apeiros: kaleido: what have you tried so far?
[18:04:38] tbeg: has joined #ruby
[18:04:51] kaleido: staring at sublime text with a blank expression on my face, honestly. im trying to do this while on a series of conf calls
[18:05:12] apeiros: on a series of conf calls?
[18:05:24] apeiros: it's an interview question?
[18:06:19] kaleido: no, i promise im not cheating. i dont even do this for more than a hobby
[18:06:41] apeiros: what ways do you know in ruby to iterate from 1 to x?
[18:07:00] davedev24: has joined #ruby
[18:07:10] cjbottaro: has joined #ruby
[18:07:43] idefine: has joined #ruby
[18:07:57] jgt: has joined #ruby
[18:08:02] edwinvdgraaf: has joined #ruby
[18:08:06] kaleido: im trying to write a very basic webpage that will generate tmsh commands for an f5
[18:08:35] chopin: has joined #ruby
[18:08:42] kaleido: could i (1..x).each do |yay|
[18:09:05] SilverKey: has joined #ruby
[18:09:18] apeiros: ok. that's a good start. and how do you append to an array?
[18:09:39] jonathanwallace1: has joined #ruby
[18:10:23] idefine_: has joined #ruby
[18:11:55] greves: has joined #ruby
[18:12:44] greves: hello, just trying to install the bourbon gem on windows and just installed ruby via the installer, getting this error message and nothing helpful from a quick google: C:\ruby\2.3.0\bin\ruby.exe: No such file or directory -- /cygdrive/c/ruby/2.3.0/bin/gem (LoadError)
[18:13:05] apeiros: kaleido: yes. and given `yay = 2`, how do you get "server2"?
[18:13:41] zeroDivisible: has joined #ruby
[18:14:42] nofacade: has joined #ruby
[18:14:53] kaleido: servers = [] ; servers.push("server" + yay) ?
[18:15:00] drusepth: has joined #ruby
[18:15:42] apeiros: the question was only concerned about the `"server" + yay` part. but that won't work because String#+ expects a String, and yay is an Integer
[18:15:50] apeiros: >> yay = 2; "server" + yay
[18:15:51] ruby[bot]: apeiros: # => no implicit conversion of Fixnum into String (TypeError) ...check link for more (https://eval.in/565525)
[18:16:10] apeiros: so if you want to use +, you have to convert yay to a String first
[18:16:13] kaleido: servers = [] ; servers.push("server" + yay.to_s) ?
[18:16:32] kaleido: or i have to do .to_s before the push?
[18:16:37] apeiros: ok. yes. now you're lacking the (1..x).each do |yay|
[18:16:47] apeiros: you do the to_s before the push in your code.
[18:17:13] idefine: has joined #ruby
[18:17:16] kaleido: do i have to create the empty array first or will a push create it?
[18:17:19] tvsutton: has joined #ruby
[18:17:19] apeiros: servers.push("server" + yay.to_s) -> execution order is `yay.to_s`, then `"server" + …`, then servers.push(…)`
[18:17:50] apeiros: kaleido: think about it - you call methods on objects. on which object would you call push on if it doesn't exist yet?
[18:18:17] kaleido: gotcha, but i need to create it outside of the block, or ill blow it away with every iteration
[18:18:32] apeiros: so what's your final code?
[18:19:55] aeterne: has joined #ruby
[18:20:16] kaleido: servers = [] ; x = 5 ; (1..x).each do |yay| { yay.to_s ; server = "server" + yay ; servers.push("server")
[18:20:37] apeiros: it's either `each do |yay|`, or `each { |yay|`
[18:20:46] apeiros: never both, do and {
[18:20:55] jenrzzz: has joined #ruby
[18:20:55] jenrzzz: has joined #ruby
[18:20:59] kaleido: ok, got it
[18:20:59] apeiros: and you're missing either the `end` or the `}`
[18:21:16] apeiros: and last: servers.push(server)
[18:21:32] apeiros: servers.push("server") would just push the string "server", not the content of the variable `server`
[18:21:36] kaleido: right, cause its a variable now
[18:21:48] karapetyan: has joined #ruby
[18:22:06] baweaver: >> string = 'nope'; a = []; a.push('string')
[18:22:07] ruby[bot]: baweaver: # => ["string"] (https://eval.in/565526)
[18:22:42] apeiros: kaleido: when you've shown me a finished version of the code, I'll show you an idiomatic solution.
[18:24:51] CausaMortis: has joined #ruby
[18:25:04] nisstyre: has joined #ruby
[18:25:16] postmodern: has joined #ruby
[18:25:17] idefine: has joined #ruby
[18:25:18] djbkd: has joined #ruby
[18:26:19] SilverKey: has joined #ruby
[18:26:39] djbkd: has joined #ruby
[18:27:25] davedev24: has joined #ruby
[18:27:44] skade: has joined #ruby
[18:27:54] kaleido: apeiros: maybe https://gist.github.com/ekaleido/5759671945167ca674ae703dc1327425
[18:28:21] kaleido: i changed names but its essentially the same
[18:28:37] apeiros: name.to_s won't change name
[18:28:49] apeiros: it returns a new object
[18:28:54] apeiros: so `name = name.to_s`
[18:29:21] apeiros: and if client_id is an integer, you'll need to_s there too
[18:29:28] apeiros: anyway, here the idiomatic solution:
[18:29:28] charliesome: has joined #ruby
[18:29:30] apeiros: >> x = 3; servers = (1..x).map { |i| "server#{i}" }; servers
[18:29:31] ruby[bot]: apeiros: # => ["server1", "server2", "server3"] (https://eval.in/565547)
[18:29:32] PedramT: has joined #ruby
[18:29:43] gamer5: has joined #ruby
[18:29:53] dionysus69: has joined #ruby
[18:29:57] SilverKey: has joined #ruby
[18:30:02] voidDotClass: has joined #ruby
[18:30:14] skade: has joined #ruby
[18:30:20] nertzy2: has joined #ruby
[18:31:11] zacstewart: has joined #ruby
[18:32:04] synthroid: has joined #ruby
[18:32:16] lwu__: has joined #ruby
[18:33:08] jonathanwallace1: has joined #ruby
[18:33:20] jenrzzz_: has joined #ruby
[18:33:26] e4xit: has joined #ruby
[18:33:34] karapetyan: has joined #ruby
[18:36:29] karapety_: has joined #ruby
[18:36:32] RegulationD: has joined #ruby
[18:36:47] ChiefAlexander: has joined #ruby
[18:37:21] charliesome: has joined #ruby
[18:39:12] Asher: has joined #ruby
[18:40:00] noService: has joined #ruby
[18:40:31] sp4rrow: has joined #ruby
[18:43:00] chouhoulis: has joined #ruby
[18:44:36] whathappens: has joined #ruby
[18:44:39] jonathanwallace1: has joined #ruby
[18:44:43] ChiefAlexander: has joined #ruby
[18:46:01] whathapp_: has joined #ruby
[18:46:24] mjuszczak: has joined #ruby
[18:46:35] flashpoint9: has joined #ruby
[18:47:54] voidDotClass: has joined #ruby
[18:49:12] ldnunes: has joined #ruby
[18:51:22] hahuang65: has joined #ruby
[18:51:48] Elvin: has joined #ruby
[18:52:23] x77686d: has joined #ruby
[18:53:32] `tim`: has joined #ruby
[18:53:40] swills: has joined #ruby
[18:54:02] pglombardo: has joined #ruby
[18:54:52] b7u3f1ng3r: has left #ruby: ()
[18:55:07] kaleido: apeiros: thank you very much again
[18:55:08] b7u3f1ng3r: has joined #ruby
[18:56:07] synthroid: has joined #ruby
[18:56:20] Dysp: has joined #ruby
[18:56:46] kirun: has joined #ruby
[18:58:44] Dysp: What is the Rails channel?
[18:58:59] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[18:59:12] apeiros: it's well hidden
[18:59:55] Dysp: Haha, I simply just tried rails
[19:01:25] crystal77: has joined #ruby
[19:02:30] bnobu: has joined #ruby
[19:02:45] failshell: has joined #ruby
[19:04:41] jonathanwallace1: has joined #ruby
[19:06:04] patientj: has left #ruby: ()
[19:06:26] craysiii: has joined #ruby
[19:06:35] shevy: yeah sorta weird
[19:06:43] shevy: there used to be #ruby-lang - now it is just #ruby
[19:06:56] shevy: and we have #rubyonrails - could just do it #rails and ask questions for railways!
[19:07:03] sp4rrow: has joined #ruby
[19:07:09] shevy: or #homebrew and ask how to make beer
[19:08:09] mjuszczak: has joined #ruby
[19:08:13] tinylobsta: has joined #ruby
[19:09:42] griffindy: has joined #ruby
[19:11:08] cpruitt: has joined #ruby
[19:11:47] PedramT: has joined #ruby
[19:12:09] whathappens: has joined #ruby
[19:13:12] `tim`: has joined #ruby
[19:13:26] yqt: has joined #ruby
[19:14:03] sarbs: has joined #ruby
[19:16:01] Devalo: has joined #ruby
[19:16:44] Moosashi: has joined #ruby
[19:17:39] freerobby: has joined #ruby
[19:18:41] der-landgraf: has joined #ruby
[19:19:42] jonathanwallace1: has joined #ruby
[19:20:29] rbennacer: has joined #ruby
[19:24:07] bnobu: has joined #ruby
[19:26:31] n008f4g_: has joined #ruby
[19:26:47] P4Titan: has joined #ruby
[19:27:45] P4Titan: Hello all. Is there a particular reason that in ruby (though unlike C), if statements with conditions that return 0, still pass as true
[19:28:25] noService: has joined #ruby
[19:28:44] Moosashi: has joined #ruby
[19:28:58] mostlybadfly: has joined #ruby
[19:29:15] apeiros: P4Titan: yes, the reason is that only false and nil are considered falsy
[19:29:18] havenwood: P4Titan: In Ruby only `nil` and `false` are falsey. Everything else is truthy.
[19:29:36] P4Titan: interesting
[19:29:47] P4Titan: I guess I just have to work with that then
[19:29:57] yfeldblum: has joined #ruby
[19:30:14] havenwood: >> 0.nonzero?
[19:30:15] ruby[bot]: havenwood: # => nil (https://eval.in/565579)
[19:30:46] Ebok: has joined #ruby
[19:31:13] djbkd_: has joined #ruby
[19:32:22] finisherr: has joined #ruby
[19:32:51] Silox|: has joined #ruby
[19:33:42] noService: has joined #ruby
[19:37:41] idefine_: has joined #ruby
[19:38:28] whathappens: has joined #ruby
[19:40:06] FooMunki: has joined #ruby
[19:41:48] jgt: has joined #ruby
[19:44:29] ferr: has joined #ruby
[19:44:36] whathappens: has joined #ruby
[19:45:05] IrishGringo: has joined #ruby
[19:45:06] idefine: has joined #ruby
[19:45:22] whathapp_: has joined #ruby
[19:45:36] bdnelson: has joined #ruby
[19:46:01] whathapp_: has joined #ruby
[19:49:23] chopin: has joined #ruby
[19:50:04] dikaio: has joined #ruby
[19:50:15] whathappens: has joined #ruby
[19:50:16] jenrzzz: has joined #ruby
[19:50:16] jenrzzz: has joined #ruby
[19:50:25] Phasee: has joined #ruby
[19:50:29] bronson: has joined #ruby
[19:50:42] tao_: has joined #ruby
[19:51:24] tax: has joined #ruby
[19:51:38] rubirc: hi guys, there is like this method called 'gem'
[19:51:44] rubirc: its really hard to google it up on what it does
[19:51:50] rubirc: maybe someone has a link or a suggestion what to google instead?
[19:52:46] baweaver: rubirc http://guides.rubygems.org/
[19:54:05] bdnelson: has joined #ruby
[19:54:06] LastWhisper____: has joined #ruby
[19:54:21] rubirc: baweaver: http://guides.rubygems.org/patterns/
[19:54:22] chouhoulis: has joined #ruby
[19:54:57] chouhoul_: has joined #ruby
[19:55:10] craysiii: has joined #ruby
[19:55:48] KervyN: has joined #ruby
[19:56:18] Infra-Red: has joined #ruby
[19:56:43] whathappens: has joined #ruby
[19:56:48] chouhoul_: has joined #ruby
[19:59:16] pipework: rubirc: it comes from bundler look there
[19:59:30] whathappens: has joined #ruby
[20:00:31] havenwood: rubirc: https://github.com/rubygems/rubygems/blob/master/lib/rubygems/core_ext/kernel_gem.rb#L13-L72
[20:01:03] chouhoulis: has joined #ruby
[20:01:19] havenwood: pipework: it's from RubyGems though, so ships with Ruby
[20:01:53] emilford: has joined #ruby
[20:01:58] pipework: havenwood: Ah yeah I've seen that, I didn't know that was rubygems adding it though. Explains why I didn't really find where it was before in bundler's source. :D
[20:02:46] Authenticator: has left #ruby: ()
[20:06:50] al2o3-cr: has joined #ruby
[20:06:51] blackmes1: has joined #ruby
[20:07:13] dellavg: has joined #ruby
[20:07:18] SilverKey: has joined #ruby
[20:08:07] LoneHerm_: has joined #ruby
[20:08:41] grenierm: has joined #ruby
[20:09:45] Ebok: has joined #ruby
[20:10:02] n008f4g_: has joined #ruby
[20:10:05] jaruga___: has joined #ruby
[20:10:54] roshanavand1: has joined #ruby
[20:11:05] synthroid: has joined #ruby
[20:12:08] nerium: has joined #ruby
[20:12:35] bnobu: has joined #ruby
[20:13:59] scepticulous: has joined #ruby
[20:14:00] Gasher: has joined #ruby
[20:15:54] kaleido: is there a simple/elegant way to take a value from one array and make it the key, and a value from a second array and make it the value in a hash? the values will have the same index
[20:16:17] baweaver: &ri Enumerable#zip
[20:16:18] `derpy: http://ruby-doc.org/core-2.3.0/Enumerable.html#method-i-zip
[20:17:23] kaleido: baweaver: thanks :)
[20:17:58] baweaver: kaleido: take time to read through all of that document
[20:18:07] baweaver: including the other methods
[20:18:28] baweaver: Enumerable is where a lot of the power of Ruby comes into play, and having a good understanding of it is well worth the time.
[20:18:50] kaleido: thank you, i will
[20:19:03] firstdayonthejob: has joined #ruby
[20:20:25] GodFather: has joined #ruby
[20:21:19] nofxx: has joined #ruby
[20:21:19] nofxx: has joined #ruby
[20:22:45] Synthead: has joined #ruby
[20:22:56] dikaio: has joined #ruby
[20:23:44] idefine_: has joined #ruby
[20:24:23] andromedian: has joined #ruby
[20:24:50] chopin: has joined #ruby
[20:26:10] stannard: has joined #ruby
[20:27:06] cdg: has joined #ruby
[20:28:51] idefine_: has joined #ruby
[20:30:03] ledestin: has joined #ruby
[20:30:33] sp4rrow: has joined #ruby
[20:31:55] yqt: has joined #ruby
[20:31:56] djbkd: has joined #ruby
[20:32:08] Puffball: has joined #ruby
[20:32:22] weemsledeux: has joined #ruby
[20:34:37] pawnbox: has joined #ruby
[20:37:39] idefine: has joined #ruby
[20:37:43] northrup: has joined #ruby
[20:38:20] jhack: has joined #ruby
[20:38:33] SilverKey: has joined #ruby
[20:38:54] giz|work: has joined #ruby
[20:39:20] roshanavand: has joined #ruby
[20:40:37] AlexRussia: has joined #ruby
[20:41:12] lxsameer: has joined #ruby
[20:41:27] Devalo: has joined #ruby
[20:43:35] karapetyan: has joined #ruby
[20:46:30] ur5us: has joined #ruby
[20:48:52] chrisja: has joined #ruby
[20:50:23] Moosashi: has joined #ruby
[20:50:51] stannard: has joined #ruby
[20:52:06] chouhoulis: has joined #ruby
[20:55:00] idefine: has joined #ruby
[20:55:29] zacstewart: has joined #ruby
[20:56:15] sdothum: has joined #ruby
[20:57:32] sp4rrow: has joined #ruby
[20:57:56] emilford: has joined #ruby
[20:58:29] ixti: has joined #ruby
[20:59:19] Shardik: has joined #ruby
[21:01:04] roshanavand: has joined #ruby
[21:01:49] neanderslob: has joined #ruby
[21:02:51] giz|work: has joined #ruby
[21:03:02] skolman_: has joined #ruby
[21:03:08] jaruga___: has joined #ruby
[21:04:15] ruby[bot]: havenwood: # => 0 (https://eval.in/565619)
[21:04:22] havenwood: oops, wrong channel >.>
[21:06:38] mikecmpbll: has joined #ruby
[21:08:53] madgen: has joined #ruby
[21:09:01] noService: has joined #ruby
[21:10:47] djbkd: has joined #ruby
[21:11:58] lomex: has joined #ruby
[21:12:35] icedp: has joined #ruby
[21:12:41] nofxx: has joined #ruby
[21:12:58] roshanavand: has joined #ruby
[21:15:02] elifoster: has joined #ruby
[21:16:29] flashpoint9: has joined #ruby
[21:17:03] zacstewart: has joined #ruby
[21:19:25] idefine: has joined #ruby
[21:19:44] andromedian: has joined #ruby
[21:20:54] andromedian: what does def set_results_layout(default: :grid)
[21:20:54] andromedian: def set_results_layout(default: :grid) what does exactly (default: grid) does? Where I can read more in order to understand it?
[21:21:28] adaedra: between ( and ) are the function parameters
[21:22:02] adaedra: the form with key: value are called keyword arguments or "kwargs" for short. The latter should be a good thing to give Google for lot of resources on them.
[21:23:50] rodfersou: has joined #ruby
[21:26:58] mdw: has joined #ruby
[21:27:41] sp4rrow: has joined #ruby
[21:28:21] roshanavand: has joined #ruby
[21:28:51] jenrzzz: has joined #ruby
[21:28:51] jenrzzz: has joined #ruby
[21:31:05] whathappens: has joined #ruby
[21:31:14] _blizzy_: has joined #ruby
[21:32:13] idefine: has joined #ruby
[21:32:31] whathapp_: has joined #ruby
[21:32:34] vdamewood: has joined #ruby
[21:32:35] FooMunki: has joined #ruby
[21:32:40] djbkd_: has joined #ruby
[21:33:25] kareeoleez: has joined #ruby
[21:33:39] milesmatthias: has joined #ruby
[21:35:04] idefine_: has joined #ruby
[21:35:31] andromedian: thanks adaedra I understand that is a keyword argument but is this consider like one? I guess I don't get the ruby code inside the argument
[21:35:59] adaedra: I don't understand your question
[21:36:31] n|9932: has joined #ruby
[21:36:34] adaedra: (default: :grid): your declaring a keyword argument `default` which has for default value `:grid`
[21:36:54] n|9932: ruby is confsing
[21:36:59] n|9932: confusing*
[21:37:05] adaedra: !badnick n|9932
[21:37:05] ruby[bot]: +bb n|9932!*@*$#ruby-banned *!*@172.56.20.107$#ruby-banned
[21:37:07] ruby[bot]: ruby[bot] kicked n|9932: is not suitable for this channel, see http://ruby-community.com/pages/user_rules
[21:37:30] andromedian: so default: is a ruby keyword that sets the default value for the argument if it is not passed?
[21:38:02] adaedra: it defines a kwarg named default that has :grid as default argument
[21:38:19] adaedra: the naming in your sample is a bit confusing, let's go back to foobar.
[21:38:32] whathappens: has joined #ruby
[21:38:40] andromedian: I think I understand what you are saying but thanks for elaborating
[21:38:45] adaedra: given a method foo(bar: :baz)
[21:39:05] adaedra: you declare a kwarg `bar` which has a default value of :baz
[21:39:21] adaedra: inside the method, you get a variable `bar` which is the value of this argument
[21:39:44] adaedra: you can either call `foo(bar: :something)`, and then bar would be `:something`
[21:39:56] adaedra: or just `foo()`, then `bar` would be `:baz`
[21:40:16] adaedra: it's like foo(bar = :baz) with "classical" arguments
[21:40:42] eljimmy: has joined #ruby
[21:42:10] sepp2k: has joined #ruby
[21:43:33] andromedian: and can I do foo(:something) ? or i need to do foo(bar: :something:)?
[21:43:45] adaedra: foo(bar: :something)
[21:43:52] whathappens: has joined #ruby
[21:44:13] andromedian: ok thanks a lot! adaedra
[21:44:16] adaedra: it's the difference between old arguments and kwargs: you have to name the latter
[21:44:33] adaedra: but look them up, there's many good resources that explains them better than I would here
[21:44:41] adaedra: and don't hesitate to play with them
[21:46:23] skade: has joined #ruby
[21:47:16] x77686d: has joined #ruby
[21:47:42] YP-QMUL-W: has joined #ruby
[21:48:58] diegoaguilar: has joined #ruby
[21:49:46] whathappens: has joined #ruby
[21:49:46] andromedian: Thanks again adaedra
[21:50:28] lkba: has joined #ruby
[21:50:28] whathapp_: has joined #ruby
[21:50:48] Madplatypus: has joined #ruby
[21:51:54] gizmore: has joined #ruby
[21:52:19] IrishGringo: has joined #ruby
[21:53:01] `tim`: has joined #ruby
[21:53:14] brent__: has joined #ruby
[21:54:24] mtkd: has joined #ruby
[21:56:19] madgen: has joined #ruby
[21:58:55] tjohnson: has joined #ruby
[21:59:46] x77686d: has joined #ruby
[22:00:38] tvon: has joined #ruby
[22:00:46] banister: has joined #ruby
[22:02:17] rbennacer: has joined #ruby
[22:02:45] xlegoman: has joined #ruby
[22:05:04] jenrzzz: has joined #ruby
[22:09:12] troulouliou_div2: has joined #ruby
[22:09:42] Moosashi: has joined #ruby
[22:12:53] djbkd: has joined #ruby
[22:13:24] YP-QMUL-W: has joined #ruby
[22:15:02] nando293921: has joined #ruby
[22:15:36] sp4rrow: has joined #ruby
[22:17:31] mikecmpbll: has joined #ruby
[22:17:43] Devalo: has joined #ruby
[22:18:34] idefine: has joined #ruby
[22:18:34] djbkd: has joined #ruby
[22:19:53] d0nn1e: has joined #ruby
[22:23:18] shevy: why are there so few games using ruby?
[22:23:49] workmad3: shevy: because game devs suck
[22:24:10] rbennacer: has joined #ruby
[22:24:12] weaksauce: scripting languages in general are not a big game maker's choice... you have to give away the source and it's a pain to package
[22:24:30] workmad3: weaksauce: well, if you want to bring reasons to the discussion, those are valid points :)
[22:24:32] failshell: has joined #ruby
[22:25:27] workmad3: ACTION is too tired for rational discussion and is going to bed
[22:25:38] baweaver: that and they don't handle well for intensive games
[22:26:32] baweaver: JRuby / Scala / Kotlin / Groovy would be better if you want something Ruby-like to make a game in
[22:27:22] baweaver: MRI doesn't work well with it. See RPG Maker XP, MV, and MV Ace
[22:27:34] emilford: has joined #ruby
[22:27:43] baweaver: though they use a very screwy version of 1.9.2 to be fair
[22:28:13] rbennacer: has joined #ruby
[22:29:44] flashpoint9: has joined #ruby
[22:29:45] |2701: has joined #ruby
[22:32:05] karapetyan: has joined #ruby
[22:32:19] zeroDivisible: has joined #ruby
[22:34:59] shevy: workmad3 haha yeah I can relate to that :)
[22:36:40] zenlot6: has joined #ruby
[22:37:03] panpainter: has joined #ruby
[22:37:45] hahuang65: has joined #ruby
[22:41:37] ChiefAlexander: has joined #ruby
[22:41:45] robbyoconnor: has joined #ruby
[22:42:43] roshanavand: has joined #ruby
[22:43:09] sp4rrow: has joined #ruby
[22:44:27] idefine: has joined #ruby
[22:45:45] diego1: has joined #ruby
[22:46:07] diego1: has joined #ruby
[22:46:33] claw: has joined #ruby
[22:47:30] malconis: has joined #ruby
[22:49:37] ChiefAlexander: has joined #ruby
[22:50:18] whathappens: has joined #ruby
[22:50:57] whathapp_: has joined #ruby
[22:52:11] dmr8: has joined #ruby
[22:52:48] bronson: has joined #ruby
[22:52:58] dikaio: has joined #ruby
[22:57:13] croberts: has joined #ruby
[23:00:29] Prawnzy: has joined #ruby
[23:05:27] weemsledeux: has joined #ruby
[23:06:03] YP-QMUL-W: has joined #ruby
[23:09:25] danostrowski: has joined #ruby
[23:10:04] moeabdol: has joined #ruby
[23:11:10] grenierm: has joined #ruby
[23:11:24] rkazak: has joined #ruby
[23:11:52] voidDotClass: has joined #ruby
[23:12:32] citizentwo: has joined #ruby
[23:13:02] jenrzzz: has joined #ruby
[23:13:02] jenrzzz: has joined #ruby
[23:15:38] milesmatthias: has joined #ruby
[23:15:39] failshell: has joined #ruby
[23:17:46] n008f4g_: has joined #ruby
[23:20:39] Vile`: has joined #ruby
[23:21:10] htmldrum: has joined #ruby
[23:25:50] lomex: has joined #ruby
[23:25:56] benlieb: has joined #ruby
[23:26:00] dome22xl: has joined #ruby
[23:29:07] jenrzzz_: has joined #ruby
[23:34:09] djbkd_: has joined #ruby
[23:34:11] QORRiE: has joined #ruby
[23:34:28] cdg: has joined #ruby
[23:36:52] robbyoconnor: has joined #ruby
[23:38:29] GodFather: has joined #ruby
[23:39:43] godzillaenlacasa: has joined #ruby
[23:39:54] flashpoint9: has joined #ruby
[23:42:23] whathappens: has joined #ruby
[23:43:08] whathapp_: has joined #ruby
[23:43:27] zacstewart: has joined #ruby
[23:44:02] ftj: has joined #ruby
[23:44:05] SparkMasterTape: has joined #ruby
[23:47:31] citizentwo: has joined #ruby
[23:47:52] jdjeffers: has joined #ruby
[23:48:25] jdjeffers: Hello everyone. Would this be an appropriate place to ask about bundler and building gem native extensions?
[23:51:08] failshell: has joined #ruby
[23:58:13] dudepare: hi i'm fairly new, what does this statement mean?
[23:58:17] dudepare: def tag_name(tag_name); end
[23:58:21] dudepare: an empty function?
[23:59:38] benzrf: dudepare: yeah