« Back to channel list

#ruby - 07 January 2016

« Back 1 day Forward 1 day »
[00:00:31] kKkKkKkKkKkK: has joined #ruby
[00:01:52] avenj: has joined #ruby
[00:01:56] avenj: has joined #ruby
[00:02:32] mistermocha: has joined #ruby
[00:02:42] art-solopov: has joined #ruby
[00:03:26] bubbys: has joined #ruby
[00:03:34] Ox0dea: Mixins and Template Method aren't quite the same thing, but they're certainly orthogonal.
[00:03:42] mostlybadfly: has joined #ruby
[00:04:10] Ox0dea: >> class C; include Enumerable; end; C.new.reduce rescue $!
[00:04:11] ruboto: Ox0dea # => #<NoMethodError: undefined method `each' for #<C:0x41297fd4>> (https://eval.in/498390)
[00:04:28] Ox0dea: Observe that Enumerable just barrels along and tries to invoke #each. It's part of the contract.
[00:05:07] lacuna: has joined #ruby
[00:05:07] lacuna: has joined #ruby
[00:08:54] mistermocha: has joined #ruby
[00:10:04] guacamole: has joined #ruby
[00:11:39] mistermocha: has joined #ruby
[00:12:14] RegulationD: has joined #ruby
[00:15:32] FernandoBasso: has joined #ruby
[00:15:40] mistermocha: has joined #ruby
[00:17:47] choke: has joined #ruby
[00:19:20] jamw: has joined #ruby
[00:25:19] mistermocha: has joined #ruby
[00:26:40] baweaver: has joined #ruby
[00:27:35] pwnd_nsfw: has joined #ruby
[00:28:56] cmolenda: has joined #ruby
[00:29:07] charliesome: has joined #ruby
[00:29:20] dlitvak: has joined #ruby
[00:31:27] Ltnt_Hawkeye: has joined #ruby
[00:32:40] mary5030: has joined #ruby
[00:32:47] choke: has joined #ruby
[00:36:36] tvw: has joined #ruby
[00:38:09] agent_white: has joined #ruby
[00:38:13] s2013: has joined #ruby
[00:38:17] guacamole: has joined #ruby
[00:38:25] agent_white: has left #ruby: ()
[00:39:01] chipotle: has joined #ruby
[00:39:49] DonOtreply: has joined #ruby
[00:39:52] dlitvak: has joined #ruby
[00:40:23] infinitone: has joined #ruby
[00:40:50] mistermo_: has joined #ruby
[00:40:55] domgetter: has joined #ruby
[00:42:09] devbug: has joined #ruby
[00:43:53] bkxd: has joined #ruby
[00:44:03] tvw: has joined #ruby
[00:44:59] colegatron: has joined #ruby
[00:45:25] Scripore: has joined #ruby
[00:46:32] shevy: ljarvis wheee :D https://bugs.ruby-lang.org/issues/11191
[00:48:07] choke: has joined #ruby
[00:48:48] N|993125: has joined #ruby
[00:48:49] guacamole: has joined #ruby
[00:50:21] CloCkWeRX: has joined #ruby
[00:52:29] northfurr: has joined #ruby
[00:54:55] Ltnt_Hawkeye: has joined #ruby
[00:55:41] celly: has joined #ruby
[01:00:27] dlitvak_: has joined #ruby
[01:01:26] NoTroutAboutIt: has joined #ruby
[01:01:49] haylon: has joined #ruby
[01:02:06] guacamole: has joined #ruby
[01:02:57] mduca: has joined #ruby
[01:03:25] dling: has joined #ruby
[01:05:08] choke: has joined #ruby
[01:05:33] pdoherty: has joined #ruby
[01:09:29] freerobby: has joined #ruby
[01:09:54] freerobby1: has joined #ruby
[01:09:58] ta: has joined #ruby
[01:11:13] guacamole: has joined #ruby
[01:13:22] blackmesa: has joined #ruby
[01:14:27] guacamole: has joined #ruby
[01:14:36] zast: has joined #ruby
[01:14:41] aadam21: has joined #ruby
[01:14:50] NoTroutAboutIt: has joined #ruby
[01:16:26] mary5030: has joined #ruby
[01:16:49] mfb2: has joined #ruby
[01:17:48] choke: has joined #ruby
[01:19:16] cpruitt: has joined #ruby
[01:19:20] jottr: has joined #ruby
[01:19:21] guacamole: has joined #ruby
[01:19:27] mfb2: has joined #ruby
[01:19:55] haraigoshi: has joined #ruby
[01:20:21] vikaton: has joined #ruby
[01:22:22] northfurr: has joined #ruby
[01:22:42] Majora_: has joined #ruby
[01:22:59] scottj: has joined #ruby
[01:23:53] Majora_: http://ideone.com/mAQItG <<-- Can someone explain this to me?
[01:23:58] Majora_: I feel like this should have worked.
[01:24:18] jamw: has joined #ruby
[01:24:52] f00dMonsta: has joined #ruby
[01:25:28] tubulife-: has joined #ruby
[01:26:52] northfurr: has joined #ruby
[01:28:33] Ox0dea: Majora_: Your code there is attempting to calculate `nil + 1 + 2 + 3`.
[01:28:42] Ox0dea: Tell me, what is `nil` + 1?
[01:28:54] Majora_: But then I did accumulator = yield...
[01:28:58] choke: has joined #ruby
[01:29:27] Majora_: And I have to initialize the variable "accumulator" somehow... right?
[01:30:40] lacuna_: has joined #ruby
[01:30:51] Ox0dea: >> [1,2,3].reduce(6) { |a, b| a + b } # Majora_
[01:30:52] ruboto: Ox0dea # => 12 (https://eval.in/498503)
[01:31:18] Ox0dea: #reduce takes an optional initial accumulator, but what do you suppose it does if you don't provide one?
[01:31:38] Majora_: It just adds them normally... right?
[01:32:04] guacamole: has joined #ruby
[01:32:08] blub: how do you tell if you were passed an argument
[01:32:35] Majora_: um... I don't know? You mean like inject(0)?
[01:33:13] Majora_: You're saying I have to add an argument to Inject?
[01:33:27] Ox0dea: Majora_: Not yet.
[01:33:48] Ox0dea: But what does Enumerable#inject use as the default accumulator if not `nil`?
[01:34:16] Ox0dea: Which defaults to...?
[01:34:27] Majora_: Oh. I guess I don't know then.
[01:34:34] Ox0dea: But, like, work it out.
[01:34:47] baweaver: There's a first for everything Ox0dea
[01:35:02] DonOtreply: has joined #ruby
[01:35:37] Ox0dea: [0], you say?
[01:36:07] djbkd: has joined #ruby
[01:36:24] choke: has joined #ruby
[01:36:32] baweaver: first things first
[01:36:36] Majora_: ACTION waves to choke
[01:36:45] baweaver: I have a first for code
[01:37:13] baweaver: what came first, the memo or the accumulator
[01:37:33] Majora_: Is that a joke?
[01:37:38] Majora_: Or a literal question
[01:38:06] blub: http://stackoverflow.com/a/8705431/5753949 barf
[01:38:09] blub: is that really all there is
[01:38:24] Ox0dea: https://i.imgflip.com/wy1im.jpg
[01:39:00] Majora_: blub: Is that like if block_given?
[01:39:20] baweaver: Majora_: first
[01:40:10] dlitvak: has joined #ruby
[01:40:23] Ox0dea: blub: The second answer is much better.
[01:40:44] baweaver: [1,2,3,4].reduce { |accumulator, item| puts "Accumulator: #{accumulator}" accumulator + item }
[01:40:48] baweaver: run that Majora_
[01:40:51] dlitvak: has joined #ruby
[01:40:57] baweaver: [1,2,3,4].reduce { |accumulator, item| puts "Accumulator: #{accumulator}"; accumulator + item }
[01:41:17] baweaver: what's the first value of the accumulator?
[01:41:20] Majora_: http://ideone.com/mAQItG
[01:41:22] baweaver: it's first somewhere else too.
[01:41:24] Majora_: I already figured it out.
[01:41:26] blub: its more brittle
[01:41:33] Ox0dea: blub: What, the second?
[01:41:41] jottr_: has joined #ruby
[01:42:02] aadam21: has joined #ruby
[01:42:40] Ox0dea: If you want to use a sentinel value called NO_ARGUMENT as an argument, you deserve to have a bad time.
[01:42:49] blub: ya, for the reason andrew grimm gave there
[01:42:56] craysiii: has joined #ruby
[01:42:56] lemur: has joined #ruby
[01:43:26] Majora_: baweaver: What is that supposed to show me again?
[01:44:13] baweaver: ze first value of ze reduce function if there's no accumulator initial value given
[01:44:59] Majora_: baweaver: Ah.
[01:45:25] cmolenda: has joined #ruby
[01:46:11] Ox0dea: baweaver: https://vimeo.com/95066828
[01:46:17] Ox0dea: You reminded me of 3:30-ish.
[01:47:36] cmolenda_: has joined #ruby
[01:48:03] tomchapin: has joined #ruby
[01:48:30] Majora_: Ox0dea: The challenge ends at my_inject but I could try and make a my_reduce if you want me to.
[01:48:40] Ox0dea: Majora_: They're synonyms.
[01:48:56] Majora_: I knew that.
[01:49:54] Majora_: Ox0dea: Do you think I should put this shit on my Github? Is it even worth putting up there?
[01:50:51] Ox0dea: Not really.
[01:51:13] daivyk: has joined #ruby
[01:51:14] Ox0dea: But hey, you type good. :P
[01:53:01] Majora_: Ox0dea: Lmao
[01:54:18] Ox0dea: Majora_: Why would somebody even need to use #map?
[01:54:37] Majora_: Ox0dea: Is that a real question?
[01:54:47] craysiii: has joined #ruby
[01:55:48] Ltnt_Hawkeye: has joined #ruby
[01:56:51] Majora_: To modify an array?
[01:56:58] Majora_: I mean... That's what it's used for typically.
[01:57:36] Ox0dea: >> a = [1,2,3]; a.clear; a
[01:57:37] ruboto: Ox0dea # => [] (https://eval.in/498505)
[01:57:41] choke: has joined #ruby
[01:57:57] Ox0dea: There I used #clear to "modify an array", so that's an insufficient explanation.
[01:57:58] baweaver: has joined #ruby
[01:58:41] Majora_: o.O? You used clear on the array...?
[01:58:49] Majora_: That "clears" the array.
[01:58:58] Ox0dea: Sure, but that's a "modification", is it not?
[01:59:07] Ox0dea: It used to be something, and now it's something else.
[01:59:10] Ox0dea: Looks pretty modified to me.
[01:59:10] Majora_: Well yeah but we're not talking about that lol
[01:59:14] Majora_: We're talking about "map"
[01:59:22] Ox0dea: Like how? Like an atlas?
[01:59:38] bricker: has joined #ruby
[01:59:40] Majora_: I don't think so.
[01:59:40] bkxd: has joined #ruby
[01:59:55] Majora_: print [1, 2, 3].map{|i| i + 1}
[01:59:58] Majora_: more like that.
[02:00:00] Majora_: more or less.
[02:00:51] northfurr: has joined #ruby
[02:01:11] baweaver: map applies a function to every element of an enumeration and returns a new array as a result
[02:01:50] Majora_: ^ there you go.
[02:01:59] Majora_: That sounds about right.
[02:02:34] baweaver: What's a function?
[02:02:46] baweaver: ...and what does it mean to apply a function?
[02:02:58] Majora_: Ox0dea: Bruh I think he asked you a question.
[02:03:01] Majora_: Better answer it.
[02:03:18] baweaver: ACTION headdesks
[02:03:24] Ox0dea: Shh bby is ok
[02:03:25] Marsupermammal: has joined #ruby
[02:04:21] Respek: has joined #ruby
[02:04:21] Majora_: Ox0dea: ^ points for using that reference =P
[02:04:39] Ox0dea: Well, the professor seems to have gone to sleep. Class dismissed, I reckon.
[02:05:04] Majora_: If that's a reference I don't get it. Lol
[02:05:49] Ox0dea: Majora_: baweaver was trying to learn you some things and your tomfoolery seems to have caused him to concuss himself.
[02:06:05] baweaver: ACTION drools on table
[02:06:28] Majora_: Ox0dea: yeah I have that effect on people.
[02:06:31] Majora_: Not sure why.
[02:07:02] Ox0dea: Maybe she's born with it.
[02:07:29] hxegon: Maybe it's maybelline?
[02:08:01] choke: has joined #ruby
[02:08:14] cmolenda: has joined #ruby
[02:09:15] jottr_: has joined #ruby
[02:09:40] NoTroutAboutIt: has joined #ruby
[02:14:02] guacamole: has joined #ruby
[02:16:44] ta: has joined #ruby
[02:18:46] choke: has joined #ruby
[02:18:50] djbkd: has joined #ruby
[02:25:23] smactive: has joined #ruby
[02:27:39] choke: has joined #ruby
[02:28:08] arescorpio: has joined #ruby
[02:29:27] JazzyVariable227: has joined #ruby
[02:33:45] DLSteve: has joined #ruby
[02:34:14] aadam21: has joined #ruby
[02:34:23] lkba: has joined #ruby
[02:35:49] chipotle_: has joined #ruby
[02:37:42] mary5030: has joined #ruby
[02:38:02] zacts: hi rubyists
[02:38:06] m3troX: has joined #ruby
[02:38:44] aadam21: has joined #ruby
[02:38:52] m3troX: is ruby still active?
[02:39:05] domgetter: m3troX: what does "active" mean?
[02:39:15] Radar: the most active it's ever been
[02:39:23] charliesome: has joined #ruby
[02:39:31] m3troX: usually i dont see much through irc
[02:39:36] m3troX: bunch of silent rooms
[02:39:37] domgetter: version 2.3 came out on Christmas, so it's under active development
[02:39:46] m3troX: i will check that out
[02:39:55] m3troX: any ide recommendations through windows?
[02:40:34] domgetter: some people use Rubymine as an IDE, but I personally don't like it
[02:40:43] m3troX: whats the alt?
[02:40:58] domgetter: I just use Sublime Text, though that's not technically an "IDE"
[02:41:14] Ox0dea: Wow, such impatient.
[02:41:35] yeticry_: has joined #ruby
[02:42:08] klams: has joined #ruby
[02:42:08] ChanServ: +b *!*@gateway/web/freenode/ip.66.85.139.244
[02:42:08] ChanServ: ChanServ kicked klams: troll
[02:44:36] mistermocha: has joined #ruby
[02:45:36] dlitvak: has joined #ruby
[02:50:20] tubulife-: has joined #ruby
[02:53:14] choke: has joined #ruby
[02:53:17] bluOxigen: has joined #ruby
[02:55:55] gambl0re: has joined #ruby
[02:57:24] lacuna: has joined #ruby
[02:57:25] lacuna: has joined #ruby
[03:00:19] bkxd: has joined #ruby
[03:01:15] iateadonut: has joined #ruby
[03:05:34] cmolenda: has joined #ruby
[03:06:17] Melpaws: has joined #ruby
[03:12:39] sankaber: has joined #ruby
[03:13:16] Ltnt_Hawkeye: has joined #ruby
[03:13:18] Marsupermammal: has joined #ruby
[03:13:54] iamayam: has joined #ruby
[03:14:36] kalopsian: has joined #ruby
[03:14:37] zacts: ACTION idles here for a bit
[03:15:00] dlitvak: has joined #ruby
[03:18:00] ta: has joined #ruby
[03:18:56] Ox0dea: > activeX
[03:18:59] Ox0dea: >> Time.now.year
[03:19:00] ruboto: Ox0dea # => 2016 (https://eval.in/498519)
[03:19:49] sankaber: has joined #ruby
[03:20:29] lacuna: has joined #ruby
[03:20:29] lacuna: has joined #ruby
[03:21:40] smactive: Nice to see some chat in here
[03:23:52] Gadgetoid: has joined #ruby
[03:24:56] blackmesa: has joined #ruby
[03:26:15] devbug_: has joined #ruby
[03:27:00] blackgoat_: has joined #ruby
[03:27:02] choke: has joined #ruby
[03:30:04] m3troX: has joined #ruby
[03:33:14] MrPasserby: has joined #ruby
[03:33:29] Ox0dea: Nice to see some cats in here.
[03:38:34] mjuszczak: has joined #ruby
[03:39:45] MattV: has joined #ruby
[03:40:26] lacuna: has joined #ruby
[03:40:26] lacuna: has joined #ruby
[03:41:02] cpup: has joined #ruby
[03:41:08] startupality: has joined #ruby
[03:43:39] baweaver: has joined #ruby
[03:43:47] dpg1: has joined #ruby
[03:44:42] shiver: has joined #ruby
[03:44:42] shiver: has joined #ruby
[03:45:25] agentmeerkat: has joined #ruby
[03:45:46] pontiki: some cool cats having cool chats
[03:46:41] nixmaniack: has joined #ruby
[03:47:16] kies^: has joined #ruby
[03:51:39] baweaver: has joined #ruby
[03:51:46] sneakerhax: has joined #ruby
[03:54:18] aibot: has joined #ruby
[04:02:45] davedev24: has joined #ruby
[04:03:47] bmurt: has joined #ruby
[04:05:59] luckyno7: has joined #ruby
[04:07:05] MattV: has joined #ruby
[04:07:29] NoTroutAboutIt: has joined #ruby
[04:09:13] tmtwd: has joined #ruby
[04:10:05] wldcordeiro: has joined #ruby
[04:10:29] llua^_^AznSmile-: has joined #ruby
[04:10:38] ur5us: has joined #ruby
[04:10:55] gix: has joined #ruby
[04:10:56] Gadgetoid: has joined #ruby
[04:14:57] Scripore: has joined #ruby
[04:15:18] Ox0dea: You have cat to be kitten me right meow.
[04:18:03] llua: has joined #ruby
[04:18:22] startupality: has joined #ruby
[04:18:38] dpg1: has joined #ruby
[04:18:56] arup_r: has joined #ruby
[04:19:20] ta: has joined #ruby
[04:22:10] krz: has joined #ruby
[04:23:54] shakes: has joined #ruby
[04:26:26] Respek: has joined #ruby
[04:28:05] blackmesa: has joined #ruby
[04:28:39] rkazak: has joined #ruby
[04:28:59] jackjackdripper: has joined #ruby
[04:31:02] bkxd: has joined #ruby
[04:31:58] pawnbox: has joined #ruby
[04:33:27] akem: has joined #ruby
[04:33:41] makenoise: has joined #ruby
[04:34:14] duncannz: has joined #ruby
[04:34:56] djbkd: has joined #ruby
[04:35:04] Bloomer: has joined #ruby
[04:36:47] mfb2: has joined #ruby
[04:36:57] juddey: has joined #ruby
[04:38:38] lacuna: has joined #ruby
[04:38:38] lacuna: has joined #ruby
[04:42:03] pontiki: well played
[04:44:50] akem: hi alakra
[04:45:56] jackcom: has joined #ruby
[04:46:12] jackcom: d+1 mean yesterday or tomorrow?
[04:46:17] akem: hows ruby doing ox0dea?
[04:46:45] Ox0dea: akem: The language itself?
[04:47:35] akem: definitly, you and/or the language
[04:48:37] mfb2: has joined #ruby
[04:48:55] Ox0dea: Well, it's no Perl 6.
[04:49:01] Ox0dea: For good and ill.
[04:50:21] Majora_: Ox0dea: Oh no.
[04:50:27] Majora_: We've come to an actual program that I must create.
[04:50:35] Majora_: my nightmares have become real Q.Q
[04:50:59] Ox0dea: On the bright side, I'm fuckin' pumped!
[04:50:59] Majora_: I should just give up programming before it gets any harder.
[04:51:03] Majora_: That would be easiest.
[04:51:08] Ox0dea: It would, wouldn't it?
[04:51:14] Majora_: Ox0dea: The fuck are you excited about? lol
[04:51:30] Ox0dea: Majora_: Dat sweet newbie code, bro.
[04:51:34] Ox0dea: Let's do this!
[04:51:40] Majora_: fuck dat shiit
[04:51:54] Majora_: I must create...
[04:52:00] Majora_: *drum roll*
[04:52:24] pickerel: has joined #ruby
[04:52:33] Ox0dea: Excellent!
[04:52:42] Vertroa: has joined #ruby
[04:52:43] Majora_: Is it though?
[04:52:45] Majora_: Ask yourself.
[04:52:57] Ox0dea: This is an opportunity for you to learn the ternary numeral system.
[04:53:13] Ox0dea: You know binary, yeah?
[04:53:19] Ox0dea: It's like that, but with 3 instead of 2.
[04:53:23] Axsuul: has joined #ruby
[04:53:23] Ox0dea: It's 1.5x more awesomer.
[04:53:26] Majora_: of course everyone knows that.
[04:53:42] Ox0dea: Well, there are nine cells and each can be in one of three states, right?
[04:53:57] Majora_: one of three states. wat.
[04:54:00] Majora_: nine cells wat
[04:54:00] Ox0dea: This guy.
[04:54:03] Ox0dea: Honestly.
[04:54:09] Majora_: ACTION shrugs
[04:54:33] Majora_: I guess I should create a class called tictactoe
[04:54:36] Majora_: thats a good start...
[04:54:55] Ox0dea: >> tictactoe = Class.new; tictactoe.name
[04:54:56] ruboto: Ox0dea # => nil (https://eval.in/498543)
[04:54:59] Ox0dea: That's a bad start.
[04:55:27] Ox0dea: Because to be "called" something is to have a name.
[04:55:45] Majora_: ?????????/
[04:56:12] Ox0dea: You try it, then. Show me how you'd create a class called `tictactoe`.
[04:56:24] Majora_: class TicTacToe end
[04:56:33] Ox0dea: >> 'tictactoe' == 'TicTacToe'
[04:56:34] Majora_: Aren't I smart? :D
[04:56:34] ruboto: Ox0dea # => false (https://eval.in/498544)
[04:56:44] Ox0dea: Dat timing doe.
[04:57:09] Ox0dea: Your inattention to detail is infuriating.
[04:57:18] Ox0dea: I love you a little less again.
[04:57:19] Majora_: I don't get it D:
[04:57:32] Ox0dea: The capitals, Mason!
[04:57:36] Bloomer: has left #ruby: ()
[04:57:39] Majora_: who cares about that
[04:57:44] Ox0dea: The interpreter.
[04:57:52] Majora_: it's still gonna do the same goddamn thing I tell it to do.
[04:58:14] themsay: has joined #ruby
[04:58:32] Majora_: Okay so lets call it Tictactoe then
[04:58:37] Majora_: class Tictactoe end
[04:59:20] Majora_: Ox0dea: Has he left already?
[04:59:25] haylon: has left #ruby: ("Leaving")
[05:00:52] Ox0dea: Majora_: What are your known unknowns?
[05:01:26] Majora_: uhh. All of it mostly. I just don't know how to put it together.
[05:01:45] Majora_: http://ideone.com/80m2TQ
[05:01:49] Majora_: This is what I came up with.
[05:02:05] bnizzle1: has joined #ruby
[05:02:05] Majora_: I know I'm missing alot lol
[05:04:13] Majora_: I know I need a board... two player... some markers... and some way to tell who has won.
[05:04:22] Majora_: I think that's it.
[05:05:32] Ox0dea: Those are known knowns.
[05:06:29] pawnbox: has joined #ruby
[05:06:30] Ox0dea: Aren't you going to need some methods to tell you the positions of John, Luke, and Matthew as well?
[05:06:39] NoTroutAboutIt: has joined #ruby
[05:07:29] Majora_: Ox0dea: is Mark and Judas playing as well? Lol
[05:07:59] Majora_: It's only playable by two people xP
[05:08:53] Ox0dea: Well, that's dumb. How come it can't be played by 8 people? First to take the center loses.
[05:09:06] Ox0dea: Where's your sense of innovation, eh?
[05:09:22] Majora_: Ox0dea: jesus can I just build a simple game that WORKS
[05:09:28] Majora_: then we can move on to innovation lmao
[05:09:48] Ox0dea: Majora_: Put... put some code in it.
[05:10:06] ledestin: has joined #ruby
[05:10:08] Majora_: Where should I start?
[05:10:53] Ox0dea: Majora_: Decide on the internal layout of the board and how that'll map to the kind of input for which you'll need to ask the user.
[05:11:18] Ox0dea: Do you want to number the cells 1-9 (or even 0-8 like a decent human being), or do you want to use an X-Y system of some kind?
[05:11:22] Vertroa: has joined #ruby
[05:11:40] baweaver: Majora_: suggested reading: http://www.amazon.com/Practical-Object-Oriented-Design-Ruby-Addison-Wesley/dp/0321721330
[05:11:43] pawnbox: has joined #ruby
[05:11:51] Majora_: I would assume a 3 by 3 board? and yeah it would be marked by each index.
[05:12:02] Majora_: Ox0dea: No need to overcomplicate it.
[05:12:09] Ox0dea: Majora_: And yet you just did.
[05:12:10] baweaver: http://www.amazon.com/Practical-Object-Oriented-Design-Ruby-Addison-Wesley/dp/0321721330
[05:12:20] baweaver: ...hm, copy not working
[05:12:20] Majora_: I did not.
[05:12:31] Ox0dea: If you've got a 3x3 board internally, the center cell would be [1][1].
[05:12:37] baweaver: http://www.amazon.com/Mazes-Programmers-Twisty-Little-Passages/dp/1680500554
[05:12:39] Ox0dea: That's not "marked by each index".
[05:12:40] baweaver: there it is!
[05:12:54] Majora_: Ox0dea: Well how would you do it? -.-
[05:12:58] tdubya: has joined #ruby
[05:13:16] Majora_: baweaver: thanks man I'm broke for days.
[05:15:27] drosenbloom: has joined #ruby
[05:17:58] drosenbloom: In enumerables... I know I can do this: ['123', '1', '32'].map(&:length) to get the length of all items. If the source of the enumerable is a struct, is there a shorthand to map to a property of the struct? So like, a shorthand for items.map{|a| a.property}
[05:18:25] drosenbloom: I realize I'm trying to shave about 5 characters off, but still...
[05:18:28] Ox0dea: drosenbloom: map(&:property), of course.
[05:18:35] Ox0dea: It's just a method call in both cases.
[05:18:37] drosenbloom: Doesn't seem to be working
[05:18:46] drosenbloom: maybe the error is elsewhere.
[05:18:52] drosenbloom: (I.E. my hands)
[05:18:56] Ox0dea: Your brain!
[05:18:59] Porfa_: has joined #ruby
[05:19:06] Ox0dea: There first.
[05:19:57] drosenbloom: yup... PEBKAC
[05:20:21] woodruffw: has joined #ruby
[05:21:24] Ox0dea: >> Errno::EDOOFUS
[05:21:25] ruboto: Ox0dea # => Errno::NOERROR (https://eval.in/498548)
[05:21:57] kspencer: hey Ox0dea I got the json to work :D
[05:22:08] Ox0dea: kspencer: Huzzah!
[05:22:31] kspencer: would you like to see it?
[05:22:49] nug: has joined #ruby
[05:23:15] KrzaQ: has joined #ruby
[05:24:34] Ox0dea: I click all links instinctively.
[05:24:51] kalopsia1: has joined #ruby
[05:24:58] seaworthy: has joined #ruby
[05:25:14] jackcom: d+1 mean yesterday or tomorrow?
[05:26:09] seaworthy: can someone help me associating records so i can use something like this buy_transactions = Transaction.includes(:virtual_item).where(["buyer_id = ?", user.id]).order(updated_at: :desc)
[05:26:31] seaworthy: i am not sure what to use belongs_to or has one
[05:27:35] seaworthy: i tried doing # has_one :virtual_item, class_name: "VirtualItem"
[05:27:48] kspencer: Ox0dea: https://gist.github.com/IotaSpencer/f55764368b7faca00521
[05:27:49] chipotle: has joined #ruby
[05:27:52] seaworthy: in Transaction model but that gives me sql error
[05:29:41] Coraline: seaworthy: you might have better luck in #rails
[05:30:01] mloy: has joined #ruby
[05:30:12] seaworthy: okay Coraline
[05:30:46] mloy: has joined #ruby
[05:30:59] blackmesa: has joined #ruby
[05:31:13] Majora_: Ox0dea: I always wonder about these people who randomly comment in... People who never say anything.
[05:31:24] Majora_: I just wonder if they are silently watching everything I say lol
[05:31:36] Coraline: ACTION is a silent watcher
[05:31:38] Ox0dea: Majora_: Some of them might be dead.
[05:31:42] Ox0dea: kspencer: LGTM.
[05:31:44] Coraline: ACTION is also dead
[05:31:51] Ox0dea: #3spooky5me
[05:31:52] Majora_: Coraline you scare me :3 lol
[05:32:26] Ox0dea: kspencer: There are a few teensy nitpicks that I'll not bother to point out.
[05:32:51] kspencer: pm them and I'll see what I can do to fix them, tell you why they are there
[05:33:31] Ox0dea: kspencer: I'm talkin' duper-minor things like replacing `delete("\n")` with `chomp`.
[05:33:35] kknight: has joined #ruby
[05:33:44] darkf: has joined #ruby
[05:34:14] avenj: has joined #ruby
[05:34:14] avenj: has joined #ruby
[05:34:22] MrPasserby: has joined #ruby
[05:34:24] aadam21: has joined #ruby
[05:34:50] kspencer: if it helps with the style and the compatibility, etc. then I'm all for any suggestions
[05:35:12] Ox0dea: While we're tangentially on the subject, here's a demonstration of a nifty technique called "autovivification": https://eval.in/498552
[05:35:59] Ox0dea: Because non-existent keys "spring to life".
[05:36:45] Ox0dea: It's not very applicable to your uptime script since you haven't got very many levels of nesting, but you'll have a problem for which it's just the thing someday.
[05:36:55] stannard: has joined #ruby
[05:38:19] Ox0dea: Inshallah.
[05:40:40] astrobun_: has joined #ruby
[05:42:38] rkazak: has joined #ruby
[05:43:40] bricker: has joined #ruby
[05:45:08] sigurding: has joined #ruby
[05:45:46] kalopsian: has joined #ruby
[05:50:19] kknight: has joined #ruby
[05:51:36] dlitvak: has joined #ruby
[05:55:19] krz: has joined #ruby
[05:56:15] arup_r: has joined #ruby
[05:58:39] usershell: has joined #ruby
[05:59:00] LMity: has joined #ruby
[06:00:24] arup_r: has joined #ruby
[06:00:43] jamw: has joined #ruby
[06:00:43] Majora_: https://codequizzes.wordpress.com/2013/10/25/creating-a-tic-tac-toe-game-with-ruby/ Ox0dea
[06:00:52] Majora_: It's kind of useful.
[06:00:59] Majora_: It's hard to read though
[06:01:01] Majora_: ACTION sigh
[06:01:30] mfb2: has joined #ruby
[06:01:42] barajasfab: has joined #ruby
[06:02:04] bkxd: has joined #ruby
[06:02:13] Ox0dea: > The nested array data structure closely mirrors an actual tic-tac-toe board
[06:02:17] Ox0dea: Majora_: Don't listen to him!
[06:02:41] JamieD: has joined #ruby
[06:02:44] Majora_: Ox0dea: Why not.... o.o
[06:04:38] Ox0dea: That design decision convolutes several things throughout the code.
[06:05:20] Ox0dea: He's got to call #flatten, he does some [y][x], he has to "nested queries" a few times to decide what's what.
[06:05:22] arup_r: has joined #ruby
[06:06:12] Ox0dea: "Flat is better than nested." -- The Zen of Python
[06:06:19] PlasmaStar: has joined #ruby
[06:10:56] Vertroa: has joined #ruby
[06:11:46] juddey: has joined #ruby
[06:13:03] blackgoat_: has joined #ruby
[06:15:58] atmosx: has joined #ruby
[06:16:43] Ox0dea: Majora_: That said, it seems an article from which much might be learned. Give it the ol' once-over, I reckon.
[06:17:17] roshanavand: has joined #ruby
[06:21:52] cpup: has joined #ruby
[06:22:13] ta: has joined #ruby
[06:26:30] mloy: has joined #ruby
[06:27:37] aganov: has joined #ruby
[06:27:43] Majora_: Ox0dea: I guess.
[06:27:53] Majora_: I'm too tired to work on this anymore.
[06:27:57] Majora_: I'll give it a shot tomorrow.
[06:28:03] Ox0dea: Good night, sweet prince.
[06:28:12] Majora_: lmao goodnight<33
[06:28:14] Ox0dea: Don't go chasin' fireballs.
[06:28:59] sigurding: has joined #ruby
[06:32:29] KKKTRIPLEK: has joined #ruby
[06:32:32] KKKTRIPLEK: the problem with niggers is that they expect handouts for something white people and niggers have no involvement in
[06:32:45] Ox0dea: Please clarify.
[06:33:02] KKKTRIPLEK: white people haven't owned slaves for a very long time
[06:33:08] KKKTRIPLEK: niggers haven't been slaves for a very long time
[06:33:17] chouhoul_: has joined #ruby
[06:33:22] ruboto: fflush, apeiros, banisterfiend, zzak, Mon_Ouie, seanstickle, Radar, Havenn, jhass, sevenseacat, workmad3, miah, Coraline, drbrain, zenspider, rubyhacker1, slyphon, Aria, ljarvis, Adaedra, baweaver
[06:33:28] CorySimmons: has joined #ruby
[06:33:30] Radar: !ban KKKTRIPLEK !T 1d
[06:33:33] ChanServ: +b KKKTRIPLEK!*@*
[06:33:33] ChanServ: ChanServ kicked KKKTRIPLEK: is banned from this channel
[06:33:42] lxsameer: has joined #ruby
[06:34:01] blackmesa: has joined #ruby
[06:34:25] zapata: has joined #ruby
[06:38:20] mary5030: has joined #ruby
[06:41:21] Axsuul: has joined #ruby
[06:41:56] robbyoconnor: has joined #ruby
[06:42:09] auzty: has joined #ruby
[06:44:13] cmolenda: has joined #ruby
[06:44:55] colegatron: has joined #ruby
[06:45:02] choke: has joined #ruby
[06:47:03] lurch_: has joined #ruby
[06:47:07] claw: has joined #ruby
[06:47:46] PedramT: has joined #ruby
[06:50:41] barajasfab: has joined #ruby
[06:50:56] haraigoshi: has joined #ruby
[06:51:27] Dimik: has joined #ruby
[06:52:23] poguez_: has joined #ruby
[06:53:06] devbug: has joined #ruby
[06:53:13] EbokianKnight: has joined #ruby
[06:53:17] chouhoulis: has joined #ruby
[06:53:23] ryez: has joined #ruby
[06:53:50] pricees: has joined #ruby
[06:54:03] pricees: has left #ruby: ()
[06:54:03] Melpaws: has joined #ruby
[06:54:08] blub: has joined #ruby
[06:54:15] pricees: has joined #ruby
[06:54:42] LMity2: has joined #ruby
[06:54:54] robbyoconnor: has joined #ruby
[06:56:04] djcp: has joined #ruby
[06:56:14] startupality: has joined #ruby
[06:56:47] duncannz: has joined #ruby
[06:56:50] d0nn1e: has joined #ruby
[06:57:16] russt: has joined #ruby
[06:57:19] duncannz: has joined #ruby
[06:57:47] kp666: has joined #ruby
[06:58:53] kp666: has joined #ruby
[07:00:06] kp666: has joined #ruby
[07:00:18] kalopsian: has joined #ruby
[07:01:23] kp666: has joined #ruby
[07:02:26] kp666: has joined #ruby
[07:02:47] choke: has joined #ruby
[07:03:47] kp666: has joined #ruby
[07:04:00] mjuszczak: has joined #ruby
[07:07:57] jbrhbr: has joined #ruby
[07:07:59] arup_r: has joined #ruby
[07:11:36] BSaboia: has joined #ruby
[07:12:49] DonOtreply: has joined #ruby
[07:17:06] rippa: has joined #ruby
[07:22:48] SOLDIERz: has joined #ruby
[07:23:43] choke: has joined #ruby
[07:23:56] RenatoSilva: has joined #ruby
[07:26:15] juddey: has joined #ruby
[07:28:37] solars: has joined #ruby
[07:33:05] last_staff: has joined #ruby
[07:33:18] trautwein: has joined #ruby
[07:35:47] blackmesa: has joined #ruby
[07:36:01] choke_: has joined #ruby
[07:37:18] firstdayonthejob: has joined #ruby
[07:39:20] Macaveli: has joined #ruby
[07:42:35] Axsuul: has joined #ruby
[07:46:30] djbkd: has joined #ruby
[07:46:32] nixmaniack: has joined #ruby
[07:47:55] pawnbox: has joined #ruby
[07:49:37] charliesome: has joined #ruby
[07:52:47] Xentil: has joined #ruby
[07:54:19] gagrio: has joined #ruby
[07:54:33] jas02: has joined #ruby
[07:54:42] pawnbox: has joined #ruby
[07:58:57] Ishido: has joined #ruby
[07:59:04] ta: has joined #ruby
[07:59:43] TheHodge: has joined #ruby
[08:00:00] choke: has joined #ruby
[08:00:16] ur5us: has joined #ruby
[08:01:04] lacuna: has joined #ruby
[08:01:04] lacuna: has joined #ruby
[08:02:03] bigkevmcd: has joined #ruby
[08:02:35] nixmaniack: has joined #ruby
[08:02:40] bkxd: has joined #ruby
[08:02:58] karapety_: has joined #ruby
[08:04:16] pawnbox: has joined #ruby
[08:04:53] RenatoSilva: has left #ruby: ("http://pidgin.renatosilva.me - Pidgin++")
[08:05:30] BSaboia: has joined #ruby
[08:06:16] brunto: has joined #ruby
[08:07:06] choke: has joined #ruby
[08:07:27] euoia: has joined #ruby
[08:08:09] pawnbox: has joined #ruby
[08:11:04] choke_: has joined #ruby
[08:11:57] kspencer: gonna try some sass/scss sometime after the next 8 hours
[08:12:14] ur5us: has joined #ruby
[08:12:58] yardenbar: has joined #ruby
[08:13:51] toretore: has joined #ruby
[08:20:43] SCHAAP137: has joined #ruby
[08:21:31] pawnbox: has joined #ruby
[08:23:04] aufi: has joined #ruby
[08:24:03] Xeago: has joined #ruby
[08:25:25] TomyWork: has joined #ruby
[08:26:36] PedramT: has joined #ruby
[08:26:52] pawnbox: has joined #ruby
[08:27:45] roshanavand: has joined #ruby
[08:28:54] jackjackdripper: has joined #ruby
[08:29:46] ur5us: has joined #ruby
[08:30:34] roshanavand: has joined #ruby
[08:31:40] einarj: has joined #ruby
[08:32:19] ax: has joined #ruby
[08:32:34] ax: has left #ruby: ()
[08:33:13] ax: has joined #ruby
[08:34:07] wolffles: has joined #ruby
[08:37:55] mark1: has joined #ruby
[08:38:08] shevy: yo flughafen - 2016 must be the year of the flughafen in berlin!
[08:38:25] sandstrom: has joined #ruby
[08:38:48] blackmesa: has joined #ruby
[08:39:24] nixmaniack: has joined #ruby
[08:39:50] TheNet: has joined #ruby
[08:42:39] TheWhip: has joined #ruby
[08:43:28] Hounddog: has joined #ruby
[08:44:27] huyderman: has joined #ruby
[08:46:21] karapetyan: has joined #ruby
[08:47:23] usershell: has joined #ruby
[08:47:31] d0nn1e: has joined #ruby
[08:49:09] steffkes: has joined #ruby
[08:49:09] steffkes: has joined #ruby
[08:49:10] skcin7: has joined #ruby
[08:50:05] kalopsian: has joined #ruby
[08:50:27] mistermocha: has joined #ruby
[08:52:33] karapetyan: has joined #ruby
[08:52:53] roshanavand: has joined #ruby
[08:53:10] flughafen: shevy: is it going to open in 2016?
[08:53:46] shevy: hehe yeah
[08:53:51] shevy: together with the linux desktop of the year
[08:54:36] smactive: has joined #ruby
[08:54:49] roshanav_: has joined #ruby
[08:58:30] flughafen: shevy: current schedule is in ayear an a half or so
[08:59:35] shevy: hmm... time for a ruby question... is there a way to return a full Array of the ruby stdlib constants? e. g. an array such as: [String, Hash, Array ...] I need to iterate over every one of them via .instance_methods(false); right now I am hardcoding this, which sorta sucks
[09:00:05] shevy: hmm not stdlib... core
[09:00:23] shevy: like http://ruby-doc.org/core-2.3.0/Array.html
[09:01:10] yfeldblum: has joined #ruby
[09:02:47] Amnez777: has joined #ruby
[09:05:28] usershell: has joined #ruby
[09:05:50] dwfait: has joined #ruby
[09:06:38] djbkd: has joined #ruby
[09:08:20] jschmid: has joined #ruby
[09:10:02] toretore: shevy, you mean classes defined at the top level?
[09:10:17] toretore: >> Object.constants.map{|s| Object.const_get(s) }.select{|o| o.is_a?(Class) }
[09:10:19] ruboto: toretore # => [Object, Module, Class, BasicObject, NilClass, Data, TrueClass, FalseClass, Encoding, String, Symbol ...check link for more (https://eval.in/498599)
[09:10:58] shevy: toretore yeah
[09:11:05] shevy: hmm gimme a moment to have a look
[09:11:07] craigp: has joined #ruby
[09:12:23] cornerma1: has joined #ruby
[09:12:36] shevy: interesting
[09:12:42] peeja: has joined #ruby
[09:12:48] shevy: I am seeing names I never before saw ... like http://ruby-doc.org/stdlib-2.0.0/libdoc/thread/rdoc/ConditionVariable.html
[09:13:01] shevy: but it seems to work, thanks toretore
[09:13:28] toretore: ConditionVariable is used for thread synchronization
[09:15:40] roshanavand: has joined #ruby
[09:19:00] weemsledeux: has joined #ruby
[09:19:42] DoubleMalt: has joined #ruby
[09:23:28] TheWhip: has joined #ruby
[09:23:45] pandaant: has joined #ruby
[09:27:05] TheWhip: has joined #ruby
[09:27:32] shevy: lol https://github.com/ruby/ruby/blob/trunk/ChangeLog#L11
[09:27:38] snowy: has joined #ruby
[09:27:40] shevy: * include/ruby/backward.h (ruby_show_copyright_to_die)
[09:27:41] shevy: cool name
[09:30:33] sandstrom: has joined #ruby
[09:30:57] pawnbox: has joined #ruby
[09:32:08] manveru: damn, i forgot how crazy bloated rspec is :|
[09:34:09] choke: has joined #ruby
[09:35:21] peteyg: has joined #ruby
[09:35:24] darkf: has joined #ruby
[09:35:38] atmosx: jruby is a ruby implementation running on jvm right>
[09:36:56] yfeldblum: has joined #ruby
[09:37:12] stannard: has joined #ruby
[09:41:51] blackmesa: has joined #ruby
[09:42:40] ruby-lang272: has joined #ruby
[09:43:11] atmosx: and why aren't they upgrading to ruby 2.0? I wonder.
[09:44:08] ruby-lang272: Getting undefined symbol: rb_thread_select while using PG 0.18.4 with Ruby 2.2.2
[09:44:25] adaedra: [2] pry(main)> RUBY_PLATFORM + " " + RUBY_VERSION
[09:44:26] adaedra: => "java 2.2.2"
[09:44:35] baweaver: has joined #ruby
[09:45:04] ruby-lang272: online resource suggest to downgrade to ruby 2.1.X
[09:45:21] ruby-lang272: is there any workaround for this error?
[09:45:30] webus_: has joined #ruby
[09:45:51] toretore: ruby-lang272, need more information. gist the entire output
[09:46:13] pawnbox: has joined #ruby
[09:46:56] atmosx: adaedra: I see, then it's logstash that's running an older version
[09:47:09] adaedra: atmosx: you have to use the 9000 series
[09:47:24] atmosx: adaedra: okay ty
[09:47:38] ruby-lang272: getting the error while starting the rails server in development env
[09:47:44] ruby-lang272: bundle exec rails s => Booting Thin => Rails 4.0.13 application starting in development on http://0.0.0.0:8080 => Run `rails server -h` for more startup options => Ctrl-C to shutdown server /opt/ruby-2.2/bin/ruby: symbol lookup error: /opt/ruby-2.2/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/pg-0.18.4/pg_ext.so: undefined symbol: rb_thread_select
[09:47:54] karapetyan: has joined #ruby
[09:47:59] toretore: ruby-lang272, gist.github.com
[09:49:20] roshanav_: has joined #ruby
[09:49:40] ruby-lang272: https://gist.github.com/anonymous/cf1c3cd881a8e33d46d9
[09:50:05] chussenot: has joined #ruby
[09:50:34] desmondhume: has joined #ruby
[09:50:54] toretore: which version is the pg gem?
[09:51:22] gregf_: has joined #ruby
[09:51:27] ruby-lang272: tried all version btwn 0.15.x to 0.18.x
[09:51:28] toretore: actually nm i can see it
[09:52:38] julieeharshaw: has joined #ruby
[09:54:47] ruby-lang526: has joined #ruby
[09:55:19] ruby-lang526: has left #ruby: ()
[09:56:22] choke: has joined #ruby
[09:56:39] yfeldblum: has joined #ruby
[09:57:25] TomyWork: has joined #ruby
[09:57:53] toretore: ruby-lang272, i guess you'll have to downgrade your ruby
[09:58:34] ruby-lang272: yeah, few post suggested that this error is fixed since version pg 0.14
[09:58:40] ruby-lang272: but does not seem so
[09:59:22] marr: has joined #ruby
[09:59:36] rodfersou: has joined #ruby
[10:00:31] toretore: https://github.com/ged/ruby-pg/blob/bb4693e811f9348f202835e701e6509d15685b0a/ext/pg_connection.c#L26
[10:01:05] bewie: has joined #ruby
[10:01:44] platzhirsch: has joined #ruby
[10:03:27] bkxd: has joined #ruby
[10:03:55] gregf_: has joined #ruby
[10:06:21] ruby-lang272: toretore, that is a for temp local solution, correct? any info on when it will be roled out as a release/patch?
[10:07:23] djbkd: has joined #ruby
[10:08:44] blackmesa: has joined #ruby
[10:08:51] toretore: no, it's just a link to the current code
[10:09:03] toretore: i'm not sure if it's significant
[10:10:03] lipoqil: has joined #ruby
[10:10:27] certainty: has joined #ruby
[10:10:32] tlarevo: has joined #ruby
[10:10:40] nertzy: has joined #ruby
[10:11:07] ryez: has joined #ruby
[10:11:18] AwchinBruh: has joined #ruby
[10:12:13] ruby-lang272: toretore, oh ok...so probably downgrading ruby 2.1.x is the only solution
[10:12:55] dlitvak: has joined #ruby
[10:13:16] toretore: the most feasible one at this point, probably
[10:13:26] roshanavand: has joined #ruby
[10:13:51] ruby-lang272: cool, thanks for your time toretore!
[10:16:11] dlitvak_: has joined #ruby
[10:18:45] choke: has joined #ruby
[10:21:35] shredding: has joined #ruby
[10:22:19] ruby[bot]: has joined #ruby
[10:22:28] ruby[bot]: has left #ruby: ("leaving")
[10:24:17] roshanav_: has joined #ruby
[10:28:33] nerfando: has joined #ruby
[10:30:25] arup_r: has joined #ruby
[10:30:33] Juanchito: has joined #ruby
[10:34:23] startupality: has joined #ruby
[10:34:59] rdark: has joined #ruby
[10:36:07] blur3d: has joined #ruby
[10:38:11] kalopsian: has joined #ruby
[10:39:09] roshanavand: has joined #ruby
[10:40:15] choke: has joined #ruby
[10:42:42] blackgoat: has joined #ruby
[10:42:54] FernandoBasso: has joined #ruby
[10:43:05] inukshuk_: has joined #ruby
[10:43:42] AwchinBruh: has joined #ruby
[10:44:15] ruby[bot]: has joined #ruby
[10:44:35] ruby[bot]: has left #ruby: ()
[10:45:41] baweaver: has joined #ruby
[10:49:53] BSaboia: has joined #ruby
[10:51:08] pawnbox: has joined #ruby
[10:51:43] mistermocha: has joined #ruby
[10:55:11] nerfando: has joined #ruby
[10:56:47] Scripore: has joined #ruby
[10:57:38] codecop: has joined #ruby
[10:58:57] Marsupermammal: has joined #ruby
[10:59:44] singalaut: has joined #ruby
[11:01:46] choke: has joined #ruby
[11:01:52] singalaut: has left #ruby: ("WeeChat 1.4-dev")
[11:03:24] ruby[bot]: has joined #ruby
[11:03:53] ruby[bot]: has left #ruby: ("leaving")
[11:04:07] bkxd: has joined #ruby
[11:05:23] dionysus69: has joined #ruby
[11:08:11] djbkd: has joined #ruby
[11:09:18] roshanavand: has joined #ruby
[11:09:46] FooMunki: has joined #ruby
[11:11:21] Jackneill: has joined #ruby
[11:16:13] Xentil: has joined #ruby
[11:19:15] dlitvak: has joined #ruby
[11:22:41] choke: has joined #ruby
[11:22:52] ryez: has joined #ruby
[11:23:16] ur5us: has joined #ruby
[11:23:19] stamina: has joined #ruby
[11:25:24] certainty: has joined #ruby
[11:25:35] dorei: has joined #ruby
[11:25:41] PedramT: has joined #ruby
[11:26:24] Axsuul: has joined #ruby
[11:29:08] leksster: has joined #ruby
[11:30:22] dlitvak: has joined #ruby
[11:30:30] s00pcan: has joined #ruby
[11:30:42] roshanavand: has joined #ruby
[11:31:38] DEA7TH: has joined #ruby
[11:32:51] raymondgulbrands: has joined #ruby
[11:34:32] choke: has joined #ruby
[11:35:22] rayray_: has joined #ruby
[11:35:32] curses: has joined #ruby
[11:37:06] TheWhip: has joined #ruby
[11:37:17] Lingo: has joined #ruby
[11:37:31] Obcilion: has joined #ruby
[11:37:45] roshanavand: has joined #ruby
[11:37:58] Macaveli: has joined #ruby
[11:40:18] choke: has joined #ruby
[11:44:43] bithon: has joined #ruby
[11:45:12] nixmaniack: has joined #ruby
[11:45:42] radgeRayden: has joined #ruby
[11:46:45] choke: has joined #ruby
[11:47:43] startupality: has joined #ruby
[11:48:00] sankaber: has joined #ruby
[11:51:39] wrilain: has joined #ruby
[11:52:21] apeiros: >> RUBY_VERSION
[11:52:21] r_rios: has joined #ruby
[11:52:23] ruboto: apeiros # => "2.2.0" (https://eval.in/498667)
[11:52:49] apeiros: ah good, already thought I had forgotten to remove ruby[bot] :)
[11:52:52] chussenot: has joined #ruby
[11:53:13] sandstrom: has joined #ruby
[11:54:23] hannelita: has joined #ruby
[11:54:47] r_rios: Hello. I have a script and it suits me well, but I always pipe its output through other executables (like ./script_blah | c++filt | less). Is there a way I can do this inside the script? That is, to get the output of the current ruby script and pipe it to one or more other executables
[11:55:49] shevy: r_rios should be doable, usually via ARGV / ARGF and handling $stdin http://stackoverflow.com/questions/273262/best-practices-with-stdin-in-ruby and https://robm.me.uk/ruby/2013/12/03/argf-ruby.html
[11:59:10] dlitvak: has joined #ruby
[12:02:07] choke: has joined #ruby
[12:03:44] sandstrom: has joined #ruby
[12:06:54] karapetyan: has joined #ruby
[12:08:55] dlitvak: has joined #ruby
[12:08:56] djbkd: has joined #ruby
[12:09:04] roshanav_: has joined #ruby
[12:15:54] dlitvak_: has joined #ruby
[12:16:00] usershell: has joined #ruby
[12:17:03] sandstrom: has joined #ruby
[12:17:36] RegulationD: has joined #ruby
[12:19:59] choke: has joined #ruby
[12:20:06] arup_r: has joined #ruby
[12:23:59] kalopsian: has joined #ruby
[12:24:55] xet7: has joined #ruby
[12:26:07] atomical: has joined #ruby
[12:26:19] dlitvak: has joined #ruby
[12:28:59] DEA7TH: has joined #ruby
[12:29:00] certainty: has joined #ruby
[12:30:31] sandstrom: has joined #ruby
[12:30:44] diegoviola: has joined #ruby
[12:32:07] smactive: has joined #ruby
[12:34:22] blackmesa: has joined #ruby
[12:36:07] sigurding: has joined #ruby
[12:36:17] emilkarl: has joined #ruby
[12:36:23] m3troX: has joined #ruby
[12:36:31] SCHAAP137: has joined #ruby
[12:36:45] m3troX: has left #ruby: ()
[12:40:17] sandstrom: has joined #ruby
[12:42:34] dlitvak: has joined #ruby
[12:43:00] pawnbox: has joined #ruby
[12:44:05] choke: has joined #ruby
[12:44:17] dkam: has joined #ruby
[12:44:41] Lingo: has joined #ruby
[12:44:53] freerobby: has joined #ruby
[12:45:10] pawnbox: has joined #ruby
[12:45:20] CloCkWeRX: has joined #ruby
[12:45:30] colegatron: has joined #ruby
[12:47:50] kobain: has joined #ruby
[12:49:51] kalopsian: has joined #ruby
[12:50:28] avenj: has joined #ruby
[12:50:28] avenj: has joined #ruby
[12:54:24] mistermocha: has joined #ruby
[12:54:36] tvw: has joined #ruby
[12:55:53] Hounddog: has joined #ruby
[12:56:59] diego2: has joined #ruby
[12:58:17] m8: has joined #ruby
[12:59:55] diego2: has joined #ruby
[13:00:22] platzhirsch: has left #ruby: ()
[13:01:39] sandstrom: has joined #ruby
[13:03:12] HANJIN: has joined #ruby
[13:04:26] choke: has joined #ruby
[13:04:54] bkxd: has joined #ruby
[13:05:17] certainty: has joined #ruby
[13:05:49] cout: what does the DLDLIBS variable in rbconfig.rb represent?
[13:07:12] cout: on my platform it's set to -lc, so I think it's superfluous, but I'm wondering what it might be set to on other platforms that would cause things to break if I didn't include it on the link line for an extension or for an app that uses the ruby library
[13:07:22] diegoviola: my client wants me to write a cron service that fetches their data, but they don't provide a API that I can fetch/parse, instead I need to download some excel file from their web site, but that's tricky since it requires filing out forms, etc. then I have to parse the excel file
[13:07:28] SenpaiSilver: has joined #ruby
[13:07:36] diegoviola: phantomjs/capybara comes to mind, but I don't know
[13:08:03] HANJIN: gsub(/\b(I am|You are|I|You|Your|My)\b/i) <??? This is a sample code what was provided my book, I don???t know why ???/i??? is there, why??
[13:08:06] diegoviola: they want this cron service every 15 mins, and phantomjs/capybara is going to be too expensive to run
[13:08:10] Marsupermammal: has joined #ruby
[13:09:07] go|dfish: HANJIN: it makes the match case-insensitive
[13:09:47] dkam: has joined #ruby
[13:09:48] futilegames: has joined #ruby
[13:09:50] djbkd: has joined #ruby
[13:09:51] mrfoto: has joined #ruby
[13:10:25] adaedra: >> [/a/, /a/i].map { |r| "A" =~ r }
[13:10:25] Xeago: has joined #ruby
[13:10:26] ruboto: adaedra # => [nil, 0] (https://eval.in/498689)
[13:10:51] adaedra: see, the latter match because of i flag
[13:12:14] sdothum: has joined #ruby
[13:13:16] bkxd: has joined #ruby
[13:14:30] synthroid: has joined #ruby
[13:15:39] duckpuppy: has joined #ruby
[13:16:08] sandstrom: has joined #ruby
[13:16:30] snowy: has joined #ruby
[13:17:04] HANJIN: go|dfish: Thank you :)
[13:17:36] HANJIN: adaedra: Thank you, it???s good to understand
[13:18:41] Nahra```: has joined #ruby
[13:19:15] Domaldel: has joined #ruby
[13:19:32] bluOxigen: has joined #ruby
[13:19:41] sepp2k: has joined #ruby
[13:19:50] Freeaqingme: has joined #ruby
[13:19:56] TheWhip: has joined #ruby
[13:21:16] ellisTAA: has joined #ruby
[13:21:23] Rush: has joined #ruby
[13:21:53] kobain: has joined #ruby
[13:23:01] rns: has joined #ruby
[13:23:23] choke: has joined #ruby
[13:26:31] dionysus69: has joined #ruby
[13:27:01] apeiros: diegoviola: "filling out forms" is what humans do. machines send the post request directly.
[13:27:23] apeiros: and the rest: how about you write it, then see where you have problems and ask when you can't solve those?
[13:27:25] diegoviola: apeiros: I agree
[13:27:47] diegoviola: apeiros: I tried looking at the console logs in my browser but I can't really see anything useful
[13:28:07] diegoviola: apeiros: I wish they'd provide me a link I can send a post request and just get JSON back to parse
[13:28:17] diegoviola: apeiros: but they're not being very helpful with that
[13:28:27] apeiros: I guess that's why they pay you
[13:28:54] skade: has joined #ruby
[13:29:07] dkam: has joined #ruby
[13:29:42] diegoviola: I'll have to use capybara
[13:30:06] apeiros: standard approach to such issues: inform them that more useful interfaces will make your work cheaper. if they don't want to/can't, well, then you're paid for the bigger effort it takes. simple as that.
[13:30:25] diegoviola: thing is, collaborating is a 2 way street
[13:30:34] sgambino: has joined #ruby
[13:30:34] apeiros: sometimes it might even be because your time is cheaper than whoever else's time it'd take to make it easier for you.
[13:30:53] apeiros: you misunderstand employment.
[13:30:57] ljarvis: diegoviola: this doesn't sound like collaborating to me
[13:31:02] ljarvis: they're employing you to do a task
[13:31:09] apeiros: you get paid to get stuff done.
[13:31:20] apeiros: your job is it to get that stuff done.
[13:31:27] jhass: ACTION has a dejavu
[13:31:36] apeiros: if you're a good employee, you'll inform them about ways to make it cheaper/better.
[13:31:41] jhass: ?offtopic
[13:31:41] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[13:32:21] dlitvak: has joined #ruby
[13:33:26] jzigmund: has joined #ruby
[13:35:22] dkam: has joined #ruby
[13:35:59] sandstrom: has joined #ruby
[13:36:15] roshanavand: has joined #ruby
[13:36:54] mfb2: has joined #ruby
[13:37:18] peeja: has joined #ruby
[13:37:36] bkxd: has joined #ruby
[13:37:43] DEA7TH: has joined #ruby
[13:38:36] dkam: has joined #ruby
[13:38:50] blackms: has joined #ruby
[13:40:39] dkam_: has joined #ruby
[13:40:50] bmurt: has joined #ruby
[13:41:59] lxsameer: has joined #ruby
[13:42:18] dlitvak_: has joined #ruby
[13:42:38] TheWhip: has joined #ruby
[13:43:33] roshanavand: has joined #ruby
[13:44:08] govg: has joined #ruby
[13:44:19] choke: has joined #ruby
[13:45:50] TheWhip: has joined #ruby
[13:46:55] dstarh: has joined #ruby
[13:47:02] sandstrom: has joined #ruby
[13:47:03] choke: has joined #ruby
[13:47:42] gigetoo: has joined #ruby
[13:48:58] dkam__: has joined #ruby
[13:52:56] nixmaniack: has joined #ruby
[13:52:57] nixmaniack: has joined #ruby
[13:54:22] dkam___: has joined #ruby
[13:55:25] choke: has joined #ruby
[13:55:52] Macaveli: has joined #ruby
[13:57:34] dlitvak: has joined #ruby
[13:59:50] Anderson69s: has joined #ruby
[14:02:21] JDiPierro: has joined #ruby
[14:02:31] mfb2: has joined #ruby
[14:04:10] mfb2_: has joined #ruby
[14:04:28] ramortegui: has joined #ruby
[14:04:42] krz: has joined #ruby
[14:04:43] rdark: has joined #ruby
[14:06:09] sandstrom: has joined #ruby
[14:07:04] asmodlol: has joined #ruby
[14:07:40] aadam21: has joined #ruby
[14:09:22] rrichardsr3: has joined #ruby
[14:09:28] roshanav_: has joined #ruby
[14:10:08] mary5030: has joined #ruby
[14:10:21] dkam___: has joined #ruby
[14:10:34] djbkd: has joined #ruby
[14:12:00] techietrash: has joined #ruby
[14:12:00] techietrash: has joined #ruby
[14:14:13] centrx: has joined #ruby
[14:15:41] dkam___: has joined #ruby
[14:17:19] choke: has joined #ruby
[14:17:59] dkam___: has joined #ruby
[14:19:08] sandstrom: has joined #ruby
[14:19:33] fmcgeough: has joined #ruby
[14:19:52] ta0: has joined #ruby
[14:20:51] blackms: has joined #ruby
[14:22:40] Scoopfinder: has joined #ruby
[14:23:55] r_rios: To anyone wondering (nobody), here's how to pipe out to other processes in Ruby: ruby -e "IO.popen('less', 'w') { |io| io.puts 'some string' }"
[14:24:10] r_rios: Solution found here: http://www.jstorimer.com/blogs/workingwithcode/7766125-writing-ruby-scripts-that-respect-pipelines
[14:24:13] themsay2: has joined #ruby
[14:24:53] r_rios: (In a response to a response to a response to a comment)
[14:24:53] KineticX: has joined #ruby
[14:25:31] shevy: hah josh cheek replied
[14:25:39] r_rios: Correct link: http://www.jstorimer.com/blogs/workingwithcode/7766125-writing-ruby-scripts-that-respect-pipelines#comment-387343846
[14:25:54] Scriptonaut: has joined #ruby
[14:25:57] sankaber: has joined #ruby
[14:26:09] shevy: https://github.com/JoshCheek
[14:26:26] shevy: https://github.com/JoshCheek/seeing_is_believing funny animation
[14:26:42] shevy: what terminal is that? OSX?
[14:27:10] adaedra: Looks like Atom
[14:27:48] Scriptonaut: Hey guys, I'm trying to use ruby oneliners in my linux setup. I have a script that automatically does something like: echo "43::23::32" | ruby -e "puts gets.split('::')[0]". This works great when I call it from the command line, however when it runs from my autostart script there is nothing in STDIN, it's like STDIN is being redirected or something. Anyone have a clue why gets returns nothing when I'm ru
[14:27:54] Scriptonaut: nning it in that context?
[14:28:11] Scriptonaut: also I just remember y'all don't like being called guys, so pretend I said, "Hey y'all"
[14:28:13] sankaber: has joined #ruby
[14:28:24] TomPeed: has joined #ruby
[14:30:07] dlitvak: has joined #ruby
[14:30:49] zotherstupidguy: has joined #ruby
[14:30:52] aegis3121: has joined #ruby
[14:31:42] toretore: Scriptonaut, what is an "autostart script"?
[14:31:44] dkamioka: has joined #ruby
[14:32:00] Scriptonaut: toretore: a script that runs when I launch my window manager
[14:32:07] Scriptonaut: it does things like set the background image on my desktop
[14:32:14] Scriptonaut: start my program launcher
[14:32:25] Scriptonaut: it's a bash script
[14:32:58] pink_vampire: has joined #ruby
[14:33:51] toretore: Scriptonaut, need more details
[14:34:04] Scriptonaut: ok, I'll gist the code
[14:34:08] toretore: if there's nothing in stdin, that's not ruby's problem
[14:34:08] sulky: has joined #ruby
[14:34:10] pink_vampire: how it's ruby compared to python?
[14:34:20] toretore: python is vastly superior
[14:34:26] adaedra: pink_vampire: different
[14:34:28] radgeRayden_: has joined #ruby
[14:34:56] pink_vampire: I have some project to do and I need to choose my first programing language
[14:35:03] adaedra: there's no "superior" programming language.
[14:35:27] kalopsian: has joined #ruby
[14:35:54] pink_vampire: I want to read serial data and make a nice full screen gui
[14:36:11] Scriptonaut: toretore: https://gist.github.com/robins35/74b1fb5cd0883d44ca1c
[14:36:25] Scriptonaut: in the first file, dwmstart, it calls lemonbarstart.sh
[14:36:41] Scriptonaut: in lemonbar.sh, near the bottom, there is some text I pipe to a ruby command
[14:37:00] Scriptonaut: STDIN.readline (also tried gets) returns nothing when it's launched this way
[14:37:05] dkamioka: has joined #ruby
[14:37:43] toretore: does conky return multi line output?
[14:38:06] tmtwd: has joined #ruby
[14:38:08] toretore: yes, it looks like it
[14:38:10] Scriptonaut: no, it works perfectly when I run it manually
[14:38:12] krobzaur: has joined #ruby
[14:38:19] Scriptonaut: toretore: no, I configred conky to only return a single line
[14:38:27] choke: has joined #ruby
[14:38:34] alakra: has joined #ruby
[14:38:55] mustmodify: has left #ruby: ()
[14:38:57] adaedra: What you're looking for is `tr`, Scriptonaut.
[14:39:19] Scriptonaut: I tried using sed and awk, and holy crap are they terrible tools compared to ruby :|
[14:39:22] toretore: yes, it seems unnecessary to run ruby x 3 every 0.2s
[14:39:24] Scriptonaut: like man, the most unreadable stuff
[14:39:33] toretore: that is true
[14:39:36] Scriptonaut: Alright, I figure I better learn cut/awk/sed
[14:39:44] toretore: unix tools suck
[14:40:07] adaedra: They're rather good, well known and well used.
[14:40:13] Scriptonaut: ok, thanks for the pointers guys
[14:40:34] whippythellama: has joined #ruby
[14:40:42] adaedra: using conky to get these info sounds also a bit overkill imo.
[14:40:54] toretore: but if there's nothing in ruby's stdin, there's not going to be any for sed either
[14:41:09] chouhoulis: has joined #ruby
[14:41:53] Scriptonaut: The syntax is just horrid though
[14:42:04] Scriptonaut: adaedra: how would you get them?
[14:42:14] dlitvak: has joined #ruby
[14:42:28] SebastianThorn: has joined #ruby
[14:42:29] sameerynho: has joined #ruby
[14:42:42] gregf: has joined #ruby
[14:42:43] isene: has joined #ruby
[14:42:53] adaedra: There are things in /proc (a bit raw tho)
[14:42:54] Scriptonaut: if not conky?
[14:42:54] Scriptonaut: much of what I've read online uses conky for this
[14:43:49] adaedra: yuck, running 3 times ruby each 0.2s for splitting
[14:43:50] malconis: has joined #ruby
[14:44:11] Scriptonaut: yes, that's very slow
[14:44:24] Scriptonaut: I originally tried sed/awk but it was too terse
[14:44:32] adaedra: in your case, I'd look at getting everything done by conky
[14:44:44] adaedra: and just pipe conky into lemonbar
[14:45:11] daivyk: has joined #ruby
[14:45:21] adaedra: conky is made for what you're trying to do: outputting system information at intervals
[14:45:37] Scriptonaut: oh, that's a good point
[14:45:42] Scriptonaut: I forgot about that
[14:46:01] adaedra: UNIX tools is also using the good tool for the job ;)
[14:46:12] Scriptonaut: I also found this: conky -i 1 | awk -F "::" '{print $3}'
[14:46:22] Scriptonaut: pretty simple, I should put some time aside to learn these tools
[14:46:32] adaedra: you'll still run conky and awk at each iteration
[14:46:40] Scriptonaut: ya, I'm going to try your suggestion next
[14:46:42] choke: has joined #ruby
[14:46:46] toretore: what i have against unix tools is that they mix human- and machine oriented output
[14:46:50] adaedra: also, I don't know what is the interval set in conky; it needs time to calculate CPU usage
[14:46:54] dotix: has joined #ruby
[14:46:56] dotix: has joined #ruby
[14:47:05] Scriptonaut: the interval is like 2 seconds
[14:47:07] toretore: so you end up with long, brittle chains of sed | awk | head | shit
[14:47:15] Scriptonaut: I need to set it to 0.2
[14:47:20] adaedra: So your iteration is 1.2s, not 0.2s
[14:47:40] adaedra: yeah, stuff things in conky as much as possible.
[14:47:46] dkamioka: has joined #ruby
[14:47:48] adaedra: you could also try to make everything in Ruby :)
[14:47:55] Scriptonaut: I would much rather do that hehe
[14:48:04] loveablelobster: has joined #ruby
[14:48:08] Scriptonaut: I'm a programmer, I don't know a great deal about bash or shell scripting in general
[14:48:14] adaedra: (That would make only one resident ruby script and give access to much more things)
[14:48:14] Papierkorb: As a shell tool abuser, treat shell scripting as a programming language and not as something else.
[14:48:30] baweaver: has joined #ruby
[14:49:09] Scriptonaut: ah, I guess it is a programming language
[14:49:11] lxsameer__: has joined #ruby
[14:49:13] dotix: Papierkorb: +1
[14:49:15] Scriptonaut: turing complete and all that
[14:49:59] toretore: a shitty one
[14:50:03] blub: please don't write shell scripts
[14:50:06] stannard: has joined #ruby
[14:50:09] Papierkorb: No, it's not shitty.
[14:50:18] toretore: are you talking about bash?
[14:50:39] Papierkorb: It can do a lot of things really well, but if you're looking to write something you can better do in ruby or w/e, then use ruby (or w/e)
[14:50:41] stannard: has joined #ruby
[14:50:52] adaedra: If you use it for everything, it is shitty. But it's really good for some tasks.
[14:50:52] Papierkorb: toretore: I use ZSH, but the tools are the same for bash
[14:51:08] adaedra: It's all about using the right tool, people.
[14:51:12] toretore: seldom do i find bash to be an adequate language for the problems i'm trying to solve
[14:51:15] usershell: has joined #ruby
[14:51:19] Papierkorb: toretore: for example?
[14:51:26] nixmaniack: has joined #ruby
[14:51:57] toretore: just now i was writing a script to query a tcp server for data, then parse that data and output it on a local port
[14:52:27] sameerynho: has joined #ruby
[14:52:29] Papierkorb: Network interaction is not really bash territory
[14:52:38] adaedra: yep, totally sounds like something not to do in shell.
[14:52:50] toretore: Papierkorb, you mean i/o in general?
[14:52:59] Papierkorb: Anything above "curl, push this data to the server and pipe the output into grep" is better put into a Ruby or Python script or whatever you prefer
[14:53:01] adaedra: Even if there's ways of doing it (nc, and a special thing in bash iirc)
[14:53:08] dkam_____: has joined #ruby
[14:53:08] adaedra: toretore: no
[14:53:09] toretore: there's no difference between vating a file and netcating something
[14:53:34] toretore: to bash it's just data on stdin
[14:53:34] Papierkorb: toretore: are you one of those who think that navigating the source file tree is faster done using a graphical tool?
[14:53:38] FooMunki: has joined #ruby
[14:54:10] toretore: i have nothing against the command line and i'm quite comfortable with it, but the unix terminal environment is just super outdated and shitty
[14:54:27] adaedra: Who still uses vt100
[14:54:28] Papierkorb: shell scripting is for stuff like $ pacman -Qo /usr/bin/*(x) # Take all executable files and ask pacman which package owns it.
[14:54:35] Scriptonaut: Hrm, I have a bit of a problem, the text I need to output is prepended with color variables: ${green}\uf108 ${cpu cpu1}% \uf108 ${cpu cpu2}% ${blue}\uf0a0 $memperc%
[14:54:39] toretore: adaedra, everyone that uses unix
[14:54:45] Scriptonaut: and these variables don't exist in the conky script
[14:54:46] blub: what are some things that shell scripting is better at than perl or ruby with backticks
[14:54:48] toretore: terminals are still based on it
[14:54:49] sandstrom: has joined #ruby
[14:54:51] psye: has joined #ruby
[14:54:58] Scriptonaut: is there a way to delay the expansion of those variables until it gets to my bash script?
[14:55:03] Scriptonaut: and just output it from conky as plain text?
[14:55:06] Papierkorb: toretore: Great, I'm using a unixoid system
[14:55:07] adaedra: based on, yes. That's something else.
[14:55:30] lxsameer: has joined #ruby
[14:55:41] adaedra: Scriptonaut: there is surely a way of doing escape in conky. Read the man.
[14:55:42] toretore: based on = permeates its design and holds it back
[14:56:32] _orangejuice: has joined #ruby
[14:56:36] adaedra: the fact that we're based on vt100 is irrelevant imo, but if you need that to be hating, go on.
[14:56:43] Papierkorb: Know your tools. And use the right tool for the job. If you want to parse structured data like XML or JSON stuff with sed and friends, you'll have a bad time
[14:56:44] Scriptonaut: ok thank adaedra
[14:57:07] Papierkorb: That's not because the tools suck, but that you're trying to hammer in a picture on the wall with a screwdriver without a nail
[14:57:29] toretore: Papierkorb, that's it though, *everything* should be structured data in the first place
[14:57:33] Papierkorb: (for JSON scripting, one of the right tools would be 'jq')
[14:57:47] polishdub: has joined #ruby
[14:58:04] nixmaniack: has joined #ruby
[14:58:14] ddv: you should use regex to parse html
[14:58:20] lxsameer__: has joined #ruby
[14:58:47] adaedra: ACTION throws ddv in an active volcano
[14:58:58] choke: has joined #ruby
[15:00:01] gregf: has joined #ruby
[15:00:27] dkam_____: has joined #ruby
[15:00:31] TomPeed: has joined #ruby
[15:01:41] dlitvak: has joined #ruby
[15:03:23] sameerynho: has joined #ruby
[15:04:08] DonOtreply: has joined #ruby
[15:04:59] sergey_makagon: has joined #ruby
[15:05:09] weemsledeux: has joined #ruby
[15:05:14] YaknotiS: has joined #ruby
[15:05:44] bkxd: has joined #ruby
[15:06:06] maikowblue: has joined #ruby
[15:06:10] fmcgeough: has joined #ruby
[15:06:46] tAn: has joined #ruby
[15:08:47] decoponio: has joined #ruby
[15:09:07] treehug88: has joined #ruby
[15:09:09] aadam21: has joined #ruby
[15:09:27] mfb2: has joined #ruby
[15:09:37] dlitvak_: has joined #ruby
[15:11:10] djbkd: has joined #ruby
[15:13:11] noname: has joined #ruby
[15:14:33] dkam_____: has joined #ruby
[15:18:39] toretore: oh and i also like systemd so take that
[15:19:19] choke: has joined #ruby
[15:19:52] dkam_____: has joined #ruby
[15:19:57] Jardayn: has joined #ruby
[15:20:05] ruby[bot]: has joined #ruby
[15:20:54] kies^: has joined #ruby
[15:22:21] lxsameer__: has joined #ruby
[15:22:42] bricker: has joined #ruby
[15:23:14] tubulife-: has joined #ruby
[15:23:22] adaedra: and this is relevant because...?
[15:24:52] Xeago: has joined #ruby
[15:25:14] dkam_____: has joined #ruby
[15:25:29] sandstrom: has joined #ruby
[15:27:02] tenderlove: has joined #ruby
[15:28:11] duckpuppy: has joined #ruby
[15:28:12] hxegon: has joined #ruby
[15:28:31] krz: has joined #ruby
[15:31:43] choke: has joined #ruby
[15:32:03] mrtomme: has joined #ruby
[15:32:16] Ltnt_Hawkeye: has joined #ruby
[15:32:20] webus_: has joined #ruby
[15:33:34] themsay: has joined #ruby
[15:34:04] themsay: has joined #ruby
[15:35:03] peteyg_: has joined #ruby
[15:35:27] modin: has joined #ruby
[15:35:27] Croves: has joined #ruby
[15:36:23] momomomomo: has joined #ruby
[15:36:23] shibly: has joined #ruby
[15:36:32] shibly: Has ruby taken anything from python?
[15:37:09] soahccc: has joined #ruby
[15:37:12] Croves: Hi guys! What's wrong with this? `if i % 3 == 0 OR i % 5 == 0`
[15:37:40] apeiros: Croves: OR != or
[15:37:41] Croves: It says syntax error, unexpected tCONSTANT, expecting keyword_then or ';' or '\n'
[15:37:56] apeiros: also you probably should use ||
[15:38:04] Croves: apeiros: ouch!!
[15:38:11] Croves: apeiros: Thank you, sir!
[15:38:12] shibly: Is there any similarity of ruby with python?
[15:38:15] apeiros: I don't think `or` has the right precedence
[15:38:20] apeiros: ?guys Croves
[15:38:20] ruboto: Croves, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[15:38:20] ruby[bot]: apeiros: I don't see no Croves, whom should I tell about guys?
[15:38:31] df: has joined #ruby
[15:38:39] apeiros: ACTION kicks ruby[bot]
[15:38:56] apeiros: should have remembered to disable factoids while running it here :-S
[15:39:26] benlovell: has joined #ruby
[15:39:37] apeiros: but interesting that it failed to see Croves :-|
[15:39:45] dkam_____: has joined #ruby
[15:39:46] Croves: apeiros: Sorry! What's wrong calling everyone "guys"? It's a legit question, English isn't my first language
[15:40:11] choke: has joined #ruby
[15:40:18] apeiros: Croves: as the message says, there's plenty of people who don't feel included by "guys". and you don't know whether I'm a "sir" either. "thank you" is easily sufficient.
[15:41:30] Croves: apeiros: I tough that 'guys' and 'folks' where synonyms
[15:41:49] brunto: has joined #ruby
[15:41:52] apeiros: Croves: in some regions, yes
[15:41:59] shibly: Can anyone answer me?
[15:42:19] apeiros: and some people do consider it to be inclusive. but the point is that it's by far not everybody. so best not to use it if you want to address everybody.
[15:42:33] Ltnt_Hawkeye: has joined #ruby
[15:42:38] Croves: All right. Thank you, apeiros.
[15:42:44] apeiros: shibly: almost certainly some ideas from python ended up in ruby.
[15:42:58] apeiros: Croves: you're welcome :)
[15:43:13] apeiros: aaand figured why ruby[bot] failed to see Croves - users vs. user_map :-S
[15:43:29] symbol: has joined #ruby
[15:43:29] shibly: apeiros: No idea from python is not with ruby?
[15:43:29] apeiros: sooo after all it wasn't all bad it was accidentally activated in here :)
[15:43:39] apeiros: shibly: what?
[15:44:17] shibly: apeiros: Has any idea been implemented in ruby from python?
[15:44:27] shibly: Any similarity in syntax?
[15:44:28] apeiros: shibly: I already answered that.
[15:44:38] apeiros: 16:42 apeiros: shibly: almost certainly some ideas from python ended up in ruby.
[15:44:50] apeiros: is there any point to your question?
[15:44:57] shibly: What does that mean? I am not understanding
[15:45:09] pdoherty: has joined #ruby
[15:45:15] mrfoto: has left #ruby: ()
[15:45:24] mrfoto: has joined #ruby
[15:45:26] sameerynho: has joined #ruby
[15:45:31] apeiros: some ideas from python be in ruby
[15:45:58] shibly: Which idea?
[15:46:12] apeiros: don't know
[15:46:35] soahccc: I tested it generally but are there side effects when using throw inside a mutex synchronize? I assume it normally unlocks right?
[15:46:55] Scripore: has joined #ruby
[15:47:13] apeiros: soahccc: throwing to the outside of the mutex? it should always unlock.
[15:47:24] asmodlol: has joined #ruby
[15:47:33] dlitvak: has joined #ruby
[15:47:42] pawnbox_: has joined #ruby
[15:48:14] soahccc: apeiros: okay :) I rarely use throw and was not exactly sure it works there like exceptions
[15:48:17] arup_r: has joined #ruby
[15:48:34] Axsuul: has joined #ruby
[15:48:45] dhollinger: has joined #ruby
[15:49:19] kies^: has joined #ruby
[15:49:34] gheegh: has joined #ruby
[15:49:38] apeiros: soahccc: not even relevant. unlocking in mutex is ensured. no matter what you do, if you leave a mutex, it'll be unlocked.
[15:49:44] rippa: has joined #ruby
[15:49:52] apeiros: soahccc: unless of course you use manual .lock/.unlock, then you're on your own.
[15:50:08] Ltnt_Hawkeye: has joined #ruby
[15:50:35] pawnbox: has joined #ruby
[15:50:38] Asher1: has joined #ruby
[15:50:42] soahccc: apeiros: thanks for the clarification. no way I gonna do it manually :) all nice and clean synchronizes blocks
[15:50:58] dkam______: has joined #ruby
[15:51:13] sandstrom: has joined #ruby
[15:51:36] Xeago: has joined #ruby
[15:52:05] baweaver: has joined #ruby
[15:52:10] Asher: has joined #ruby
[15:52:19] shibly: has left #ruby: ()
[15:52:19] AckZ: has joined #ruby
[15:53:15] modin: has joined #ruby
[15:55:34] avenj: has joined #ruby
[15:55:34] avenj: has joined #ruby
[15:56:10] dkam______: has joined #ruby
[15:56:15] dlitvak: has joined #ruby
[15:56:59] chimche: has joined #ruby
[15:58:12] sandstrom: has joined #ruby
[15:58:50] skade: has joined #ruby
[15:58:55] momomomomo: has joined #ruby
[15:59:20] Ltnt_Hawkeye: has joined #ruby
[15:59:24] dlitvak: has joined #ruby
[15:59:45] dlitvak: has joined #ruby
[16:00:20] Vertroa: has joined #ruby
[16:00:45] diegoviola: I wonder if I'll be able to log in to some site with Net::HTTP, maintain the session and then perform another action that requires login
[16:00:48] diegoviola: while being logged in
[16:01:01] diegoviola: or should I use capybara/poltergeist for that?
[16:01:07] choke: has joined #ruby
[16:01:09] atumzin: has joined #ruby
[16:02:04] Macaveli: has joined #ruby
[16:02:34] apeiros: you can use Net::HTTP for that, but Mechanize already implements cookie/session for you.
[16:02:42] apeiros: you can also use capybara/poltergeist for that, yes.
[16:02:49] certainty: has joined #ruby
[16:03:04] apeiros: depending on the kind of login, you don't even need a session.
[16:04:12] dlitvak: has joined #ruby
[16:04:33] DonOtreply: has joined #ruby
[16:04:39] agentmeerkat: has joined #ruby
[16:04:43] FernandoBasso: has joined #ruby
[16:04:44] lacuna: has joined #ruby
[16:04:44] lacuna: has joined #ruby
[16:06:10] lacuna: has joined #ruby
[16:06:10] lacuna: has joined #ruby
[16:06:38] chouhoulis: has joined #ruby
[16:06:43] bkxd: has joined #ruby
[16:07:04] dionysus69: has joined #ruby
[16:07:10] ellisTAA: has joined #ruby
[16:09:24] asmodlol: has joined #ruby
[16:09:51] smactive: has joined #ruby
[16:10:27] rsc___: has joined #ruby
[16:10:57] RegulationD: has joined #ruby
[16:11:22] chouhoul_: has joined #ruby
[16:11:52] djbkd: has joined #ruby
[16:12:09] skade: has joined #ruby
[16:15:01] agentmeerkat: has joined #ruby
[16:15:05] Rodya_: has joined #ruby
[16:16:14] mary5030: has joined #ruby
[16:16:24] pawnbox: has joined #ruby
[16:16:31] baweaver: has joined #ruby
[16:17:32] friendofkiwi: has joined #ruby
[16:18:10] friendofkiwi: has left #ruby: ()
[16:18:43] davejlong: has joined #ruby
[16:19:48] edwinvdgraaf: has joined #ruby
[16:19:57] choke: has joined #ruby
[16:20:29] krz: has joined #ruby
[16:22:07] benlovell: has joined #ruby
[16:23:06] diegoviola: apeiros: it's a login via a form, the site doesn't appear to use CSRF protection
[16:23:29] diegoviola: it's not basic http auth
[16:25:56] dkam______: has joined #ruby
[16:29:19] jbrhbr: has joined #ruby
[16:29:23] dlitvak: has joined #ruby
[16:30:34] diegoviola: mechanize looks nice
[16:31:10] dkam______: has joined #ruby
[16:31:20] mistermocha: has joined #ruby
[16:32:04] choke: has joined #ruby
[16:32:32] sandstrom: has joined #ruby
[16:33:20] DaniG2k: has joined #ruby
[16:33:37] nofxx: has joined #ruby
[16:33:37] nofxx: has joined #ruby
[16:33:58] symm-: has joined #ruby
[16:35:03] jackcom: has left #ruby: ()
[16:35:14] sandstrom: has joined #ruby
[16:36:42] pawnbox: has joined #ruby
[16:37:28] pawnbox: has joined #ruby
[16:37:56] choke_: has joined #ruby
[16:41:52] dkam______: has joined #ruby
[16:41:53] joevandy1: string.gsub(/[^ [^[:cntrl:]] | [\s] ]/, '') -- getting a warning: character class has duplicated range: /[^ [^[:cntrl:]] | [\s] ]/
[16:42:03] joevandy1: trying to remove control characters but not whitespace from a string
[16:43:18] [Butch]: has joined #ruby
[16:44:03] wrilain: has joined #ruby
[16:44:10] Asher1: has joined #ruby
[16:45:04] mistermocha: has joined #ruby
[16:45:15] duckpuppy: has joined #ruby
[16:45:43] diegoviola: how is mechanize different than using capybara/poltergeist? I know they are different an one uses nokogiri and the other phantomjs
[16:46:10] snockerton: has joined #ruby
[16:46:29] cschneid_: has joined #ruby
[16:46:58] figgernucking: has joined #ruby
[16:47:06] diegoviola: they seem to do almost the same thing, no?
[16:47:15] dkam______: has joined #ruby
[16:47:45] sergey_makagon: has joined #ruby
[16:49:03] toretore: seems to me capybara is meant for testing
[16:49:05] mostlybadfly: has joined #ruby
[16:49:19] sandstrom: has joined #ruby
[16:49:43] diegoviola: and is it ok to use mechanize for the app itself?
[16:49:48] luckyme: has joined #ruby
[16:49:56] diegoviola: when I need that sort of functionality
[16:49:59] havenwood: diegoviola: That's generally what it's used for.
[16:50:03] toretore: and mechanize doesn't do js
[16:50:09] malconis_: has joined #ruby
[16:50:51] catphish: has joined #ruby
[16:50:55] diegoviola: capybara is used for testing, yes, but the README also says you can use it for scripting as well
[16:51:23] havenwood: diegoviola: Main purpose: "Acceptance test framework for web applications"
[16:51:27] diegoviola: https://github.com/jnicklas/capybara#using-the-dsl-elsewhere
[16:51:32] catphish: i'm looking for a way to play music in ruby, are there any obvious libraries to do this, or am i likely to need to manually decode and stream to the sound card?
[16:51:43] diegoviola: havenwood: makes sense
[16:51:52] diegoviola: havenwood: I'll try to convert some of my existing scripts to mechanize :P
[16:52:05] havenwood: catphish: Write your own music with SonicPi! (But what do you mean by play music?)
[16:52:32] catphish: havenwood: i mean i want to send an mp3 to my sound card
[16:52:34] dkam______: has joined #ruby
[16:53:02] havenwood: catphish: https://github.com/georgi/audite
[16:53:06] toretore: catphish, there are likely libraries for things like alsa and pulseaudio
[16:53:24] catphish: havenwood: thanks, that looks like it might be what i need!
[16:53:30] skade: has joined #ruby
[16:54:10] smbenfield: has joined #ruby
[16:54:46] tubulife-: has joined #ruby
[16:54:55] smbenfield: Hello! So I'm attempting to install django for python use, and Ruby isn't wanting to install rhc gem for OpenShift. Any ideas?
[16:55:45] wolffles: has joined #ruby
[16:55:57] pipework: has joined #ruby
[16:56:03] havenwood: smbenfield: Error: I don't want to?
[16:56:14] gregf: has joined #ruby
[16:56:41] havenwood: smbenfield: Getting an error?
[16:56:46] devbug: has joined #ruby
[16:56:59] choke: has joined #ruby
[16:57:49] ellisTAA: has joined #ruby
[16:57:56] dkam______: has joined #ruby
[16:58:01] dlitvak: has joined #ruby
[16:58:26] smbenfield: No, it's not an error.
[16:58:34] MattV: has joined #ruby
[16:58:36] smbenfield: It's just not doing anything.
[16:58:49] smbenfield: I let it sit for three hours and it wasn't doing anything after I attempted to intall it.
[16:58:50] havenwood: smbenfield: What do you type before it does nothing?
[16:59:24] dotix: has joined #ruby
[16:59:27] smbenfield: sudo gem install rdc
[16:59:31] hobodave: has joined #ruby
[16:59:38] havenwood: smbenfield: add: --verbose
[17:00:30] wrilain: has joined #ruby
[17:00:58] smbenfield: Okay, so... for a newbie, can you explain what that does?
[17:01:14] DonOtreply: has joined #ruby
[17:01:23] smbenfield: Does it just show me what it's doing, instead of doing it all under the hood?
[17:02:14] startupality: has joined #ruby
[17:02:14] choke: has joined #ruby
[17:03:59] havenwood: smbenfield: Yup, --verbose is a common flag to get a wordy output
[17:04:14] Mirry: has joined #ruby
[17:05:34] spooq|2: has joined #ruby
[17:08:12] certainty: has joined #ruby
[17:09:05] nerfando: has joined #ruby
[17:10:38] skade: has joined #ruby
[17:10:39] m3troX: has joined #ruby
[17:10:43] mary5030: has joined #ruby
[17:12:13] choke: has joined #ruby
[17:12:39] bricker: has joined #ruby
[17:12:39] djbkd: has joined #ruby
[17:12:42] dkam______: has joined #ruby
[17:12:59] sandstrom: has joined #ruby
[17:13:03] craigp: has joined #ruby
[17:13:03] Vertroa: has joined #ruby
[17:14:24] duderonomy: has joined #ruby
[17:14:24] sdothum: has joined #ruby
[17:14:40] mistermocha: has joined #ruby
[17:16:47] Bloomer: has joined #ruby
[17:18:11] dkam______: has joined #ruby
[17:18:55] m3troX: has left #ruby: ()
[17:20:27] dangeranger: has joined #ruby
[17:20:49] mezcan: has joined #ruby
[17:21:05] atumzin: has joined #ruby
[17:21:06] atumzin: has joined #ruby
[17:22:19] amclain: has joined #ruby
[17:23:00] shinnya: has joined #ruby
[17:23:09] babblebre: has joined #ruby
[17:23:28] catphish: havenwood: audite works but seems to perform extremely poorly for me, just trying to find an audio decoding library, surprisingly struggling, even the libav bindings don't seem to work for audio files
[17:23:31] dkam______: has joined #ruby
[17:23:39] catphish: thanks anyway :)
[17:23:42] dangeranger: has joined #ruby
[17:24:17] synthroid: has joined #ruby
[17:24:43] toretore: catphish, maybe try looking for audio decoding lib first, and then see if you can find ruby bindings for it
[17:25:04] TomyLobo: has joined #ruby
[17:25:25] jmignault: has joined #ruby
[17:26:31] startupality: has joined #ruby
[17:27:02] catphish: i'll try that, my first thought was libav, that seems to have a good binding, but it doesn't seem to deal with audio files well for some reason, will look at others
[17:28:54] dkam______: has joined #ruby
[17:29:49] celly: has joined #ruby
[17:30:01] [Butch]: has joined #ruby
[17:30:12] idefine: has joined #ruby
[17:30:41] momomomomo: has joined #ruby
[17:30:47] benlieb: has joined #ruby
[17:30:57] noname: has joined #ruby
[17:32:20] craigp: has joined #ruby
[17:32:52] nertzy: has joined #ruby
[17:33:39] choke: has joined #ruby
[17:34:20] pdoherty: has joined #ruby
[17:34:25] baweaver: has joined #ruby
[17:34:42] dkam______: has joined #ruby
[17:34:52] snowy: has joined #ruby
[17:35:07] hobodave_: has joined #ruby
[17:35:18] momomomomo: has joined #ruby
[17:35:55] agentmeerkat: has joined #ruby
[17:38:14] rrichardsr3: has joined #ruby
[17:38:22] dwfait: has joined #ruby
[17:39:54] dkam______: has joined #ruby
[17:40:46] yqt: has joined #ruby
[17:41:20] varesa: has joined #ruby
[17:41:34] diegoviola: https://gist.github.com/diegoviola/3d20e62601aa4854a63e
[17:42:06] diegoviola: not sure how I'm supposed to set my password here
[17:42:08] MattV: has left #ruby: ()
[17:42:18] momomomomo: has joined #ruby
[17:42:26] diegoviola: I'm trying to use mechanize to login on a form
[17:42:42] bluOxigen_: has joined #ruby
[17:43:31] sandstrom: has joined #ruby
[17:43:34] diegoviola: ok form['password']
[17:45:16] beanHolez: has joined #ruby
[17:45:17] ascarter: has joined #ruby
[17:45:18] dkam______: has joined #ruby
[17:45:44] davejlong: has joined #ruby
[17:45:52] davejlong: has joined #ruby
[17:46:21] underplank: has joined #ruby
[17:49:42] jackjackdripper: has joined #ruby
[17:50:24] jbrhbr: has joined #ruby
[17:50:38] dkam______: has joined #ruby
[17:51:24] craigp: has joined #ruby
[17:52:01] snowy: has joined #ruby
[17:52:51] choke: has joined #ruby
[17:53:58] rrichardsr3: has joined #ruby
[17:55:16] Mirry: has joined #ruby
[17:55:40] rrichardsr3: has joined #ruby
[17:56:31] einarj: has joined #ruby
[17:56:45] rsc___: has joined #ruby
[17:57:51] diggernick: has joined #ruby
[17:57:53] diggernick: what is a good evernote alternative for ubuntu?
[17:57:55] axl_: has joined #ruby
[17:58:20] zast: has joined #ruby
[17:58:36] ruboto: fflush, apeiros, banisterfiend, seanstickle, Mon_Ouie, zzak, Radar, Havenn, jhass, sevenseacat, miah, workmad3, Coraline, drbrain, zenspider, slyphon, rubyhacker1, Aria, ljarvis, baweaver, Adaedra
[17:59:00] diegoviola: havenwood: I'm writing some rake tasks that should "simulate the user experience" in order to benchmark the time it takes to perform different actions, do you think for these cases mechanize is fine? or I should use capybara+poltergeist?
[17:59:02] troulouliou_div2: has joined #ruby
[17:59:19] dopie2: has joined #ruby
[17:59:45] rrichard_: has joined #ruby
[18:00:16] jhass: !ban diggernick !T 1w bad nick
[18:00:22] ChanServ: +b diggernick!*@*
[18:00:22] ChanServ: ChanServ kicked diggernick: bad nick
[18:00:51] dotix: has joined #ruby
[18:01:18] wsewolod: has joined #ruby
[18:01:21] bluOxigen: has joined #ruby
[18:01:22] finisherr: has joined #ruby
[18:01:43] firstdayonthejob: has joined #ruby
[18:01:51] snockerton1: has joined #ruby
[18:02:38] diegoviola: it feels wrong to use capybara outside of testing
[18:02:50] choke: has joined #ruby
[18:03:39] idefine: has joined #ruby
[18:04:02] Scriptonaut: has left #ruby: ()
[18:04:46] blackjid: has joined #ruby
[18:04:55] radgeRayden: has joined #ruby
[18:05:04] nunchuck: has joined #ruby
[18:05:30] dkam______: has joined #ruby
[18:06:09] baweaver: has joined #ruby
[18:06:11] guacamole: has joined #ruby
[18:06:16] lacuna: has joined #ruby
[18:06:17] lacuna: has joined #ruby
[18:06:56] jbrhbr: anyone know offhand if there's a rubocop rule for detecting { 'foo': 3 } (as opposed to { foo: 3 })? i'm not seeing one
[18:07:16] bkxd: has joined #ruby
[18:07:17] sigurding: has joined #ruby
[18:08:15] idefine: has joined #ruby
[18:08:50] twalla: has joined #ruby
[18:10:17] startupality: has joined #ruby
[18:10:48] aegis3121: has joined #ruby
[18:10:53] dkam______: has joined #ruby
[18:11:52] guacamole: has joined #ruby
[18:11:52] northfurr: has joined #ruby
[18:11:59] chipotle: has joined #ruby
[18:12:42] twalla: hey guys, i've got this script that manages some of our AWS RDS stuff and i need some input on the best way to write a function that waits for an operation to complete
[18:12:56] twalla: http://hastebin.com/etoxofisal.rb
[18:13:25] djbkd: has joined #ruby
[18:13:43] benlieb: In irb I have this coming from my db: :text => "<h2><span class=\"head\">asd</span></h2>\n<p>Anna Szpanski<span class=\"note\" id=\"Note1\"> how can I print this to the console ???expanded???, or unescaped, so that the new lines are actual new lines?
[18:14:09] vbatts|work: has joined #ruby
[18:14:18] vbatts|work: has left #ruby: ()
[18:14:55] iateadonut: has left #ruby: ()
[18:15:28] aegis3121: >> puts "blah\ntaco"
[18:15:30] ruboto: aegis3121 # => blah ...check link for more (https://eval.in/498800)
[18:15:48] choke: has joined #ruby
[18:15:50] mfb2: has joined #ruby
[18:15:53] r_rios: has joined #ruby
[18:15:53] r_rios: has joined #ruby
[18:17:13] lucasb: has joined #ruby
[18:17:35] benlieb: awesome. That was actually the first thing I tried, but I see where I mis-stepped.
[18:17:44] northfurr: has joined #ruby
[18:17:45] choke: has joined #ruby
[18:19:15] mfb2_: has joined #ruby
[18:20:16] mjuszczak: has joined #ruby
[18:20:29] roshanavand: has joined #ruby
[18:20:36] devbug: has joined #ruby
[18:20:51] JakFrist: has joined #ruby
[18:21:01] tubuliferous_: has joined #ruby
[18:21:41] dkam______: has joined #ruby
[18:22:06] diegoviola: once I'm logged in I should be able to jump from page to page with mechanize, right?
[18:22:17] diegoviola: do other actions that require login
[18:24:59] chimche: has joined #ruby
[18:26:56] dkam______: has joined #ruby
[18:27:59] guacamole: has joined #ruby
[18:30:13] choke: has joined #ruby
[18:31:36] gigetoo: has joined #ruby
[18:32:13] diegoviola: I can't login via mechanize for some reason
[18:32:17] dkam______: has joined #ruby
[18:32:59] pawnbox: has joined #ruby
[18:34:37] Xeago: has joined #ruby
[18:34:47] beanHolez: has joined #ruby
[18:35:51] Vertroa: has joined #ruby
[18:36:33] diegoviola: https://gist.github.com/diegoviola/1e7772d88381ece8e510
[18:36:39] diegoviola: any ideas what I'm doing wrong here?
[18:36:46] diegoviola: I just get the same login page again
[18:37:15] chipotle: has joined #ruby
[18:37:33] n00bDev: has joined #ruby
[18:37:42] dkam______: has joined #ruby
[18:38:40] zotherstupidguy: has joined #ruby
[18:38:43] pawnbox: has joined #ruby
[18:38:47] hxegon: has joined #ruby
[18:39:02] curses: has joined #ruby
[18:42:22] chimche: has joined #ruby
[18:43:00] dkam______: has joined #ruby
[18:43:18] startupality: has joined #ruby
[18:43:34] harai: has joined #ruby
[18:44:20] edwinvdgraaf: has joined #ruby
[18:44:44] stannard: has joined #ruby
[18:45:11] colegatron: has joined #ruby
[18:45:17] zast: has joined #ruby
[18:46:03] chimche: has joined #ruby
[18:46:24] al2o3-cr: diegoviola: try `form['LoginForm[username]'] = "username" and form['LoginForm[password]'] = "password"`
[18:46:56] Frem: has joined #ruby
[18:47:58] jbrhbr: has joined #ruby
[18:48:19] dkam______: has joined #ruby
[18:48:40] choke: has joined #ruby
[18:49:25] momomomomo: has joined #ruby
[18:49:54] asmodlol: has joined #ruby
[18:49:54] pawnbox: has joined #ruby
[18:50:30] diegoviola: al2o3-cr: that did it, thanks
[18:50:32] HANJIN: has joined #ruby
[18:50:59] dlitvak_: has joined #ruby
[18:51:06] steffkes: has joined #ruby
[18:51:07] steffkes: has joined #ruby
[18:52:06] dopie: has joined #ruby
[18:53:16] northfurr: has joined #ruby
[18:53:41] dkam______: has joined #ruby
[18:54:43] snowy: has joined #ruby
[18:55:06] tvw: has joined #ruby
[18:56:22] hobodave: has joined #ruby
[18:57:33] momomomomo: has joined #ruby
[18:57:50] kspencer: Resource interpreted as Document but transferred with MIME type application/json: "http://url.here".
[18:57:59] rrichardsr3: has joined #ruby
[18:58:07] gusTester: has joined #ruby
[18:58:21] zacts: ruby my dear
[18:58:26] zacts: good morning #ruby
[18:59:02] dkam______: has joined #ruby
[18:59:40] kspencer: granted, I want it to come up as just json, so would there be anything else I need to do?
[19:01:44] choke: has joined #ruby
[19:02:06] rrichard_: has joined #ruby
[19:03:26] diegoviola: I filled in a form via post with mechanize, and that should download a file
[19:03:36] diegoviola: but I don't know how to trigger the download via mechanize
[19:03:45] juddey: has joined #ruby
[19:04:10] guacamole: has joined #ruby
[19:04:20] diegoviola: should the file just appear in ~/Downloads/ after I submit the form?
[19:04:21] dkam______: has joined #ruby
[19:05:09] hobodave_: has joined #ruby
[19:05:57] drbrain: diegoviola: you'll get back a Page object and you'll have to .download it
[19:06:33] edwinvdgraaf: has joined #ruby
[19:06:44] drbrain: diegoviola: sorry, .save
[19:07:26] ur5us: has joined #ruby
[19:07:51] futilegames: has joined #ruby
[19:08:34] edwinvdgraaf: has joined #ruby
[19:08:37] drbrain: diegoviola: see also Mechanize::PluggableParser
[19:08:51] diegoviola: .save just saves the current page
[19:08:54] drbrain: it has documentation for how to use Mechanize::Download to auto-download things
[19:09:26] drbrain: diegoviola: the result you get back from submitting the form should have the downloadable content
[19:09:43] dkam______: has joined #ruby
[19:09:52] drbrain: result = form.submit; result.save # this doesn't do it?
[19:10:14] certainty: has joined #ruby
[19:10:42] usershell: has joined #ruby
[19:11:22] drbrain: if not, that might be that attachment header thing that I don't recall offhand
[19:11:24] pawnbox: has joined #ruby
[19:11:29] diegoviola: nope, I get the full page with the form again
[19:12:00] drbrain: I think there's another method to check those headers
[19:12:26] drbrain: can you gist result.headers.keys?
[19:12:48] chipotle: has joined #ruby
[19:12:59] farooghkz: has joined #ruby
[19:13:05] norc: has joined #ruby
[19:13:17] edwinvdgraaf: has joined #ruby
[19:13:33] diegoviola: there is no headers method for result
[19:13:42] farooghkz: has left #ruby: ()
[19:13:44] norc: >> i = 2; p eval("i*2")
[19:13:45] ruboto: norc # => 4 ...check link for more (https://eval.in/498818)
[19:13:48] norc: Now this is interesting..
[19:13:53] baweaver: has joined #ruby
[19:14:19] dlitvak: has joined #ruby
[19:14:21] djbkd: has joined #ruby
[19:14:23] edwinvdgraaf: has joined #ruby
[19:14:39] ur5us: has joined #ruby
[19:14:52] dlitvak: has joined #ruby
[19:15:03] dkam______: has joined #ruby
[19:16:26] nertzy: has joined #ruby
[19:16:39] Xeago: has joined #ruby
[19:17:15] mjuszczak: has joined #ruby
[19:17:37] mauricio_: has joined #ruby
[19:18:14] drbrain: diegoviola: try result.response.keys
[19:19:15] drbrain: ah, Content-Disposition
[19:19:15] edwinvdgraaf: has joined #ruby
[19:19:29] audiodude: has joined #ruby
[19:20:13] choke: has joined #ruby
[19:20:26] zeroDivisible: has joined #ruby
[19:20:34] dkam______: has joined #ruby
[19:20:52] cpup: has joined #ruby
[19:21:36] drbrain: looking at mechanize, if you get a Content-Disposition header back .save should work, so maybe there's something missing in submitting the form?
[19:22:19] diegoviola: irb(main):025:0> result.response.keys
[19:22:21] diegoviola: => ["date", "server", "x-powered-by", "expires", "cache-control", "pragma", "keep-alive", "connection", "transfer-encoding", "content-type"]
[19:22:40] asherdowd: has joined #ruby
[19:23:02] govg: has joined #ruby
[19:23:03] dlitvak_: has joined #ruby
[19:23:08] edwinvdgraaf: has joined #ruby
[19:23:20] drbrain: my guess, then, is there's some error in the form
[19:23:30] drbrain: maybe JS is supposed to be computing some hidden field?
[19:24:47] NoTroutAboutIt: has joined #ruby
[19:25:03] diegoviola: https://gist.github.com/diegoviola/4f47f19b45614eb3af9a
[19:25:07] diegoviola: this is what the agent.page.forms looks like
[19:25:33] BSaboia: has joined #ruby
[19:25:37] diegoviola: I did form = agent.page.forms.first; form['datainicio'] = "2016-01-01"; form['datafinal'] = "2016-01-07"
[19:25:45] diegoviola: then form.submit
[19:26:05] usershell: has joined #ruby
[19:26:34] diegoviola: the site uses some datepicker thing for the inputs
[19:26:40] diegoviola: but other than that I have no idea
[19:27:06] diegoviola: <input name="datainicio" type="text" id="datepicker1" size="15" />
[19:27:11] drbrain: and nothing obvious in the HTML indicating something isn't filled out right?
[19:27:32] Mon_Ouie: has joined #ruby
[19:27:49] drbrain: my next step would be using a browser's inspector to see why it works
[19:28:05] aef: has joined #ruby
[19:28:06] drbrain: ??? the easy thing to try is setting the mechanize user-agent to a browser's agent
[19:28:22] dopie: has joined #ruby
[19:28:47] peteyg: has joined #ruby
[19:29:29] jud^: has joined #ruby
[19:30:35] gusTester1: has joined #ruby
[19:30:39] diegoviola: I'll try that
[19:30:42] aegis3121: has joined #ruby
[19:30:50] GinoManWorks: has joined #ruby
[19:31:21] gusTester1: has left #ruby: ()
[19:31:32] ur5us_: has joined #ruby
[19:31:37] treehug88: has joined #ruby
[19:31:58] ReK2: has joined #ruby
[19:32:04] spider-mario: has joined #ruby
[19:32:15] treehug88: has joined #ruby
[19:32:18] ruboto_: has joined #ruby
[19:32:32] borkdude: has joined #ruby
[19:32:33] drbrain: The worst website I've used with mechanize was ADP's, utterly incomprehensible for no discernible reason
[19:32:37] hannelita: has joined #ruby
[19:32:47] Vertroa: has joined #ruby
[19:32:57] webhat_: has joined #ruby
[19:33:05] neanderslob_: has joined #ruby
[19:33:12] diegoviola: drbrain: I tried setting it to 'Mac Safari' but nothing still
[19:33:26] badeball_: has joined #ruby
[19:33:34] diegoviola: form.submit will just render the same form
[19:33:39] chihhsin_: has joined #ruby
[19:33:39] shadeslayer_: has joined #ruby
[19:33:44] stryek_: has joined #ruby
[19:33:52] gregf: has joined #ruby
[19:33:58] diegoviola: form.submit.save will save a copy of the index html
[19:34:00] ddubs_: has joined #ruby
[19:34:00] ljarvis_: has joined #ruby
[19:34:01] guacamole: has joined #ruby
[19:34:11] havenwood: diegoviola: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/601.4.2 (KHTML, like Gecko) Version/9.0.3 Safari/601.4.2
[19:34:26] justinweiss_: has joined #ruby
[19:34:32] jxf_: has joined #ruby
[19:34:42] ramblinpeck_: has joined #ruby
[19:34:43] mroth_: has joined #ruby
[19:34:59] S01780_: has joined #ruby
[19:35:05] Zarthus_: has joined #ruby
[19:35:18] dkam______: has joined #ruby
[19:35:27] spastorino_: has joined #ruby
[19:35:27] baweaver: has joined #ruby
[19:35:37] avdi_: has joined #ruby
[19:35:41] havenwood: diegoviola: Or another example: Mozilla/5.0 (Windows NT 6.3; Win64, x64; Trident/7.0; rv:11.0) like Gecko
[19:35:43] lucas: has joined #ruby
[19:35:46] diegoviola: I added that, but I don't think that's the issue
[19:35:50] diegoviola: I still get the same page
[19:36:14] rsc___: has joined #ruby
[19:36:20] mary5030: has joined #ruby
[19:36:24] DoubleMalt: has joined #ruby
[19:36:37] thesheff17_: has joined #ruby
[19:36:41] havenwood: diegoviola: I guess there's: Mechanize::AGENT_ALIASES
[19:37:04] havenwood: diegoviola: But yeah, if it's not the agent then that's beside the point.
[19:37:06] diegoviola: https://gist.github.com/diegoviola/df3f46ceac8bf598e84a
[19:37:08] dlitvak: has joined #ruby
[19:37:17] constantinexvi_: has joined #ruby
[19:37:19] SirCmpwn_: has joined #ruby
[19:37:20] Plas: has joined #ruby
[19:37:20] TakumoKatekari: has joined #ruby
[19:37:21] TakumoKatekari: has joined #ruby
[19:37:23] absolutejam_: has joined #ruby
[19:37:24] paultreny_: has joined #ruby
[19:37:24] xirdtegmezkfoyom: has joined #ruby
[19:37:31] edwardly_: has joined #ruby
[19:37:31] edwardly_: has joined #ruby
[19:37:36] SirFunk_: has joined #ruby
[19:37:49] nizmow-: has joined #ruby
[19:37:58] akkad_: has joined #ruby
[19:38:02] varesa-: has joined #ruby
[19:38:06] martinbjeldbak: has joined #ruby
[19:38:27] jmcc______: has joined #ruby
[19:38:28] sgrdrnk: has joined #ruby
[19:38:38] Dimik: has joined #ruby
[19:38:48] Omni-: has joined #ruby
[19:38:48] choke: has joined #ruby
[19:38:55] _joes_: has joined #ruby
[19:38:55] nunchuck: has joined #ruby
[19:39:10] NoTroutAboutIt: has joined #ruby
[19:39:25] sumark: has joined #ruby
[19:39:34] flughafen: has joined #ruby
[19:40:04] asmodlol: has joined #ruby
[19:40:04] cookiez: has joined #ruby
[19:40:04] Nanuq: has joined #ruby
[19:40:05] LBRapid: has joined #ruby
[19:40:21] johnny56_: has joined #ruby
[19:40:27] Nightmare: has joined #ruby
[19:40:29] devster31: has joined #ruby
[19:40:30] dlitvak: has joined #ruby
[19:40:34] modin: has joined #ruby
[19:40:39] Trieste: has joined #ruby
[19:40:40] Meow-J_: has joined #ruby
[19:40:42] dkam______: has joined #ruby
[19:40:55] anekos: has joined #ruby
[19:41:02] rns: has joined #ruby
[19:41:05] ddfreyne: has joined #ruby
[19:41:18] arup_r: has joined #ruby
[19:41:25] einarj: has joined #ruby
[19:41:25] apeiros: sublime's yaml highlighting is really weird
[19:41:25] st1gma: has joined #ruby
[19:42:37] adaedra: No, it's sublime
[19:42:45] greister: has joined #ruby
[19:42:46] adaedra: ACTION runs towards the exit
[19:43:08] davejlong: has joined #ruby
[19:43:18] diegoviola: also, if it's a xls file (binary), am I supposed to see anything about this file when I do form.submit?
[19:43:31] Vertroa: has joined #ruby
[19:43:47] jud: has joined #ruby
[19:43:57] einarj: has joined #ruby
[19:44:29] Vile`: has joined #ruby
[19:44:30] ziyadb: has joined #ruby
[19:44:32] diegoviola: [diego@myhost ~]$ file Downloads/20160107204229.xls
[19:44:35] diegoviola: Downloads/20160107204229.xls: HTML document, UTF-8 Unicode (with BOM) text, with very long lines, with no line terminators
[19:44:39] danzilio: has joined #ruby
[19:44:42] nofxx: has joined #ruby
[19:44:43] nofxx: has joined #ruby
[19:44:49] kriskropd: has joined #ruby
[19:44:54] diegoviola: XLS == HTML... whaaat?
[19:44:54] eggoez: has joined #ruby
[19:45:05] DonOtreply: has joined #ruby
[19:45:10] amitchellbullard: has joined #ruby
[19:45:28] drbrain: diegoviola: if it is an unknown content-type you'll get a Mechanize::File (generic type) instead of Mechanize::Page
[19:45:54] choke_: has joined #ruby
[19:45:55] adaedra: diegoviola: magic is far away from perfect.
[19:46:01] dkam______: has joined #ruby
[19:46:19] adaedra: diegoviola: but look anyway, it can also be that you downloaded an error page.
[19:46:38] ixti: has joined #ruby
[19:47:22] kalz: has joined #ruby
[19:47:41] smactive: has joined #ruby
[19:48:03] nibbo: has joined #ruby
[19:48:14] benlovell: has joined #ruby
[19:48:20] asmodlol: has joined #ruby
[19:48:46] wsewolod: has joined #ruby
[19:48:55] arup_r: has joined #ruby
[19:50:02] M-Kodo: has joined #ruby
[19:50:18] choke: has joined #ruby
[19:51:48] dkam______: has joined #ruby
[19:52:04] kirun: has joined #ruby
[19:52:59] diegoviola: yeah I don't know what's going on
[19:53:01] duckpuppy: has joined #ruby
[19:53:12] diegoviola: form.submit.save returns the same html page
[19:53:21] diegoviola: where I'm supposed to add the date range to get the file
[19:54:31] benlovell: has joined #ruby
[19:55:30] dotix: has joined #ruby
[19:56:18] davejlong: has joined #ruby
[19:56:44] aef: has joined #ruby
[19:57:03] hxegon_: has joined #ruby
[19:57:05] dkam______: has joined #ruby
[19:57:18] al2o3-cr: has joined #ruby
[19:57:26] cschneid: has joined #ruby
[19:58:21] FernandoBasso: has joined #ruby
[19:58:54] [Butch]_: has joined #ruby
[19:59:21] mjuszczak: has joined #ruby
[20:00:04] mjuszczak: has joined #ruby
[20:00:57] choke: has joined #ruby
[20:01:54] edwinvdgraaf: has joined #ruby
[20:02:33] dkam______: has joined #ruby
[20:03:19] Oog: has joined #ruby
[20:03:48] nixmaniack: has joined #ruby
[20:03:59] al2o3-cr: has joined #ruby
[20:04:44] minimalism: has joined #ruby
[20:05:19] dlitvak: has joined #ruby
[20:05:25] Oog: can someone explain to me why last = city_parts.pop; city_parts[-1] += " #{last}" gives different result in city_parts than city_parts[-2] += " #{city_parts.pop}" - it makes no sense...
[20:06:19] eljimmy: has joined #ruby
[20:06:27] mrfoto: has joined #ruby
[20:07:21] synthroid: has joined #ruby
[20:07:55] dkam______: has joined #ruby
[20:07:57] bkxd: has joined #ruby
[20:08:13] apeiros: Oog: in your latter example, the .pop must be executed before ruby can run +=
[20:08:28] apeiros: so essentially the latter example is like the former, but with += on -2 instead of -1
[20:08:42] choke_: has joined #ruby
[20:08:49] Oog: so that is what i thought... so then i tried -1 and it did somethign real screwy
[20:08:58] Oog: city_parts[-1] += " #{city_parts.pop}" is also different...
[20:09:05] devbug: has joined #ruby
[20:09:13] Oog: head -> desk
[20:09:18] apeiros: and that's because a += b is not a single operation. it expands to a = a + b
[20:09:37] apeiros: expand your expression and think about it, especially about the required execution order.
[20:09:51] Oog: ha ok i see
[20:11:08] MEATCHICKEN: has joined #ruby
[20:11:17] M-Kodo: has joined #ruby
[20:11:25] xxneolithicxx: has joined #ruby
[20:11:52] xxneolithicxx: has joined #ruby
[20:12:28] weemsledeux: has joined #ruby
[20:13:07] dkam______: has joined #ruby
[20:14:21] nerfando: has joined #ruby
[20:14:56] djbkd: has joined #ruby
[20:14:58] yqt: has joined #ruby
[20:15:28] nerfando: has joined #ruby
[20:15:53] sdothum: has joined #ruby
[20:16:23] pawnbox: has joined #ruby
[20:16:28] M-mistake: has joined #ruby
[20:17:04] davedev24: has joined #ruby
[20:17:22] norc: Okay, I really want a&.[0] to work... :S
[20:17:31] foureight84: has joined #ruby
[20:17:35] norc: a&.[](0) just looks plain silly.
[20:17:41] choke: has joined #ruby
[20:18:04] edwinvdgraaf: has joined #ruby
[20:18:28] dkam______: has joined #ruby
[20:18:28] guacamole: has joined #ruby
[20:19:56] duckpuppy: has joined #ruby
[20:20:04] ljarvis_: it's an antipattern anyway
[20:20:15] futilegames: has joined #ruby
[20:22:28] hxegon: has joined #ruby
[20:23:54] snockerton: has joined #ruby
[20:23:55] amclain_: has joined #ruby
[20:23:55] stannard: has joined #ruby
[20:23:55] dkam_______: has joined #ruby
[20:24:17] nixmaniack: has joined #ruby
[20:24:17] nixmaniack: has joined #ruby
[20:24:19] guacamole: has joined #ruby
[20:24:31] asherdowd: has left #ruby: ()
[20:25:07] momomomomo_: has joined #ruby
[20:25:14] choke: has joined #ruby
[20:25:57] dlitvak: has joined #ruby
[20:26:04] baweaver: has joined #ruby
[20:26:04] RegulationD: has joined #ruby
[20:26:06] yfeldblum: has joined #ruby
[20:27:17] cyrus_mc: has joined #ruby
[20:27:58] DonOtreply: has joined #ruby
[20:28:09] cyrus_mc: Developing a simple ruby script, requires json. Script complains no such file to load -- json. But the json rubygem is installed. Another system I have runs this script no problem. Compared packages installed, versions, etc they all seem to match
[20:28:51] mfb2: has joined #ruby
[20:29:11] dkam_______: has joined #ruby
[20:29:15] harai54: has joined #ruby
[20:30:29] havenwood: cyrus_mc: What version of Ruby? JSON ships with the stdlib these days.
[20:31:11] cyrus_mc: this is on a centos 6 machine so 1.8.7
[20:31:34] havenwood: cyrus_mc: In 1.8 you used to have to: require 'rubygems'
[20:31:38] einarj: has joined #ruby
[20:32:33] mdw: has joined #ruby
[20:32:43] cyrus_mc: havenwood: k. wondeirng why it is working on another machine without that require (same OS, same ruby, etc)
[20:32:51] cyrus_mc: but adding require 'rubygems' worked
[20:33:00] dlitvak: has joined #ruby
[20:33:08] beanHolez: has joined #ruby
[20:33:16] haraigo: has joined #ruby
[20:33:49] shevy: centos - the snail among distributions!
[20:33:56] einarj_: has joined #ruby
[20:34:31] dkam_______: has joined #ruby
[20:34:37] solocshaw: has joined #ruby
[20:34:58] dlitvak: has joined #ruby
[20:36:15] mistermo_: has joined #ruby
[20:36:33] norc: ljarvis_: What do you mean?
[20:37:40] al2o3-cr: has joined #ruby
[20:39:51] Pumukel: has joined #ruby
[20:39:52] dkam_______: has joined #ruby
[20:39:53] treehug88: has joined #ruby
[20:40:07] bb010g: has joined #ruby
[20:41:14] M-mistake: has joined #ruby
[20:44:05] futilegames: has joined #ruby
[20:45:18] CorySimmons: has joined #ruby
[20:45:22] dkam_______: has joined #ruby
[20:45:59] Pumukel: has joined #ruby
[20:46:54] derailed: has joined #ruby
[20:48:19] dangeranger: has joined #ruby
[20:49:25] choke: has joined #ruby
[20:50:34] dkam_______: has joined #ruby
[20:50:52] dlitvak: has joined #ruby
[20:51:33] despai: has joined #ruby
[20:51:58] Xeago: has joined #ruby
[20:52:21] bkxd: has joined #ruby
[20:53:08] SenpaiSilver: has joined #ruby
[20:53:10] guacamole: has joined #ruby
[20:53:53] skcin7: has joined #ruby
[20:54:17] eljimmy: has joined #ruby
[20:54:23] dpg1: has joined #ruby
[20:54:26] dopie: has joined #ruby
[20:54:46] dmr8: has joined #ruby
[20:55:43] gp5st1: has joined #ruby
[20:55:46] gregf1: has joined #ruby
[20:55:58] dkam_______: has joined #ruby
[20:55:58] gp5st1: anyone familar with authenticating against a postgres server using gssapi?
[20:56:41] Vertroa: has joined #ruby
[20:56:55] arup_r: has joined #ruby
[20:57:22] baweaver: has joined #ruby
[21:00:15] bkxd: has joined #ruby
[21:00:42] ta0_: has joined #ruby
[21:00:48] pdoherty: has joined #ruby
[21:01:16] dkam_______: has joined #ruby
[21:01:44] choke: has joined #ruby
[21:02:45] snowy: has joined #ruby
[21:03:39] dotix: has joined #ruby
[21:03:40] dotix: has joined #ruby
[21:05:25] beanHolez: has joined #ruby
[21:05:46] Vertroa_: has joined #ruby
[21:06:16] davejlong: has joined #ruby
[21:06:32] pawnbox: has joined #ruby
[21:06:36] dkam_______: has joined #ruby
[21:07:36] guacamole: has joined #ruby
[21:08:17] zapata: has joined #ruby
[21:09:40] diegoviola: drbrain, havenwood
[21:09:55] diegoviola: I was able to get the file with mechanize
[21:10:21] emilkarl: has joined #ruby
[21:10:25] diegoviola: https://gist.github.com/e23a3bcb3085e17f2121
[21:10:27] diegoviola: this worked for me
[21:11:00] certainty: has joined #ruby
[21:11:14] sosuniverse: has joined #ruby
[21:11:50] M-Kodo: has joined #ruby
[21:12:00] Macaveli: has joined #ruby
[21:12:07] dkam_______: has joined #ruby
[21:12:35] al2o3-cr: has joined #ruby
[21:12:36] asmodlol: has joined #ruby
[21:13:16] weemsledeux: has joined #ruby
[21:14:25] foureight84_: has joined #ruby
[21:15:43] djbkd: has joined #ruby
[21:16:03] shevy: diegoviola hehe what is the require 'pry' doing there
[21:17:07] baweaver: has joined #ruby
[21:17:07] diegoviola: shevy: that helps me to debug things
[21:17:20] dkam_______: has joined #ruby
[21:17:50] momomomomo: has joined #ruby
[21:17:59] dopie: has joined #ruby
[21:21:41] mary5030: has joined #ruby
[21:22:41] dkam_______: has joined #ruby
[21:23:08] choke: has joined #ruby
[21:23:55] Coldblackice: has joined #ruby
[21:25:29] momomomomo_: has joined #ruby
[21:25:45] blackgoat: has joined #ruby
[21:28:01] dkam_______: has joined #ruby
[21:28:28] roshanavand: has joined #ruby
[21:29:13] dlitvak: has joined #ruby
[21:29:14] mistermocha: has joined #ruby
[21:30:03] Xeago: has joined #ruby
[21:30:08] lmao_ayy: has joined #ruby
[21:30:56] lmao_ayy: has left #ruby: ()
[21:32:31] Majora: has joined #ruby
[21:32:39] mistermocha: has joined #ruby
[21:32:41] Majora: Hi everyone ^^
[21:33:05] edwinvdgraaf: has joined #ruby
[21:35:34] baweaver: has joined #ruby
[21:35:35] j_mcnally: has joined #ruby
[21:36:03] roshanavand: has joined #ruby
[21:36:23] yeticry: has joined #ruby
[21:36:57] choke: has joined #ruby
[21:37:14] dlitvak: has joined #ruby
[21:37:18] Majora: ACTION waves to choke
[21:37:49] duckpuppy: has joined #ruby
[21:39:29] teoric: has joined #ruby
[21:40:21] malconis: has joined #ruby
[21:43:21] dlitvak_: has joined #ruby
[21:44:14] baweaver: has joined #ruby
[21:44:24] northfurr: has joined #ruby
[21:47:36] dlitvak: has joined #ruby
[21:48:20] edwinvdgraaf: has joined #ruby
[21:49:47] roshanavand: has joined #ruby
[21:50:33] AustinMatherne: has joined #ruby
[21:50:59] emilkarl: has joined #ruby
[21:51:16] Kabaka: has joined #ruby
[21:51:38] beanHolez: has joined #ruby
[21:51:38] pdoherty: has joined #ruby
[21:51:38] stannard: has joined #ruby
[21:51:38] amclain_: has joined #ruby
[21:51:38] cschneid: has joined #ruby
[21:51:39] wsewolod: has joined #ruby
[21:51:39] ixti: has joined #ruby
[21:51:39] eggoez: has joined #ruby
[21:51:39] ddfreyne: has joined #ruby
[21:51:39] Nightmare: has joined #ruby
[21:51:39] flughafen: has joined #ruby
[21:51:39] constantinexvi_: has joined #ruby
[21:51:39] avdi: has joined #ruby
[21:51:39] Zarthus: has joined #ruby
[21:51:39] borkdude: has joined #ruby
[21:51:39] rrichard_: has joined #ruby
[21:51:39] colegatron: has joined #ruby
[21:51:39] babblebre: has joined #ruby
[21:51:39] avenj: has joined #ruby
[21:51:39] blackms: has joined #ruby
[21:51:39] blub: has joined #ruby
[21:51:40] llua: has joined #ruby
[21:51:40] craysiii: has joined #ruby
[21:51:40] mduca: has joined #ruby
[21:51:40] ytti: has joined #ruby
[21:51:40] Coraline: has joined #ruby
[21:51:40] amoeba_: has joined #ruby
[21:51:40] Dfoolz: has joined #ruby
[21:51:40] edwinvdgraaf: has joined #ruby
[21:51:48] martinbjeldbak: has joined #ruby
[21:51:59] constantinexvi: has joined #ruby
[21:52:05] cschneid: has joined #ruby
[21:52:31] Majora: ACTION waves to Coraline
[21:52:33] avdi: has joined #ruby
[21:52:35] rrichardsr3: has joined #ruby
[21:53:14] eggoez: has joined #ruby
[21:53:43] rrichardsr3: has joined #ruby
[21:53:45] underplank: has joined #ruby
[21:53:47] Motoki: has joined #ruby
[21:54:41] diegoviola: is EOFError sort of like a timeout?
[21:55:03] futilegames: has joined #ruby
[21:55:03] despai: has joined #ruby
[21:55:06] adaedra: It's End Of File
[21:55:39] diegoviola: Net::HTTP::Persistent::Error: too many connection resets (due to end of file reached - EOFError) after 1 requests on 46982896731480, last used 2.556012308 seconds ago
[21:55:46] diegoviola: I have no idea why I would get this
[21:55:57] knowtheory: has joined #ruby
[21:56:08] nomadicoder: has joined #ruby
[21:56:11] Guest85414______: has joined #ruby
[21:57:07] malconis: has joined #ruby
[21:57:15] mahk: has joined #ruby
[21:57:29] brunto: has joined #ruby
[21:57:56] frode15243: has joined #ruby
[21:57:57] avahey: has joined #ruby
[21:57:57] err_ok: has joined #ruby
[21:57:58] jmhmccr: has joined #ruby
[21:58:07] Vertroa: has joined #ruby
[21:59:10] kspencer: If I have a script that is supposed to return info via webpage, another that grabs from that webpage, (note that the webpage is via ruby script), how do I get it to actually try and return the info, as I'm getting a 404 otherwise, yet via browser it works
[21:59:23] n_blownapart: has joined #ruby
[21:59:46] futilegames_: has joined #ruby
[22:00:13] shevy: perhaps your browser request sends more information that your ruby-script based request
[22:01:07] bkxd: has joined #ruby
[22:01:08] kspencer: you talking like request headers?
[22:02:18] shevy: dunno if that is the only component that is sent
[22:02:54] shevy: I remember that I once used mechanize for some website where my script did not work until I made some changes and added additional information
[22:03:10] drbrain: diegoviola: the HTTP spec only allows you to retry idempotent requests (so not POST)
[22:03:27] viperman: has joined #ruby
[22:03:29] Ox0dea: has joined #ruby
[22:03:30] choke: has joined #ruby
[22:04:13] drbrain: I think ruby 2.3 doesn't have the problem by performing a select() or something
[22:05:38] smactive: has joined #ruby
[22:06:08] kalopsian: has joined #ruby
[22:07:10] gatman: has joined #ruby
[22:07:11] davedev24: has joined #ruby
[22:07:35] CihanKaygusuz: has joined #ruby
[22:08:30] yardenbar: has joined #ruby
[22:12:56] charliesome: has joined #ruby
[22:13:03] CloCkWeRX: has joined #ruby
[22:13:14] Cihan: has joined #ruby
[22:13:28] CloCkWeRX: has left #ruby: ()
[22:14:43] choke: has joined #ruby
[22:15:28] mistermocha: has joined #ruby
[22:15:29] skcin7: has joined #ruby
[22:16:26] djbkd: has joined #ruby
[22:16:31] pestle: has joined #ruby
[22:16:33] jackjackdripper: has joined #ruby
[22:17:49] devbug: has joined #ruby
[22:18:10] dlitvak: has joined #ruby
[22:18:25] edj: has joined #ruby
[22:18:29] clamstar: has joined #ruby
[22:21:04] casadei: has joined #ruby
[22:21:08] choke: has joined #ruby
[22:21:17] Guest24140: where do i go to talk to people who use ruby motion?
[22:21:32] Guest24140: the irc is empty
[22:22:12] havenwood: Guest24140: Whatcha wondering?
[22:22:34] Guest24140: i have like 10 questions
[22:24:05] troulouliou_div2: has joined #ruby
[22:26:40] JDiPierro: has joined #ruby
[22:27:34] havenwood: Guest24140: Seems there are 19 folk in #rubymotion but yeah it might take a while for a response with so few.
[22:27:45] casadei: has joined #ruby
[22:28:07] havenwood: Guest24140: Ask any Ruby questions here! You might not get such great answers to RubyMotion-specific stuff here but maybe worth a shot?
[22:28:40] Vertroa: has joined #ruby
[22:28:44] Guest24140: havenwood: i guess my first question is, is there a rails equivalent on rubymotion,like does it have a back end or is it only for front end and it needs and if it does need rails for a back end would there be a way to do location based services?
[22:28:57] centrx: has joined #ruby
[22:28:57] Guest24140: using phone location
[22:29:08] Scripore: has joined #ruby
[22:29:27] underplank: has joined #ruby
[22:30:57] dlitvak: has joined #ruby
[22:32:12] havenwood: Guest24140: AFAIK it doesn't have an API component, that's up to you. You might like the new Rails 5 "--api" mode (or rails-api gem in the now) or there are plenty of other Ruby tools for making APIs.
[22:32:47] choke: has joined #ruby
[22:33:08] ta0: has joined #ruby
[22:33:13] antgel: has joined #ruby
[22:33:39] Guest24140: havenwood: does that mean i can use rails to create the backend?
[22:34:11] Guest24140: havenwood: will rails be able to interact with the phone functions like camera?
[22:34:18] jbrhbr: has joined #ruby
[22:35:41] dlitvak: has joined #ruby
[22:35:51] benlovell: has joined #ruby
[22:35:57] Guest24140: havenwood: im a bit of a novice
[22:35:58] underplank: has joined #ruby
[22:36:18] nerfando: has joined #ruby
[22:36:19] mdw: has joined #ruby
[22:36:52] momomomomo: has joined #ruby
[22:37:28] nerfando: has joined #ruby
[22:37:43] baweaver: has joined #ruby
[22:37:59] havenwood: Guest24140: Like a REST API for a regular iOS app (or whatever you're making).
[22:38:19] Guest24140: havenwood: i think so?
[22:40:13] mistermo_: has joined #ruby
[22:40:23] havenwood: Guest24140: Here's a random example from the interwebs that I'm not familiar with but maybe it'd give you some ideas?: http://lucatironi.net/tutorial/2013/05/05/ruby_rails_rubymotion_ios_app_authentication_devise_tutorial_part_one/
[22:41:11] mary5030: has joined #ruby
[22:41:25] havenwood: Guest24140: You could make a JSON REST API with rails-api, grape, or even just sinatra or roda, etc. That's a challenge in itself but worth learning.
[22:41:39] dkam_______: has joined #ruby
[22:41:41] mary5030_: has joined #ruby
[22:41:48] Guest24140: havenwood: would i be able to use the same database for andriod,ios,and desktop?
[22:42:01] havenwood: Guest24140: depends
[22:42:05] dlitvak: has joined #ruby
[22:42:15] Guest24140: havenwood: something like a location or a post
[22:42:17] havenwood: Guest24140: typically same DB but sometimes different API endpoints
[22:42:29] havenwood: depends on your app needs
[22:42:53] Guest24140: havenwood: api = brain without memory right?
[22:43:19] kalopsian: has joined #ruby
[22:44:11] havenwood: Guest24140: Have any prior Rails experience or coming at this fresh?
[22:44:29] rodfersou: has joined #ruby
[22:44:42] Guest24140: havenwood: im doing the rails tutorial right now lol. I just got this idea and i have to make it.
[22:44:47] zenlot1: has joined #ruby
[22:45:00] choke: has joined #ruby
[22:45:00] Guest24140: havenwood: im doing the rails tutorial right now lol. I just got this idea and
[22:45:26] Guest24140: havenwood: I read a book on ruby and I get that mainly
[22:46:01] Guest24140: havenwood: I just had the clarify that the idea was even possible
[22:46:27] havenwood: Guest24140: I'm not sure if you'll have a better time with Rails API or Rails with Grape or something simpler like Sinatra. I'd suggest reading everything you can get ahold of about REST APIs and maybe some Sinatra and Grape tutorials to see if you grok it.
[22:47:25] havenwood: Guest24140: Maybe make a simple Sinatra app and play with modifying it. Then once you're comfortable with that look up some tutorials on making an API with Sinatra and test that out.
[22:47:40] Guest24140: havenwood: they'll all work with motion? I heard sinatra was for smaller projects. This one is on the larger side.
[22:47:40] havenwood: Guest24140: There is more than one way to do it, which is great but tough on beginners!
[22:48:02] dlitvak: has joined #ruby
[22:48:52] havenwood: Guest24140: Sinatra makes nice APIs. Up to you!
[22:49:40] dkam_______: has joined #ruby
[22:49:59] havenwood: Guest24140: Here's a look at some Hello, Worlds! in various Rack adapters, for what it's worth: https://github.com/luislavena/bench-micro
[22:50:31] havenwood: Guest24140: Compare the implementations here: https://github.com/luislavena/bench-micro/tree/master/apps
[22:51:27] nfk|laptop: has joined #ruby
[22:52:11] Majora: Ox0dea: ayy
[22:52:20] Ox0dea: What it do, Charlie?
[22:52:44] Majora: Bruh. Could you explain some code to me.
[22:53:00] Ox0dea: The likelihood thereof is quite high.
[22:53:19] Majora: Ox0dea: The likelihood of you being high is quite high -_-
[22:53:27] Ox0dea: You can't prove it!
[22:53:27] rjs90: has joined #ruby
[22:53:37] Majora: https://github.com/craftykate/odin-project/blob/master/Chapter_03-Advanced_Ruby/oop_with_ruby/tic_tac_toe.rb
[22:53:45] Majora: So this chick made a tic tac toe game.
[22:53:56] Majora: I kinda wanted to model mine after hers.
[22:54:03] Majora: good idea? bad idea?
[22:54:17] Ox0dea: Looks pretty good.
[22:54:28] Ox0dea: winning_numbers = [ [0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6] ]
[22:54:35] underplank: has joined #ruby
[22:54:38] Ox0dea: As you can see, she benefited from using a flat array to represent the board.
[22:54:52] paradisaeidae: has joined #ruby
[22:55:35] Ox0dea: That [0, 1, 2] would be [[0, 0], [0, 1], [0, 2]] if she hadn't.
[22:55:43] Ox0dea: Or perhaps something even crazier.
[22:55:48] DonOtreply: has joined #ruby
[22:55:52] Majora: Oh I get it.
[22:55:55] Majora: that makes sense.
[22:56:07] rodfersou: has joined #ruby
[22:56:16] Majora: The logic for her "check_win" method looks really complicated...
[22:56:27] Ox0dea: It's... excessive.
[22:56:29] Majora: Ox0dea: is it?
[22:56:36] kalopsian: has joined #ruby
[22:56:36] skcin7: has joined #ruby
[22:57:18] Ox0dea: She's also using 1 and 2 as "booleans" which is terrifying.
[22:57:19] Majora: Alright... Well I'm going to try and recreate her code.
[22:57:26] Ox0dea: Majora: No, don't do that.
[22:57:43] Majora: Ox0dea: You just said I could model mine after hers -__-
[22:58:03] KineticX: has joined #ruby
[22:58:18] Ox0dea: Majora: "Recreate" is a scary word.
[22:58:23] Ox0dea: It invokes images of copying and pasting.
[22:58:40] Ox0dea: Can I even English?
[22:58:46] xet7: has joined #ruby
[22:58:47] Majora: Ox0dea: Considering it's my first time... I don't see why it's such a bad thing.
[22:58:55] Ox0dea: Majora: Copying and pasting?!
[22:59:08] Majora: Well no but using the same techniques in my own code
[22:59:17] Ox0dea: Which techniques?
[22:59:44] Majora: Well the way she sets up her board... The way she marks a spot on the board...
[22:59:49] Prominent: has joined #ruby
[22:59:59] rjs90: has left #ruby: ()
[23:00:46] Majora: Ox0dea: What do you suggest I do then?
[23:01:24] nofxx: has joined #ruby
[23:01:24] nofxx: has joined #ruby
[23:01:46] Ox0dea: Majora: I suggest you ensure that this venture proves to have been a learning experience.
[23:02:03] bkxd: has joined #ruby
[23:02:08] Majora: Ox0dea: What in gods name does that mean.
[23:02:13] Majora: English man, English.
[23:02:54] Ox0dea: Read and ensure you understand her implementation before embarking on your own. Having hers open in the background while you write yours is just a roundabout way to copy and paste.
[23:03:19] x0F: has joined #ruby
[23:03:21] Majora: That is literally how I have grasped everything up until this point.
[23:03:31] Ox0dea: For your suspect definition of "grasped".
[23:03:36] Ox0dea: I still love you, though.
[23:03:40] choke: has joined #ruby
[23:03:44] Majora: Ox0dea: Lmao I hate you
[23:03:48] Jardayn: has joined #ruby
[23:04:08] dlitvak: has joined #ruby
[23:05:31] guacamole: has joined #ruby
[23:06:13] Majora: I'm just going to write the code out
[23:06:19] Ox0dea: That's not a bad idea.
[23:06:22] Majora: And when I get to a place that I don't understand
[23:06:34] Majora: I'm going to call for your dumb ass to explain it to me xP
[23:06:38] Ox0dea: Wait, whose code?
[23:06:47] Majora: her code.
[23:07:02] Ox0dea: You're going to retype her program?
[23:08:10] guacamole: has joined #ruby
[23:08:12] certainty: has joined #ruby
[23:09:41] Yzguy: has joined #ruby
[23:09:54] Majora: Ox0dea: Fine. Don't respond.
[23:09:57] jackjackdripper: has joined #ruby
[23:09:58] Majora: No one likes you anyway
[23:11:29] wolffles: has joined #ruby
[23:11:38] Ox0dea: I think Zarthus thinks I'm purdy; that counts for something, innit?
[23:12:04] dlitvak: has joined #ruby
[23:12:22] Vertroa: has joined #ruby
[23:12:55] underplank: has joined #ruby
[23:13:40] Zarthus: The coolest.
[23:13:49] Sirithcam: has joined #ruby
[23:13:52] spooq: has joined #ruby
[23:14:53] Majora: Ox0dea: http://ideone.com/LAr3S3
[23:14:54] edwinvdgraaf: has joined #ruby
[23:15:12] Majora: What is going on with line 3 & 4?
[23:15:14] Majora: i don't get it.
[23:15:15] mary5030: has joined #ruby
[23:15:29] d0nn1e: has joined #ruby
[23:17:13] djbkd: has joined #ruby
[23:18:13] mfb2: has joined #ruby
[23:19:43] neanderslob: has joined #ruby
[23:19:43] Ox0dea: Majora: My explanation of Line 3 is going to involve some metaphysics; are you okay with that?
[23:20:02] Majora: I guess? Lol
[23:20:42] mfb2_: has joined #ruby
[23:21:09] Ox0dea: Majora: What does it mean to say that something is empty?
[23:21:41] Ox0dea: Is a container with no contents really a container?
[23:21:53] Ox0dea: After all, what is being contained?
[23:23:24] mjuszczak: has joined #ruby
[23:23:46] jbrhbr: does defining `self.included` under the hood create a new class (not an instance of a class but a new class object definition) containing whatever the new stuff is? https://gist.github.com/jerryhebert/06b6fcdd3d59d3bdbca0
[23:23:50] Majora: Ox0dea: A container with no contents is still a container -__-
[23:24:03] dlitvak: has joined #ruby
[23:24:05] Ox0dea: Majora: Line 3 is empty, silly.
[23:24:14] jbrhbr: i'm trying to understand what other reason would cause base.instance_eval to ever actually get evaluated, since the hidden new class object seems to be the only thing that could be getting created here (there is no instance of A)
[23:24:19] Majora: The same way if a tree falls in the forest and no one is around to hear it it still makes a sound xP
[23:24:33] Vertroa: has joined #ruby
[23:24:44] Ox0dea: jbrhbr: You're defining #included as a method on Foo's singleton class.
[23:24:57] Ox0dea: Singleton classes do kind of "spring into existence", if that's how you mean.
[23:24:57] Majora: http://ideone.com/T3mYO6
[23:25:20] yfeldblum: has joined #ruby
[23:25:30] jbrhbr: hrm, i think i know not of this thing that you speak
[23:25:40] Ox0dea: jbrhbr: Singleton classes?
[23:25:49] choke: has joined #ruby
[23:25:56] jbrhbr: Ox0dea: i know the concept of course but not how it relates to a module definition
[23:26:06] thoraxe: https://github.com/thoraxe/vagrant-openshift-multihost/blob/master/Vagrantfile#L39-L44 given that I am repeating this block of stuff several times, is there a way to define it somewhere else and then just call one command?
[23:26:06] jbrhbr: in ruby in particular
[23:26:22] JDiPierro: has joined #ruby
[23:26:47] thoraxe: it's like i'm doing the same sequence of actions, which to me smells a lot like a block, but I'm not sure what ruby-fu I would need to put that... uh... block of stuff into some kind of variable and then execute it within the block I'm already in
[23:26:52] thoraxe: i'm really bad at asking these kinds of questions
[23:27:01] jbrhbr: Ox0dea: also, if i define another class (B, for example) that also includes Foo, i see the instance_eval print once again
[23:27:30] Ox0dea: thoraxe: You could Extract Method, which could really just be a Proc.
[23:28:08] Ox0dea: thoraxe: def ssh_stuff(v); v.vm.provision ...; end
[23:29:04] Ox0dea: jbrhbr: Well, yeah, Foo.included will be invoked every time Foo is included.
[23:29:18] jbrhbr: that part isn't surprising to me
[23:29:40] jbrhbr: i think i'm not understanding what exactly the "instance" that instance_eval is referring to
[23:30:02] jbrhbr: which is why i was thinking it's creating a new class object perhaps
[23:30:05] smbenfield: has joined #ruby
[23:30:17] DonOtreply: has joined #ruby
[23:30:20] jbrhbr: perhaps i just need to read about ruby singletons if they somehow deviate from the normal nomenclature
[23:30:30] thoraxe: Ox0dea: https://gist.github.com/thoraxe/e539923d79d4ef8d5b3f ?
[23:30:50] Ox0dea: >> class C; def self.foo; end end; C.singleton_class.instance_methods.include? :true # jbrhbr
[23:30:51] ruboto: Ox0dea # => false (https://eval.in/498871)
[23:31:07] Ox0dea: >> class C; def self.foo; end end; C.singleton_class.instance_methods.include? :foo
[23:31:08] ruboto: Ox0dea # => true (https://eval.in/498873)
[23:31:15] paz__1: has joined #ruby
[23:31:18] Mon_Ouie: jbrhbr: A class is an object in Ruby. It's just an instance of a class called Class.
[23:31:38] Ox0dea: thoraxe: Sure, that's one way to do it.
[23:31:43] thoraxe: i'll give that a whirl
[23:31:48] rrichardsr3: has joined #ruby
[23:31:50] Ox0dea: Happy to help.
[23:32:20] jbrhbr: Mon_Ouie: shouldn't that class be an instance of a class called whatever the class is you're dealing with?
[23:32:44] Majora_: has joined #ruby
[23:32:56] Majora_: that was weird..
[23:33:06] roshanavand: has joined #ruby
[23:33:07] duckpuppy: has joined #ruby
[23:33:20] Mon_Ouie: Not sure what you mean
[23:33:32] Mon_Ouie: >> class Foo; end; Foo.class
[23:33:34] ruboto: Mon_Ouie # => Class (https://eval.in/498879)
[23:33:59] jbrhbr: yea, i've seen that result before and was surprised the output wasn't 'Foo'
[23:34:36] Mon_Ouie: Foo is not an instance of itself
[23:34:43] Coldblackice_: has joined #ruby
[23:34:48] jbrhbr: but what if Foo had inherited from Bar?
[23:34:58] cdg: has joined #ruby
[23:35:12] jbrhbr: the implication of your statement is that the class of all classes is just Class
[23:35:20] jbrhbr: (which is ostensibly correct here, but confusing to me)
[23:35:28] Mon_Ouie: It would still be a class object, whose superclass happens to be Bar
[23:35:57] jbrhbr: so .class is actually the instance of the class object
[23:36:23] jbrhbr: Mon_Ouie: then are you saying my guess was correct about why instance_eval gets fired?
[23:36:53] Mon_Ouie: I'm not sure I know what you mean by "actually the instance of the class object"
[23:37:12] jbrhbr: yea i suppose fuzzy language isn't helping but i'm mapping from fuzzy brain into fuzzy english :)
[23:38:08] jbrhbr: perhaps you could just answer this, since it's more concise: describe the instance that we're talking about that causes instance_eval to get called in my gist
[23:38:08] baweaver: has joined #ruby
[23:38:14] Mon_Ouie: The reason instance_eval gets executed is because you called it inside the module's included method, which gets called whenever the module is included into a class/module
[23:38:42] Mon_Ouie: Do you mean what base is?
[23:38:52] jackjackdripper: has joined #ruby
[23:38:55] jbrhbr: i suppose that would be the same question, yeah
[23:39:08] M-shine: has joined #ruby
[23:39:12] jbrhbr: ie something must have been instantiated for there to be an instance, so what is that instance
[23:39:36] Mon_Ouie: base is the class/module in which you included Foo
[23:39:58] Mon_Ouie: 'class A; end' is similar to 'A = Class.new'
[23:40:11] jbrhbr: therein lies my confusion
[23:40:24] neanderslob_: has joined #ruby
[23:40:33] jbrhbr: i can see 'class A; end' creating a new class object describing A, but not actually a new instance of A
[23:40:46] jbrhbr: and if that "new class object" i just mentioned is the instance, then i suppose all of this makes sense
[23:40:56] cdg_: has joined #ruby
[23:41:01] jbrhbr: not sure how to speak more clearly about this
[23:41:27] nixmaniack: has joined #ruby
[23:41:35] Mon_Ouie: There are no instances of A being created in any of the code above
[23:41:35] mistermo_: has joined #ruby
[23:42:20] Majora_: Ox0dea: Making the board and accounting for/representing the pieces is what's throwing me off. I can follow the logic for the most part but the rest of it sucks.
[23:42:44] jbrhbr: so internally the parser reads 'class A; end', parses the include, which has an instance eval, and the instance that's passed into instance_eval in this context is the class itself that we just created, right?
[23:43:14] Scripore: has joined #ruby
[23:43:25] jbrhbr: Mon_Ouie: at least superficially i hope you can see why i find this confusing. there is no obvious instantiation, yet instance_eval (which works on instances) is being invoked. i think i mostly get it now (unless you disagree with my previous summary)
[23:43:43] Mon_Ouie: Yes (except it's not the parser's role to execute your code)
[23:45:08] haraigo: has joined #ruby
[23:45:27] cdg: has joined #ruby
[23:45:38] Mon_Ouie: instance_eval works on all objects, and just executes the block you pass it with the object that #instance_eval was called on as self
[23:46:28] M-Kodo: has joined #ruby
[23:46:55] jbrhbr: that part is mostly intuitive
[23:47:34] jbrhbr: this came up for me because i'm reading some code that has a instance_eval block as well as a class_eval block, both within a self.included handler, and i was trying to understand the reasoning behind those choices
[23:48:09] jbrhbr: but the reason may just be specific to whatever this code is doing
[23:48:14] Kneecaps: has joined #ruby
[23:48:44] guacamole: has joined #ruby
[23:49:07] Mon_Ouie: The difference between class_eval and instance_eval can be seen when you define a method using 'def foo; end' inside the block (also the scoping rules of constants is different IIRC, but I forget the specifics because they have changed with Ruby versions)
[23:49:42] weemsledeux: has joined #ruby
[23:49:47] Mon_Ouie: Inside the instance_eval block, 'def foo; end' behaves as though you had done 'def self.foo; end' inside the class definition
[23:50:17] gambl0re: is elixr the successor of ruby
[23:50:24] Mon_Ouie: Inside the class_eval block, which behaves more like opening the class with the regular 'class SomeClass; ???; end' syntax, 'def foo; end' defines an instance method
[23:50:43] jbrhbr: Mon_Ouie: did you not say those backwards?
[23:51:10] cdg_: has joined #ruby
[23:51:18] guacamole: has joined #ruby
[23:51:29] Mon_Ouie: >> class ThisClass; end; ThisClass.class_eval { def a_new_method; end }; ThisClass.instance_methods(false)
[23:51:31] ruboto: Mon_Ouie # => [:a_new_method] (https://eval.in/498883)
[23:51:38] Mon_Ouie: >> class ThisClass; end; ThisClass.instance_eval { def a_new_method; end }; ThisClass.instance_methods(false)
[23:51:39] ruboto: Mon_Ouie # => [] (https://eval.in/498884)
[23:51:44] kalopsian: has joined #ruby
[23:52:15] KineticX: has joined #ruby
[23:52:29] cdg_: has joined #ruby
[23:52:48] Mon_Ouie: (In that second example a_new_method was defined as a class method, which can be found by checking ThisClass.methods(false))
[23:54:12] jbrhbr: and i'm assuming this is consistent regardless of whether or not something is a class or an instance, since they are all basically instances of something
[23:54:49] jbrhbr: i read an article before bugging you guys that made me think a little differently about it ( http://web.stanford.edu/~ouster/cgi-bin/cs142-winter15/classEval.php )
[23:55:20] stannard: has joined #ruby
[23:55:24] Mon_Ouie: You can't call class_eval on an object that is not a class (it wouldn't make sense, you can't define instance methods on something that isn't a class)
[23:55:31] M-mistake: has joined #ruby
[23:55:47] jbrhbr: ah, right
[23:57:08] Mon_Ouie: instance_eval does indeed work the same for regular objects and classes, and the behavior of 'def' reflects that (if you call instance_eval on something that isn't a class, you can only define singleton methods on that object, not instance methods)
[23:57:11] kgirthofer: has joined #ruby
[23:57:30] jbrhbr: yea, that's what the article speaks to
[23:57:44] jbrhbr: thanks for all the help, i feel pretty good about it now. i made some notes so i won't have to ask again
[23:57:46] guacamole: has joined #ruby
[23:58:11] cassioscabral: has joined #ruby
[23:58:40] d5sx43: has joined #ruby
[23:59:04] dlitvak: has joined #ruby