« Back to channel list

#ruby - 27 May 2017

« Back 1 day Forward 1 day »
[00:03:02] gja: has joined #ruby
[00:04:39] hinbody: has joined #ruby
[00:11:28] mim1k: has joined #ruby
[00:12:33] jrafanie: has joined #ruby
[00:13:45] railswebdev: has joined #ruby
[00:24:44] shinnya: has joined #ruby
[00:25:11] __Yiota: has joined #ruby
[00:26:12] gothicsouth: has joined #ruby
[00:28:54] __Yiota: has joined #ruby
[00:31:12] bambanx: has joined #ruby
[00:31:56] mim1k: has joined #ruby
[00:33:43] __Yiota: has joined #ruby
[00:36:10] centrx: has joined #ruby
[00:37:56] duderonomy: has joined #ruby
[00:38:02] centrx_: has joined #ruby
[00:39:23] kies: has joined #ruby
[00:44:19] kt: has joined #ruby
[00:47:40] roamingdog: has joined #ruby
[00:52:31] mim1k: has joined #ruby
[00:57:07] railswebdev: has joined #ruby
[01:00:43] im0nde: has joined #ruby
[01:01:13] BTRE: has joined #ruby
[01:03:08] gizmore|2: has joined #ruby
[01:10:47] mim1k: has joined #ruby
[01:16:00] gothicsouth: has joined #ruby
[01:24:45] insanedreamer: has joined #ruby
[01:26:06] bambanx: has joined #ruby
[01:28:44] railswebdev: has joined #ruby
[01:29:11] bruce_lee: has joined #ruby
[01:29:11] bruce_lee: has joined #ruby
[01:31:19] mim1k: has joined #ruby
[01:36:33] charliesome: has joined #ruby
[01:41:07] PorcoRex: has joined #ruby
[01:43:02] flaf: has left #ruby: ("WeeChat 1.0.1")
[01:43:10] kies: has joined #ruby
[01:45:09] ur5us: has joined #ruby
[01:45:16] d^sh: has joined #ruby
[01:46:27] jrafanie: has joined #ruby
[01:51:51] mim1k: has joined #ruby
[01:52:21] bsartek: has joined #ruby
[01:57:01] jackjackdripper: has joined #ruby
[02:04:44] jrafanie: has joined #ruby
[02:07:09] tristanp: has joined #ruby
[02:07:24] alveric1: has joined #ruby
[02:13:29] HoierM: has joined #ruby
[02:14:33] HoierM: has joined #ruby
[02:15:28] HoierM: has joined #ruby
[02:20:24] genpaku: has joined #ruby
[02:21:11] ruby[bot]: -b FuccTrump!*@*$#ruby-banned
[02:22:34] Jameser: has joined #ruby
[02:24:55] arescorpio: has joined #ruby
[02:26:07] railswebdev: has joined #ruby
[02:27:13] enterprisey: has joined #ruby
[02:30:46] mim1k: has joined #ruby
[02:51:02] Joufflu: has joined #ruby
[02:59:44] dlitvak: has joined #ruby
[03:00:50] __Yiota: has joined #ruby
[03:06:17] charliesome: has joined #ruby
[03:07:02] mim1k: has joined #ruby
[03:07:53] jenrzzz: has joined #ruby
[03:07:53] jenrzzz: has joined #ruby
[03:09:34] _sfiguser: has joined #ruby
[03:10:39] b0mbnet: has joined #ruby
[03:12:16] jrafanie: has joined #ruby
[03:12:46] b0mbnet: how to trace where a method override by local-variable
[03:12:48] b0mbnet: https://eval.in/806063
[03:14:27] b0mbnet: anybody knows?
[03:14:39] mim1k: has joined #ruby
[03:15:48] elomatreb: b0mbnet: It's not getting overriden, the local variable just takes precendence. You can still call the method if you use parentheses
[03:16:02] eightlimbed: has joined #ruby
[03:16:41] b0mbnet: but how do i know where this local variable takes precendence? which file and which line
[03:17:48] b0mbnet: i have a problem with grape, grape defined attr_reader for params, but it gets ovveride by local variable, and result is nil, i want to debug this
[03:19:10] b0mbnet: params() or self.params or send(params), it is wired
[03:19:46] elomatreb: All of those (provided you used a symbol for send) should call the method, not a local variable
[03:20:20] Cohedrin: has joined #ruby
[03:20:36] b0mbnet: yes, i know, but how do i trace when a local variable is defined?
[03:20:57] PorcoRex: b0mbnet, are you in search for where the local variable is defined, and not the method? I'm not sure that's possible, but I'd imagine that is one long method you're working with.
[03:21:32] elomatreb: I think a debugger might be able to trace where a variable was defined, but I haven't had to do that ever
[03:22:13] b0mbnet: yes, i have searched using ripgrep , but it is large result. i don't know where to start
[03:24:41] PorcoRex: b0mbnet, local variables should be encapsulated by a method. Do you know what this method is?
[03:29:09] b0mbnet: looks like this https://eval.in/806070
[03:29:43] b0mbnet: but in grape https://github.com/ruby-grape/grape/blob/master/lib/grape/endpoint.rb#L11
[03:30:06] b0mbnet: it must be get override in some where
[03:30:40] elomatreb: It can only come from a scope above the block, is there anything above it that might set it?
[03:30:53] PorcoRex: How does "desc" work? It doesn't seem it should.
[03:31:19] b0mbnet: it it all come from grape gem
[03:31:39] b0mbnet: it is just defined description for this api
[03:31:50] elomatreb: Why not? the lines below it are just indented a level too deep
[03:33:16] b0mbnet: desc method source code https://github.com/ruby-grape/grape/blob/220c345dff9602e431ac780abcb98dbb24293395/lib/grape/dsl/desc.rb#L40-L59
[03:34:15] elomatreb: Yeah, nothing wrong with that. Is there something above the resources block?
[03:34:28] stormbytes: whats wrong with my syntax? (ports = array, options=hash) if (options[:index] <= ports.length -1 )
[03:34:42] b0mbnet: no, resource is just a namespace
[03:35:34] b0mbnet: i already tried using pry's watch function, but it is not working, beacause in this situation, local-variable is not changed, it is defined
[03:36:38] elomatreb: stormbytes: The error you're getting would help, doesn't look immediately wrong to me
[03:36:48] PorcoRex: b0mbnet, is the error we see in the snippet the one you're getting?
[03:37:00] PorcoRex: "uninitialized constant V1::Grape (NameError)"
[03:37:19] elomatreb: No, that's just since eval.in doesn't have any gems
[03:37:41] PorcoRex: What would be the actual error you're getting?
[03:37:49] stormbytes: elomatreb let me look...
[03:37:51] b0mbnet: params is nil
[03:38:14] b0mbnet: but @params is ok
[03:38:47] elomatreb: I think byebug (an actual debugger) may be able to do what you need, I don't know if it can trace variables directly but you can certainly step through your code until you see where it is defined
[03:38:51] gothicsouth: has joined #ruby
[03:39:43] acemo: has joined #ruby
[03:40:00] gix: has joined #ruby
[03:40:09] PorcoRex: I hate to bring this again, but I'm not sure how this would work "desc 'create order' params do --- end post do --- end" without commas or anything.
[03:41:07] elomatreb: PorcoRex: Remove one level of indentation from lines 5-15
[03:41:15] elomatreb: It's just a regular method call
[03:41:18] b0mbnet: i already tried, https://github.com/ruby-grape/grape/blob/521688848d916a851d79848d65f900157f6844b9/lib/grape/endpoint.rb#L256-L257, on line 256 params is ok, but when @block.call(self) params is nil, @block is the post block
[03:41:53] PorcoRex: elomatreb, ah, sorry. You're right, it's similar to a Rakefile.
[03:42:35] elomatreb: Actually, add one space in line 5 and another one in line 16 :P
[03:43:20] b0mbnet: on line 256, defined? params is method
[03:43:42] b0mbnet: but when it get inside the post block, defined? params become local-variable
[03:43:45] acemo: has joined #ruby
[03:44:16] b0mbnet: i'm using pry-byebug, it can step into the code
[03:45:07] PorcoRex: b0mbnet, you mean that inside the "post" block "params" is a local variable?
[03:45:48] ur5us: has joined #ruby
[03:45:58] b0mbnet: in normal situation, it must be a method
[03:46:21] b0mbnet: beacause it is a attr_reader defined in here https://github.com/ruby-grape/grape/blob/521688848d916a851d79848d65f900157f6844b9/lib/grape/endpoint.rb#L11
[03:46:31] PorcoRex: You have to be careful, because both "params" and "post" aren't defining methods, but are method calls with passed blocks.
[03:46:40] elomatreb: Are you certain that the method does not return nil? I know that defined? is a bit of an oddity in Ruby, maybe it's just being quirky
[03:47:37] PorcoRex: So "params" is a "class" method of Orders. It is not an instance method.
[03:47:50] b0mbnet: inside post block , self is instance of Grape::Endpoint
[03:48:43] PorcoRex: b0mbnet, that's the problem, because outside post, "params" is a class method V1:Orders.
[03:49:13] PorcoRex: I think... although there might be some magic going on.
[03:50:10] elomatreb: That still wouldn't explain the local variable thing, which is actually pretty weird
[03:50:28] mim1k: has joined #ruby
[03:53:15] PorcoRex: b0mbnet, can you place a breakpoint inside "post" and perform "method(:params).owner"?
[03:53:36] b0mbnet: let me try, wait a seconds
[03:54:08] b0mbnet: Grape::Endpoint
[03:54:23] PorcoRex: Right. It's an instance method.
[03:54:46] PorcoRex: Could you do the same, but this time right after the "desc" line?
[03:55:02] PorcoRex: Between 4 and 5?
[03:56:07] b0mbnet: => Grape::DSL::Validations::ClassMethods
[03:56:18] PorcoRex: Right, it's a class method.
[03:56:34] PorcoRex: None are local variables. They are just different methods.
[03:58:56] b0mbnet: on https://github.com/ruby-grape/grape/blob/521688848d916a851d79848d65f900157f6844b9/lib/grape/endpoint.rb#L256, when i puts local_variables, it don't have params
[03:59:06] b0mbnet: but inside post block, it have params
[03:59:38] b0mbnet: => [:__, :_, :_ex_, :_pry_, :_out_, :_in_, :_dir_, :_file_, :params, :order]
[04:00:25] b0mbnet: where this params local_variable is defined?
[04:00:56] elomatreb: That's the weird thing, unless you're defining it in a scope above and before that it shouldn't bleed over from anywhere
[04:02:03] PorcoRex: There is no local variable both "params", inside and outside are different methods. Not variables.
[04:02:51] elomatreb: Then defined? would return "method" not "local-variable"
[04:03:09] shinnya: has joined #ruby
[04:04:43] PorcoRex: elomatreb, but "method(:params).owner" returned Grape::Endpoint.
[04:04:51] PorcoRex: Inside the block.
[04:05:01] MrBusiness: has joined #ruby
[04:05:23] elomatreb: Yes, and they said it worked as intended when they explicitely called the method using self.params, params() or send
[04:07:12] PorcoRex: Ok, I think I've missed something then. I thought the confusion was because the call to "params" from withing "post" wasn't the one expected.
[04:07:56] b0mbnet: this is backtrace, https://gist.github.com/chen7897499/9a71f46d65061c03290052efaf79d57e
[04:08:10] MrBusiness: has joined #ruby
[04:08:13] b0mbnet: im using pry-stack-explorer
[04:08:26] b0mbnet: frame 0 is current
[04:13:21] PorcoRex: b0mbnet, If you assign to "params" then that will be a local variable.
[04:13:58] b0mbnet: but it is before i assign
[04:14:13] nanoz: has joined #ruby
[04:15:08] PorcoRex: I'm no expert, but I think it doesn't work that way. Try calling params "xparams", for instance.
[04:15:36] PorcoRex: Then we can discuss.
[04:16:32] b0mbnet: xparams? i don't understand
[04:17:25] PorcoRex: Rename the assignments to something else instead of params. Like "xparams = <something>"
[04:18:13] PorcoRex: And, tbh, I'm just guessing.
[04:18:54] b0mbnet: assign? why? https://gist.github.com/chen7897499/9a71f46d65061c03290052efaf79d57e#file-gistfile1-txt-L14-L16, this lines is not run yet,
[04:19:07] railswebdev: has joined #ruby
[04:19:24] b0mbnet: https://gist.github.com/chen7897499/9a71f46d65061c03290052efaf79d57e#file-gistfile1-txt-L12 on this line, params is nil
[04:19:57] PorcoRex: Are we still getting local var?
[04:20:26] PorcoRex: I think we'll need to take a look at the whole method.
[04:21:03] wisdom-1: has joined #ruby
[04:21:09] robnester: has joined #ruby
[04:21:46] elomatreb: defined? does some unexpected things sometimes, are you sure you're not being bitten by this behaviour?: https://eval.in/806112
[04:23:52] b0mbnet: https://gist.github.com/chen7897499/28414ba6fe3a57d8e5a087c92fabb74d#file-gistfile1-txt-L24 whole file
[04:24:46] elomatreb: Be aware that anything you execute in the pry can affect the code after it, it's like eval
[04:25:00] b0mbnet: yes, i know
[04:25:20] b0mbnet: but it is not the reason to get local-variable
[04:27:19] b0mbnet: beacause i already tried use local_variables, this one is safe, it can display all local variables on current
[04:28:23] Cohedrin: has joined #ruby
[04:35:03] b0mbnet: https://gist.github.com/chen7897499/9a71f46d65061c03290052efaf79d57e#file-gistfile1-txt and i don't understand where is generate_api_method being called
[04:36:23] b0mbnet: called here https://github.com/ruby-grape/grape/blob/521688848d916a851d79848d65f900157f6844b9/lib/grape/endpoint.rb#L102
[04:37:50] nofxxx: has joined #ruby
[04:37:58] cfec0b8d: has joined #ruby
[04:45:32] cam27: has joined #ruby
[04:45:58] mim1k: has joined #ruby
[04:49:12] jackrandom: has joined #ruby
[04:52:19] bernd27: has joined #ruby
[04:56:30] Trynemjoel: has joined #ruby
[05:03:44] eightlimbed: has joined #ruby
[05:06:29] stormbytes: getting a syntax error i don't understand https://eval.in/806118
[05:08:43] cschneid_: has joined #ruby
[05:13:37] Bock: has joined #ruby
[05:16:04] cyphase: has joined #ruby
[05:20:28] ptx0: has joined #ruby
[05:21:00] apeiros: stormbytes: either `a-b` or `a - b`, but not `a -b`
[05:21:22] stormbytes: the whitespace??
[05:21:41] apeiros: -1 is "negative one", not "minus one"
[05:21:42] stormbytes: never would have caught that
[05:21:50] apeiros: well, it shows you in the exception
[05:21:54] apeiros: with an arrow and all
[05:24:41] b0mbnet: has joined #ruby
[05:26:22] elomatreb: Well, unless you know that there is a difference between binary and unary minus it is kinda confusing
[05:26:44] stormbytes: but when you don't to look for something like that its not very telling
[05:29:02] DeeJayh_: has joined #ruby
[05:29:26] apeiros: it could do a better job wrt token names
[05:30:05] zapata: has joined #ruby
[05:35:43] andrzejku: has joined #ruby
[05:41:29] stormbytes: does 'unless array.length' evaluate to true/false?
[05:42:20] stormbytes: or do i have to explicitly state 'unless array.length > 0'
[05:44:35] ur5us: has joined #ruby
[05:48:54] cam27: has joined #ruby
[05:53:57] ruby[bot]: baweaver: # => true (https://eval.in/806131)
[05:55:39] mim1k: has joined #ruby
[05:57:38] apeiros: stormbytes: Array#empty?
[05:57:46] DeeJayh_: has joined #ruby
[05:57:49] apeiros: and 0 is truthy in ruby. only false & nil are falsy
[06:07:01] cjhowe: has joined #ruby
[06:07:46] cjhowe: has joined #ruby
[06:08:43] cjhowe: has joined #ruby
[06:09:26] cjhowe: has joined #ruby
[06:12:16] MrBusiness: has joined #ruby
[06:18:12] nokepala: has joined #ruby
[06:23:30] Ove_: has left #ruby: ()
[06:32:06] mim1k: has joined #ruby
[06:47:33] jackrandom: has joined #ruby
[06:51:59] gix-: has joined #ruby
[06:54:43] rc48: has joined #ruby
[07:06:16] bernd27: has joined #ruby
[07:08:17] mim1k: has joined #ruby
[07:09:32] blackmesa: has joined #ruby
[07:10:35] jgnagy: has joined #ruby
[07:13:41] rippa: has joined #ruby
[07:23:48] cschneid_: has joined #ruby
[07:33:29] muelleme: has joined #ruby
[07:33:34] tristanp: has joined #ruby
[07:38:10] shinnya: has joined #ruby
[07:47:26] mim1k: has joined #ruby
[08:11:18] bsartek: has joined #ruby
[08:11:30] babykosh: has joined #ruby
[08:13:06] babykosh: has left #ruby: ()
[08:14:11] babykosh: has joined #ruby
[08:18:06] mdw: has joined #ruby
[08:20:16] bsartek: has joined #ruby
[08:21:55] cajone: has joined #ruby
[08:25:32] jane_booty_doe: has joined #ruby
[08:34:50] nokepala: has joined #ruby
[08:35:22] charliesome: has joined #ruby
[08:41:36] mdw: has joined #ruby
[08:42:21] mdw: has joined #ruby
[08:43:11] mdw: has joined #ruby
[08:43:52] mdw: has joined #ruby
[08:45:28] mdw: has joined #ruby
[08:46:56] mim1k: has joined #ruby
[08:49:57] Tempesta: has joined #ruby
[08:51:13] bsartek: has joined #ruby
[08:56:14] rc48: has joined #ruby
[08:58:55] ski7777: has joined #ruby
[09:02:58] marr: has joined #ruby
[09:04:47] DeeJayh_: has joined #ruby
[09:06:14] j0n3: has joined #ruby
[09:07:04] R\w\C: has joined #ruby
[09:14:09] Xeago: has joined #ruby
[09:14:42] biberu: has joined #ruby
[09:15:55] alveric1: has joined #ruby
[09:19:15] CacoS: has joined #ruby
[09:22:13] Mia: has joined #ruby
[09:23:15] mim1k: has joined #ruby
[09:23:24] blackmesa: has joined #ruby
[09:25:07] charliesome: has joined #ruby
[09:29:42] CacoS: has joined #ruby
[09:30:42] CacoS: has joined #ruby
[09:31:46] CacoS: has joined #ruby
[09:32:08] mikecmpbll: has joined #ruby
[09:32:35] CacoS: has joined #ruby
[09:34:39] tristanp: has joined #ruby
[09:39:36] cschneid_: has joined #ruby
[09:51:47] cyphase: has joined #ruby
[09:54:12] lxsameer: has joined #ruby
[09:57:02] jane_booty_doe: has joined #ruby
[09:59:20] mim1k: has joined #ruby
[10:01:16] Fernando-Basso: has joined #ruby
[10:04:19] jgt: has joined #ruby
[10:12:42] mim1k: has joined #ruby
[10:12:50] DeeJayh_: has joined #ruby
[10:15:24] tomphp: has joined #ruby
[10:15:59] johnmccabe: has joined #ruby
[10:25:49] bier: has joined #ruby
[10:27:25] charliesome: has joined #ruby
[10:28:30] t-recx: has joined #ruby
[10:30:20] rc48: has joined #ruby
[10:31:32] normie1: has joined #ruby
[10:32:17] Qchmqs__: has joined #ruby
[10:35:58] bkxd: has joined #ruby
[10:36:17] muelleme: has joined #ruby
[10:36:22] charliesome: has joined #ruby
[10:43:45] nullobject: has joined #ruby
[10:45:51] minimalism: has joined #ruby
[10:48:30] mim1k: has joined #ruby
[10:50:38] nicesignal: has joined #ruby
[10:53:10] bkxd_: has joined #ruby
[11:00:34] zacts: has joined #ruby
[11:01:06] sts: has joined #ruby
[11:04:07] Kug3lis: has joined #ruby
[11:05:00] blackmesa: has joined #ruby
[11:11:06] armyriad: has joined #ruby
[11:12:36] _sfiguser: has joined #ruby
[11:20:10] codehotter: has joined #ruby
[11:21:04] codehotter: I'm a little bit out of my depth here, but if someone has time... How different would Ruby's AST format be from Mozilla's AST format?
[11:21:13] codehotter: What does a different AST format mean in general?
[11:21:30] codehotter: Don't they have to fulfill mostly the same functions and so you'd expect them to look similar?
[11:25:40] Mon_Ouie: I'm not sure what you mean by Mozilla's AST format. For JavaScript? JS and Ruby are two different languages, so the AST (Abstract Syntax Tree) used by each language needs to be able to represent that language's constructs
[11:26:19] Mon_Ouie: e.g. Ruby has constructs for defining classes or calling a method with a block, which do not exist in JavaScript
[11:32:10] codehotter: Thanks, I get it now.
[11:36:06] ur5us: has joined #ruby
[11:38:04] railswebdev: has joined #ruby
[11:39:10] blackwind_123: has joined #ruby
[11:40:27] DeeJayh_: has joined #ruby
[11:45:57] yasu: has joined #ruby
[11:47:24] gnufied: has joined #ruby
[11:48:54] jane_booty_doe: has joined #ruby
[11:50:13] blackwind_123: has joined #ruby
[11:50:40] nicesignal: has joined #ruby
[11:57:11] _whitelogger: has joined #ruby
[12:09:31] ski7777: has joined #ruby
[12:11:31] BaroMeter: has joined #ruby
[12:18:37] GodFather: has joined #ruby
[12:22:01] ecuanaso: has joined #ruby
[12:26:04] nokepala: has joined #ruby
[12:26:53] nowhere_man: has joined #ruby
[12:27:01] apparition: has joined #ruby
[12:30:31] da3d: has joined #ruby
[12:31:06] Mia: has joined #ruby
[12:31:06] Mia: has joined #ruby
[12:32:06] rc48: has joined #ruby
[12:32:06] daed: has joined #ruby
[12:32:19] eregon: has joined #ruby
[12:34:23] cjhowe: has joined #ruby
[12:35:33] cjhowe: has joined #ruby
[12:36:13] cjhowe: has joined #ruby
[12:37:02] cjhowe: has joined #ruby
[12:38:27] cjhowe: has joined #ruby
[12:44:25] jrafanie: has joined #ruby
[12:48:01] cfec0b8d: has joined #ruby
[12:49:08] __Yiota: has joined #ruby
[12:54:12] _whitelogger: has joined #ruby
[13:00:39] MarkBilk: has joined #ruby
[13:02:29] otherj: has joined #ruby
[13:04:06] charliesome: has joined #ruby
[13:08:31] mostlybadfly: has joined #ruby
[13:15:10] matled: has joined #ruby
[13:16:20] Jameser: has joined #ruby
[13:19:58] charliesome: has joined #ruby
[13:20:57] danman: has joined #ruby
[13:23:38] rgr: has joined #ruby
[13:24:17] kleelk: has joined #ruby
[13:24:21] kleelk: has left #ruby: ()
[13:26:12] Jameser: has joined #ruby
[13:30:04] Miron: has joined #ruby
[13:30:22] im0nde: has joined #ruby
[13:32:03] BSaboia: has joined #ruby
[13:36:14] Jameser: has joined #ruby
[13:40:34] Jameser: has joined #ruby
[13:49:44] __Yiota: has joined #ruby
[13:54:43] r_rios: has joined #ruby
[13:57:41] railswebdev: has joined #ruby
[13:57:52] ytti: has joined #ruby
[14:04:33] houhoulis: has joined #ruby
[14:10:04] dionysus69: has joined #ruby
[14:10:49] eightlimbed: has joined #ruby
[14:14:23] rfoust: has joined #ruby
[14:24:01] kith: has joined #ruby
[14:24:48] DeeJayh_: has joined #ruby
[14:26:37] interki: has joined #ruby
[14:35:07] dionysus69: has joined #ruby
[14:36:53] BSaboia: has joined #ruby
[14:42:45] gothicsouth: has joined #ruby
[14:48:34] ur5us: has joined #ruby
[14:51:39] MarkBilk: has joined #ruby
[14:57:33] KnownSyntax: has joined #ruby
[14:57:33] KnownSyntax: has joined #ruby
[15:00:05] jgnagy: has joined #ruby
[15:01:38] redaudit: has joined #ruby
[15:12:04] Xandaros: has joined #ruby
[15:14:25] Xandaros: Hi! I'm currently trying to understand this ruby script and I encountered a line I don't understand. Maybe someone here can help me. (I can't share the entire script, unfortunately). Line in question:
[15:14:29] Xandaros: select_result=select([$my_socket],nil,[$my_socket],1)
[15:15:10] Xandaros: I have never used ruby before, so most of that is very confusing to me
[15:15:53] weathermaker: has joined #ruby
[15:18:05] cam27: has joined #ruby
[15:18:30] gothicsouth: has joined #ruby
[15:20:09] uZiel: has joined #ruby
[15:30:14] blackmesa: has joined #ruby
[15:30:43] railswebdev: has joined #ruby
[15:34:27] rc48: has joined #ruby
[15:36:59] tristanp: has joined #ruby
[15:39:14] duderonomy: has joined #ruby
[15:39:45] BSAlb: has joined #ruby
[15:40:22] BSaboia: has joined #ruby
[15:42:24] sepp2k: has joined #ruby
[15:51:37] duderonomy: has joined #ruby
[15:59:47] apeiros: ACTION writes too clever code again
[15:59:49] nokepala: has joined #ruby
[16:00:24] apeiros: lambda creating lambdas. it's fun, though. probably totally common in FP land.
[16:00:39] ineb: Xandaros: calls a function named 'select' with 4 parameter. first parameter is an array with one entry. its only element is the global variable $my_socket. second parameter is nil, or null, nada. third parameter is identical to the first one and the last parameter is integer 1
[16:01:15] ineb: whatever the function 'select' returns goes into the variable select_result
[16:01:53] ineb: its crappy code btw :)
[16:02:51] apeiros: it is? I only see two bad things?
[16:03:35] apeiros: Xandaros: note that `select` is most likely `Kernel#select` (can't tell without the surrounding code)
[16:03:45] apeiros: &ri Kernel#select Xandaros
[16:03:45] `derpy: Xandaros: http://ruby-doc.org/core-2.4.1/Kernel.html#method-i-select
[16:04:14] Xandaros: It's alright, I can actually ignore that line. (I'm converting the script to python)
[16:04:25] Xandaros: I figured out what it does on a higher level and just reimplemented it
[16:04:27] apeiros: it is used to determine whether an IO is ready to be read from, or written to. the 1 means it times out after 1s
[16:04:43] Xandaros: Yup, that makes sense
[16:08:23] Xandaros: Btw, how would I tell which module it's from? There is not import for "kernel" or anything. (Only socket and fcntl get impo... required)
[16:10:31] ineb: Kernel is included by class Object, so it is available nearly everywhere
[16:11:17] redaudit: has joined #ruby
[16:11:23] topfloor: has joined #ruby
[16:11:51] topfloor: has left #ruby: ()
[16:17:08] apeiros: Xandaros: you can go absolutely sure through introspection if you have to
[16:17:24] apeiros: Xandaros: binding.pry; method(:select).owner
[16:17:38] apeiros: that in the place where it is called. requires the code to be run, though.
[16:17:44] apeiros: >> method(:select).owner
[16:17:45] ruby[bot]: apeiros: # => Kernel (https://eval.in/806366)
[16:18:15] Xandaros: Ehh, I'm good. I got the translation completed.
[16:18:21] apeiros: Xandaros: but in general, toplevel methods (methods which have no receiver) are instance methods of the current scope's class
[16:18:44] apeiros: and all you have to do then is check that class and its ancestry (doc tools do that for you)
[16:18:59] Xandaros: I think to understand all this, I'd have to know more about how ruby actually works
[16:19:46] Xandaros: And unless my employer wants me to do something with ruby, I see no need to. I personally use Haskell for everything :P
[16:23:21] muelleme: has joined #ruby
[16:26:37] yqt: has joined #ruby
[16:30:09] uZiel_: has joined #ruby
[16:30:17] patr0clus: has joined #ruby
[16:30:19] rgr_: has joined #ruby
[16:32:04] patr0clus: has joined #ruby
[16:32:21] patr0clus: has joined #ruby
[16:34:42] opencw: has joined #ruby
[16:35:33] patr0clus: has joined #ruby
[16:41:15] ResidentBiscuit: has joined #ruby
[16:42:22] Dimik: has joined #ruby
[16:46:23] jgt: has joined #ruby
[16:48:42] nokepala: has joined #ruby
[16:49:22] ur5us: has joined #ruby
[16:50:58] c0mrad3: has joined #ruby
[16:56:46] KnownSyntax: has joined #ruby
[16:56:46] KnownSyntax: has joined #ruby
[16:58:45] cdg: has joined #ruby
[17:00:11] Cohedrin: has joined #ruby
[17:01:15] cdg: has joined #ruby
[17:01:41] ResidentBiscuit: has joined #ruby
[17:03:09] djbkd: has joined #ruby
[17:10:33] CacoS: has joined #ruby
[17:18:51] gothicsouth: has joined #ruby
[17:21:14] herbmillerjr: has joined #ruby
[17:23:42] KeyJoo: has joined #ruby
[17:27:08] djbkd: has joined #ruby
[17:27:47] edwardly: has joined #ruby
[17:27:47] edwardly: has joined #ruby
[17:28:49] railswebdev: has joined #ruby
[17:31:20] roamingdog: has joined #ruby
[17:35:30] DLSteve: has joined #ruby
[17:36:13] rc48: has joined #ruby
[17:45:59] blackmesa: has joined #ruby
[17:46:59] workmad3: has joined #ruby
[17:50:20] Fernando-Basso: has joined #ruby
[17:50:55] chopin: has joined #ruby
[17:52:13] cdg_: has joined #ruby
[17:57:07] Ferdroid: has joined #ruby
[18:00:04] roamingdog: has joined #ruby
[18:00:53] roamingdog: has joined #ruby
[18:01:38] roamingdog: has joined #ruby
[18:02:06] houhoulis: has joined #ruby
[18:02:34] roamingdog: has joined #ruby
[18:03:06] Macrobiotic: has joined #ruby
[18:03:18] roamingdog: has joined #ruby
[18:05:17] bvcosta: has joined #ruby
[18:08:24] muelleme: has joined #ruby
[18:08:27] Xakotu: has joined #ruby
[18:09:08] jaruga________: has joined #ruby
[18:13:29] andrzejku: has joined #ruby
[18:19:25] r_rios: has joined #ruby
[18:19:26] r_rios: has joined #ruby
[18:19:58] CacoS: has joined #ruby
[18:20:21] railswebdev: has joined #ruby
[18:27:48] workmad3: has joined #ruby
[18:29:28] cdg: has joined #ruby
[18:32:30] enterprisey: has joined #ruby
[18:37:19] rc48: has joined #ruby
[18:37:53] __Yiota: has joined #ruby
[18:40:06] oleo: has joined #ruby
[18:42:46] mitt3ns: has joined #ruby
[18:43:24] patr0clus: has joined #ruby
[18:48:03] quobo: has joined #ruby
[18:50:08] ur5us: has joined #ruby
[18:52:53] __Yiota: has joined #ruby
[18:53:32] cdg_: has joined #ruby
[18:55:25] [2300mAh]: has joined #ruby
[18:57:42] ecuanaso: has joined #ruby
[19:02:47] jamesaxl: has joined #ruby
[19:04:40] roamingdog: has joined #ruby
[19:05:30] blackmesa: has joined #ruby
[19:06:26] cdg: has joined #ruby
[19:09:31] enterprisey: has joined #ruby
[19:12:35] eightlimbed: has joined #ruby
[19:16:40] _sfiguser: has joined #ruby
[19:24:08] ayonkhan: has joined #ruby
[19:26:23] postmodern: has joined #ruby
[19:26:41] blackmes1: has joined #ruby
[19:28:51] blackwind_123: has joined #ruby
[19:29:47] tristanp: has joined #ruby
[19:42:09] railswebdev: has joined #ruby
[19:42:20] __Yiota: has joined #ruby
[19:44:32] Hanmac1: has joined #ruby
[19:46:34] cdg: has joined #ruby
[19:48:32] cdg: has joined #ruby
[19:49:22] ahrs: has joined #ruby
[19:49:37] bmurt: has joined #ruby
[19:51:01] ionte: has joined #ruby
[19:52:08] chopin: has joined #ruby
[19:53:03] jwr: has joined #ruby
[19:54:42] jwr: I'm not planning on doing ruby development, but i want to use ruby software (eg. jekyll) and have all the gems for each project separate so that various projects don't conflict with each other. do i want bundler, rbenv, or something else?
[19:56:49] Hanmac1: jwr if you want gem (sets) for each of your projects, you probably want bundler
[19:57:38] ecuanaso: has joined #ruby
[20:02:52] hndk: has joined #ruby
[20:09:51] ecuanaso: has joined #ruby
[20:10:05] rrios: has joined #ruby
[20:12:28] DoubleMalt: has joined #ruby
[20:13:15] eightlimbed: has joined #ruby
[20:15:45] DoubleMalt: has joined #ruby
[20:15:48] t-recx: has joined #ruby
[20:16:39] jwr: hanmacl: thanks. upon reading the docs, the `cd some_project ; bundle exec some_cmd` workflow looks like exactly what i want.
[20:17:14] jwr: basically python virtualenvs, but for ruby
[20:20:11] minimalism: has joined #ruby
[20:31:47] last_staff: has joined #ruby
[20:32:51] minimalism: has joined #ruby
[20:44:52] ecuanaso: has joined #ruby
[20:46:20] jwr: has joined #ruby
[20:47:46] cdg: has joined #ruby
[20:48:40] ur5us: has joined #ruby
[20:52:14] minimalism: has joined #ruby
[20:53:49] gothicsouth: has joined #ruby
[21:07:42] zenspider: jwr: I use ohmygems for most things. much simpler (it just sets up GEM_HOME + PATH)
[21:08:47] gizmore: has joined #ruby
[21:12:27] brent__: has joined #ruby
[21:16:45] jusa: has joined #ruby
[21:17:27] jgt: has joined #ruby
[21:21:06] cdg_: has joined #ruby
[21:23:14] ineb: has joined #ruby
[21:26:51] dviola: has joined #ruby
[21:27:48] muelleme: has joined #ruby
[21:33:42] zacts: has joined #ruby
[21:33:51] mim1k: has joined #ruby
[21:47:50] mdw: has joined #ruby
[21:49:08] Xakotu: has joined #ruby
[21:51:17] gothicsouth: has joined #ruby
[22:00:46] ruby[bot]: has joined #ruby
[22:00:46] ChanServ: +o ruby[bot]
[22:04:12] eightlimbed: has joined #ruby
[22:04:29] chopin: has joined #ruby
[22:05:49] blackmes1: has joined #ruby
[22:11:17] govg: has joined #ruby
[22:12:33] kobain: has joined #ruby
[22:17:51] m1010j: has joined #ruby
[22:21:50] cdg: has joined #ruby
[22:26:36] Puppet: has joined #ruby
[22:27:40] zacts: has joined #ruby
[22:28:19] ledestin: has joined #ruby
[22:29:07] Puppet`: has joined #ruby
[22:34:38] redaudit: has joined #ruby
[22:39:31] moei: has joined #ruby
[22:40:07] rc48: has joined #ruby
[22:42:32] pb122: has joined #ruby
[22:44:23] ResidentBiscuit: has joined #ruby
[22:46:55] rgr: has joined #ruby
[22:52:52] agent_white: has joined #ruby
[22:55:48] RealMarc: has joined #ruby
[22:56:44] contradictioned: has joined #ruby
[22:56:51] rikai: has joined #ruby
[22:56:54] mrsolo: has joined #ruby
[22:56:57] rann: has joined #ruby
[22:56:59] pizzaops: has joined #ruby
[22:57:31] roamingdog: has joined #ruby
[22:57:41] testnick[m]: has joined #ruby
[22:57:48] bweston92: has joined #ruby
[22:57:58] el_ocho[m]: has joined #ruby
[22:58:22] bcavileer: has joined #ruby
[22:58:33] rfv: has joined #ruby
[22:59:06] Tony-St4rk: has joined #ruby
[22:59:06] roamingdog: has joined #ruby
[22:59:12] nyuszika7h: has joined #ruby
[22:59:55] roamingdog: has joined #ruby
[23:00:28] ndrst: has joined #ruby
[23:00:37] bokayio: has joined #ruby
[23:00:41] ikopico: has joined #ruby
[23:00:41] arvindsaik: has joined #ruby
[23:00:45] roamingdog: has joined #ruby
[23:01:13] Papierkorb: has joined #ruby
[23:01:30] roamingdog: has joined #ruby
[23:01:50] Nightmare: has joined #ruby
[23:01:56] g3funk: has joined #ruby
[23:02:02] jpinnix: has joined #ruby
[23:02:20] roamingdog: has joined #ruby
[23:02:31] qsx: has joined #ruby
[23:02:34] sparr: has joined #ruby
[23:03:50] SeepingN: has joined #ruby
[23:04:59] bkxd: has joined #ruby
[23:07:49] bmurt: has joined #ruby
[23:07:54] roamingdog: has joined #ruby
[23:10:35] mdw: has joined #ruby
[23:14:43] tens0r: has joined #ruby
[23:17:42] jusa: has joined #ruby
[23:19:56] jgt: has joined #ruby
[23:20:59] pb122-two: has joined #ruby
[23:27:50] nullobject: has joined #ruby
[23:28:09] troys: has joined #ruby
[23:30:39] burgestrand: has joined #ruby
[23:41:29] rc48: has joined #ruby
[23:42:38] gix: has joined #ruby
[23:46:27] gothicsouth: has joined #ruby
[23:52:12] roamingdog: has joined #ruby
[23:53:02] roamingdog: has joined #ruby
[23:53:24] alveric2: has joined #ruby
[23:53:52] roamingdog: has joined #ruby
[23:54:38] roamingdog: has joined #ruby
[23:55:28] roamingdog: has joined #ruby
[23:55:53] im0nde: has joined #ruby
[23:56:13] roamingdog: has joined #ruby