« Back to channel list

#ruby - 28 December 2017

« Back 1 day Forward 1 day »
[00:06:37] raynold: has joined #ruby
[00:11:22] zwliew: has joined #ruby
[00:15:49] jnyw: has joined #ruby
[00:18:32] stove: has joined #ruby
[00:28:06] justicef_: has joined #ruby
[00:34:11] pastorinni: has joined #ruby
[00:36:04] rk182: has joined #ruby
[00:36:47] rk182: has left #ruby: ()
[00:37:42] rk182: has joined #ruby
[00:42:02] orbyt_: has joined #ruby
[00:53:59] nadir: has joined #ruby
[00:54:41] nobitanobi: has joined #ruby
[01:03:41] vichib: has joined #ruby
[01:06:28] jenrzzz: has joined #ruby
[01:06:28] jenrzzz: has joined #ruby
[01:10:45] lostandfound: has joined #ruby
[01:11:20] cadillac_: has joined #ruby
[01:16:09] darkhanb_: has joined #ruby
[01:16:33] lostandfound: has left #ruby: ()
[01:20:42] vichib: has joined #ruby
[01:21:36] vichib: has joined #ruby
[01:23:43] mostlybadfly: has joined #ruby
[01:28:43] mtkd: has joined #ruby
[01:41:55] lostandfound: has joined #ruby
[01:54:26] cdg: has joined #ruby
[01:58:11] nobitanobi: has joined #ruby
[01:58:30] apeiros: has joined #ruby
[01:59:47] konsolebox: has joined #ruby
[02:00:43] shinnya: has joined #ruby
[02:03:14] nobitanobi: has joined #ruby
[02:06:18] alfiemax: has joined #ruby
[02:07:45] orbyt_: has joined #ruby
[02:14:20] drewmcmillan: has joined #ruby
[02:14:49] pppktz: has joined #ruby
[02:16:02] pastorinni: has joined #ruby
[02:21:17] LBRapid: has joined #ruby
[02:29:56] gizmore: has joined #ruby
[02:40:35] chocoelho: has joined #ruby
[02:42:10] lalomergo: has joined #ruby
[02:49:30] apeiros: has joined #ruby
[02:52:54] daemonwrangler: has joined #ruby
[02:54:31] kfpratt: has joined #ruby
[02:57:24] cdg: has joined #ruby
[02:58:19] alfiemax: has joined #ruby
[03:00:15] cadillac_: has joined #ruby
[03:03:55] Toggi3: has joined #ruby
[03:04:40] rk182: has joined #ruby
[03:04:51] Utkarsh: has joined #ruby
[03:05:11] chrisarcand: has joined #ruby
[03:05:59] Jello_Raptor: has joined #ruby
[03:06:24] ironcamel: has joined #ruby
[03:06:36] JusticeFries: has joined #ruby
[03:08:37] g3funk: has joined #ruby
[03:09:45] pastorinni: has joined #ruby
[03:11:09] kfpratt: has joined #ruby
[03:15:40] apeiros: has joined #ruby
[03:32:23] pastorinni: has joined #ruby
[03:33:25] mtkd: has joined #ruby
[03:35:19] kfpratt: has joined #ruby
[03:41:40] kfpratt: has joined #ruby
[03:44:51] moei: has joined #ruby
[03:46:49] kfpratt: has joined #ruby
[03:49:38] pastorinni: has joined #ruby
[04:01:35] lele: has joined #ruby
[04:05:50] alfiemax: has joined #ruby
[04:07:27] orbyt_: has joined #ruby
[04:08:29] gix: has joined #ruby
[04:15:44] Azure: has joined #ruby
[04:16:07] jeffreylevesque: has joined #ruby
[04:16:26] konsolebox: has joined #ruby
[04:18:40] apeiros: has joined #ruby
[04:30:48] pastorinni: has joined #ruby
[04:33:11] jobewan: has joined #ruby
[04:36:10] apeiros: has joined #ruby
[04:37:25] chocoelho: has joined #ruby
[04:39:37] jobewan: has joined #ruby
[04:42:28] kfpratt: has joined #ruby
[04:45:50] selim: has joined #ruby
[04:45:56] abraham_: has joined #ruby
[05:00:28] Toggi3: has joined #ruby
[05:02:01] apeiros: has joined #ruby
[05:08:16] elphe: has joined #ruby
[05:08:51] apeiros: has joined #ruby
[05:15:16] Derperperd: has joined #ruby
[05:19:40] vipaca: has joined #ruby
[05:24:48] abraham_: has joined #ruby
[05:28:36] lostandfound: has joined #ruby
[05:29:12] apeiros: has joined #ruby
[05:32:11] Toggi3: has joined #ruby
[05:34:57] krz: has joined #ruby
[05:36:30] jenrzzz: has joined #ruby
[05:39:52] iamyask: has joined #ruby
[05:40:12] iamyask: I am trying to understand how ruby looks up the methods defined for the object
[05:40:29] iamyask: from what it looks like , it does something like this :
[05:40:49] iamyask: it get's the object's class, and then finds the method in that class
[05:41:15] iamyask: if it doesnt find it there, it moves to the super class and tries to find it there, this process keeps repeating.
[05:41:18] iamyask: Is that correct ?
[05:42:18] ule: I'm not an expert, but I'd say your logic make sense
[05:42:29] iamarun: has joined #ruby
[05:43:54] iamyask: But I don't understand how this works then :
[05:44:03] iamyask: def self.hello
[05:44:03] iamyask: p 'hello world'
[05:44:05] apeiros: has joined #ruby
[05:44:14] darkhanb: has joined #ruby
[05:44:46] iamyask: because in this case, `A` 's class is `Class`. and the method `hello` isn't defined in the `Class` , or any of it's super classes ?
[05:45:18] ayonkhan: has joined #ruby
[05:48:55] ule: so, you don't have an instance of A in this case
[05:49:08] ule: wait thats a static hello
[05:50:23] iamyask: Yep, that's A , not the instance of A.
[05:50:37] iamyask: But in Ruby, everything is an Object, so it should work the same way ?
[05:50:56] ule: so let me try something here
[05:51:33] bkxd: has joined #ruby
[05:52:43] bkxd: has joined #ruby
[05:53:57] bkxd: has joined #ruby
[06:00:14] apeiros: has joined #ruby
[06:01:42] ule: ok, let me understand better what you said. In this case, it indeed finds the method hello
[06:01:58] baweaver: iamyask: please use gist for more than 3 lines of code
[06:02:13] ruby[bot]: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[06:02:52] baweaver: Also not technically correct but close.
[06:03:11] iamyask: What am i missing @baweaver ?
[06:03:12] baweaver: Everything eventually ends up in Object which ends up in basic object, but super chains are a factor there as well
[06:03:16] ule: iamyask: https://eval.in/926565
[06:03:20] ule: check this out
[06:03:23] DmitryBochkarev: has joined #ruby
[06:03:25] baweaver: The thing to note is that _after_ it gets through all of that it checks for method_missing
[06:03:30] ule: it works exactly how we're discussing before
[06:03:41] baweaver: and if it can't find any overrides it'll then give a missing error
[06:03:50] baweaver: that's basically the difference there
[06:04:58] mjago`: has joined #ruby
[06:05:38] iamyask: hmm , I still don't get it. When we do `Children.hello` , it looks up the method in `Children` -> `Parent` -> `Object`.
[06:05:57] ule: but in that case, it finds on Parent
[06:06:20] ule: What makes you think it wouldn't find in the Parent class?
[06:06:38] iamyask: Yep it does., but What's confusing to me is, why is it looking for method in class `Children` ? Shouldn't it look for method in `Children.class` class ?
[06:07:04] iamyask: Like , when we do `test`.upcase , it looks for method in `test`.class ?
[06:07:27] ule: I guess thats basic OOP theory
[06:07:47] ule: when Children inherits Parent class, it gets all methods for free
[06:08:00] iamyask: I thought in ruby everything is an object, so calling the method on instance should behave the same way as calling the method on a class ?
[06:08:51] iamyask: I understand how inheritence works, what's confusing me is the process of method lookup in instance objects and class objects
[06:09:04] baweaver: not strictly. Blocks aren't objects
[06:09:10] ule: I guess it's the same thing?
[06:09:16] baweaver: pretty much
[06:10:01] baweaver: It's basically looking up by proximity of the current context
[06:10:21] iamyask: Not sure what you mean by "proximity of the current context" ?
[06:10:28] baweaver: That means that a local variable beats a method beats a ...
[06:10:58] baweaver: It starts looking locally then asks the next source of truth until it finds an answer, then asks again if anything knows how to deal with a missing method
[06:11:33] elphe: has joined #ruby
[06:11:43] iamyask: hmm, so method look up is different when we do `Parent.method` from when we do `instance_of_parent.method` ?
[06:12:03] baweaver: Why would they be the same?
[06:12:05] mikhael_k33hl: has joined #ruby
[06:12:26] iamyask: Because both `Parent` and `instance_of_parent` are objects in ruby ?
[06:12:53] mikhael_k33hl: Using sqlite3 gem, how do you create spec tests for your instance methods that run queries against your database?
[06:14:17] baweaver: They are, but that's not correct strictly speaking
[06:14:27] baweaver: What is a class?
[06:14:28] ule: mikhael_k33hl: if you're talking about RubyOnRails, I guess you can have two sqlite files. One for "development" and another one for "tests" the same way you can have in mysql no?
[06:15:04] mikhael_k33hl: ule: just pure ruby
[06:15:18] baweaver: What do you want to test?
[06:15:29] baweaver: and at what level?
[06:15:38] baweaver: Are these unit tests?
[06:16:19] baweaver: iamyask: What is a class? What happens when you call new on that class?
[06:16:39] baweaver: There's a difference between a blueprint and a house, no?
[06:16:47] baweaver: but you could call both objects
[06:17:11] iamyask: hmm, yea that makes sense. Thanks for clarifying! @baweaver :)
[06:17:23] rabajaj: has joined #ruby
[06:17:32] zacts: has joined #ruby
[06:17:52] mikhael_k33hl: baweaver: I have a class/object that depends on sqlite3 gem and does some operations on the database, I'd like to create spec tests that each method does it is intended
[06:18:49] baweaver: and what is intended?
[06:20:42] apeiros: has joined #ruby
[06:20:51] LocaMocha: has joined #ruby
[06:20:52] mikhael_k33hl: baweaver: Like I have a method that updates the info on a table, I'd like to test that method that it really updates that
[06:21:06] baweaver: So integration tests then
[06:21:47] baweaver: A test is comprised of a few principle parts: What, When, Then
[06:21:52] mikhael_k33hl: baweaver: Oh, so that's integration test, man this unit,spec and integration tests are confusing for me hehe, but yeah something loike that
[06:22:19] baweaver: What is being updated? When this query is executed Then what do we expect to have happened?
[06:22:35] baweaver: "What" is your subject, what you're describing
[06:22:52] baweaver: "When" and "Then" are your assertion and your expectation
[06:23:27] mikhael_k33hl: baweaver: I see, hmm I should create a new method to get/fetch the database so I can create assertions then
[06:23:56] baweaver: psuedo - describe 'WHAT update' { it 'WHEN updates the table' { expect(table).to be(updated) } }
[06:24:29] baweaver: The question is how do you set up the scenario, how do you perform the event, and how do you test that it was performed to your expectations
[06:24:31] mikhael_k33hl: baweaver: thanks, i'll try to follow that
[06:24:55] baweaver: and how do you clean up afterwards
[06:24:56] baweaver: Most make a test database explicitly for this, which is a hint from Rails land
[06:25:01] mikhael_k33hl: baweaver: I guess that's where it gets difficult
[06:25:13] baweaver: normally it's seeded with some fake data either before or during the tests
[06:25:35] baweaver: To do an integration test you're going to need a fake representation of your database
[06:25:46] baweaver: otherwise what in the world are you integrating against?
[06:27:56] konsolebox: has joined #ruby
[06:28:02] baweaver: It's possible to get a representation of the schema using sqlite3 which you can use to make your fake db
[06:28:09] naprimer: has joined #ruby
[06:28:24] baweaver: Just remember Rails does a create -> set up -> seed
[06:28:26] mtkd: has joined #ruby
[06:28:56] baweaver: so if you can emulate those three tasks (likely using rake for convenience) you're all set.
[06:28:58] alfiemax: has joined #ruby
[06:30:30] anisha: has joined #ruby
[06:31:53] mikhael_k33hl: baweaver: my class/object instantiates the database so I guess I'll start with instantiating that then work my way from there
[06:32:12] baweaver: Separation of concerns
[06:32:55] baweaver: If your class does all that it's likely too big already
[06:33:03] baweaver: combine with the need to make changes to the database itself and it becomes fun
[06:33:27] baweaver: that's why Rails has migrations and rake tasks for these things
[06:36:28] KeyJoo: has joined #ruby
[06:38:35] bedouin: has joined #ruby
[06:41:12] apeiros: has joined #ruby
[06:44:05] dima_: has joined #ruby
[06:44:49] t0adst00l: has joined #ruby
[06:45:16] zwliew: has joined #ruby
[06:48:36] ahrs: has joined #ruby
[06:49:19] kapil___: has joined #ruby
[06:50:09] JusticeFries: has joined #ruby
[06:52:43] bkxd: has joined #ruby
[06:53:01] meesles: has joined #ruby
[06:54:16] bkxd: has joined #ruby
[06:57:22] Ishido: has joined #ruby
[06:58:34] nadir: has joined #ruby
[07:02:27] ur5us_: has joined #ruby
[07:05:39] bkxd: has joined #ruby
[07:05:47] mikhael_k33hl: Using concurrent-ruby gem, what is the best feature to use to make sure database operations are 'thread-safe'.
[07:07:37] t0adst00l: has joined #ruby
[07:10:14] SeepingN: has joined #ruby
[07:11:34] maloik: has joined #ruby
[07:11:56] jamesaxl: has joined #ruby
[07:12:30] ptx0: has joined #ruby
[07:21:45] baweaver: mikhael_k33hl: what exactly are you trying to do?
[07:24:42] mikhael_k33hl: baweaver: https://gist.github.com/marzdgzmn/6e03e8cc60230556cd3614b08dc3166f
[07:24:47] yeticry: has joined #ruby
[07:25:27] mikhael_k33hl: I want to create a variable that will be shared by all threads, adding and removing jobs to make sure there will be no duplicate jobs. Also at the start and end of the thread, they will be invoking the @db instance variable to do some database operations so I also want that to be thread safe
[07:26:55] baweaver: That's the entire purpose of a database
[07:27:06] baweaver: and transactions for that matter
[07:27:23] baweaver: though question is why you're handling that yourself instead of just using a job server like Sidekiq
[07:28:42] mikhael_k33hl: baweaver: Oh, I'm using beanstalk, but I don't think beanstalk has some restrictions against duplicates
[07:28:44] baweaver: don't try and do job management yourself unless absolutely necessary
[07:29:08] baweaver: Key them then, uuid works wonders
[07:29:39] mikhael_k33hl: baweaver: can you elaborate on that one please
[07:30:11] baweaver: use a UUID as a key
[07:30:26] baweaver: I think it was in SecureRandom
[07:33:20] cadillac_: has joined #ruby
[07:33:56] adac: has joined #ruby
[07:41:59] elsevero: has joined #ruby
[07:42:47] bkxd: has joined #ruby
[07:44:44] mikhael_k33hl: baweaver: oh okay I'll take a look at that UUID and Hashes thing
[07:45:09] CrazyEddy: has joined #ruby
[07:52:18] aupadhye: has joined #ruby
[07:53:39] duderono_: has joined #ruby
[07:55:37] elphe: has joined #ruby
[07:55:48] Dimik: has joined #ruby
[07:57:18] kfpratt: has joined #ruby
[07:58:58] alex``: has joined #ruby
[07:59:19] nso95: has joined #ruby
[08:01:05] t0adst00l: has joined #ruby
[08:02:18] m4xSpL01t: has joined #ruby
[08:05:05] reber: has joined #ruby
[08:07:46] dviola: has joined #ruby
[08:11:53] dionysus69: has joined #ruby
[08:24:11] biberu: has joined #ruby
[08:24:20] amelliaa: has joined #ruby
[08:24:58] code_zombie: has joined #ruby
[08:26:05] jenrzzz: has joined #ruby
[08:26:05] jenrzzz: has joined #ruby
[08:28:44] marr: has joined #ruby
[08:31:48] mark_66: has joined #ruby
[08:32:28] mtkd: has joined #ruby
[08:32:47] iamyask: has joined #ruby
[08:32:55] iamyask: can someone answer this ? https://stackoverflow.com/questions/48004117/how-class-method-look-ups-work-while-inheritance-in-ruby
[08:37:44] discopatrick: has joined #ruby
[08:37:57] Ricky: has joined #ruby
[08:48:40] al2o3-cr: iamyask: Child.singleton_class.ancestors it follows this path until it finds the method :hello
[08:48:42] jenrzzz: has joined #ruby
[08:54:36] elphe: has joined #ruby
[08:54:38] t0adst00l: has joined #ruby
[08:56:43] camilasan: has joined #ruby
[08:56:44] claudiuinberlin: has joined #ruby
[09:01:17] al2o3-cr: iamyask: i'll be afk for a bit now, so hang around if you're still not sure :)
[09:06:46] duderonomy: has joined #ruby
[09:13:44] dellavg_: has joined #ruby
[09:15:45] drewmcmillan: has joined #ruby
[09:16:36] duderonomy: has joined #ruby
[09:17:21] amatas: has joined #ruby
[09:31:59] vipaca: has joined #ruby
[09:35:08] zwliew: has joined #ruby
[09:47:29] InfinityFye: has joined #ruby
[09:49:03] InfinityFye: has left #ruby: ()
[09:57:11] dionysus69: has joined #ruby
[09:58:13] drewmcmillan: has joined #ruby
[10:03:54] kfpratt: has joined #ruby
[10:05:37] Serpent7776: has joined #ruby
[10:22:49] reber: has joined #ruby
[10:23:41] alfiemax: has joined #ruby
[10:28:01] alfiemax: has joined #ruby
[10:31:02] Hanmac: has joined #ruby
[10:38:41] Tony-St4rk: has joined #ruby
[10:42:02] TomyLobo: has joined #ruby
[10:43:12] quarcu: has joined #ruby
[10:47:10] dionysus69: can this be subject to race condition?
[10:47:11] dionysus69: return unless already2?
[10:47:11] dionysus69: transaction { 1 + 1 }
[10:47:42] T0ggi3: has joined #ruby
[10:47:44] dionysus69: is it better practice to move that conditional inside transaction?
[10:50:51] alfiemax_: has joined #ruby
[10:56:29] jnyw: has joined #ruby
[10:58:19] SirOliver: has joined #ruby
[11:03:05] ltem: has joined #ruby
[11:11:31] tvw: has joined #ruby
[11:12:15] tvw: has joined #ruby
[11:28:45] elphe: has joined #ruby
[11:30:32] adac: has joined #ruby
[11:33:44] despai: has joined #ruby
[11:38:20] wald0: has joined #ruby
[11:48:41] camilasan: has joined #ruby
[11:49:38] moei: has joined #ruby
[11:56:50] AJA4350: has joined #ruby
[12:16:25] jamesaxl: has joined #ruby
[12:23:10] Psybur: has joined #ruby
[12:28:17] apeiros: has joined #ruby
[12:31:16] tomphp: has joined #ruby
[12:33:28] kfpratt: has joined #ruby
[12:46:30] Byteflux: has joined #ruby
[12:47:54] rrutkowski: has joined #ruby
[12:48:56] Byteflux: has joined #ruby
[12:50:16] mtkd: has joined #ruby
[12:54:32] adgtl: has joined #ruby
[12:54:48] adgtl: Radar: hey
[12:57:01] SirOliver: has joined #ruby
[12:59:15] Byteflux: has joined #ruby
[13:08:54] shinnya: has joined #ruby
[13:19:33] mrBen2k2k2k: has joined #ruby
[13:27:43] nobitanobi: has joined #ruby
[13:30:23] lostandfound: has joined #ruby
[13:35:45] chocoelho: has joined #ruby
[13:40:40] jeffreylevesque: has joined #ruby
[13:42:24] bmurt: has joined #ruby
[13:51:49] bmurt: has joined #ruby
[13:52:05] nadir: has joined #ruby
[13:55:37] hays: i was just reading about using yield in .initialize methods. seems kinda like a violation of encapsulation .. do people use this? curious the conditions where this makes sense
[14:00:30] apeiros: why would it violate encapsulation?
[14:00:54] apeiros: and yes, people use this. even stdlib (and maybe even core and I just can't recall an example)
[14:03:19] pabs: apeiros: File.open is the closest example i can think of
[14:04:09] pabs: (any situation where you want to construct an object and do some cleanup when you are done with the object (e.g. File#close in the File.open example)
[14:04:12] apeiros: though that's not using it in initialize. I thought about Struct.new
[14:05:09] havenwood: Hash, Array, etc have an optional initialization block as well.
[14:05:21] apeiros: how did I not think of those!
[14:05:25] hays: apeiros: because you're basically giving direct access to the internals of the class when you initialize
[14:05:28] tomphp: has joined #ruby
[14:05:29] pabs: the Hash one is really useful, i use it all the time
[14:05:33] apeiros: it's like… right in front of me :D thx havenwood
[14:05:44] apeiros: hays: no they don't
[14:06:05] pabs: (for one-off lookup tables, like so: sums = Hash.new { |h, k| h[k] = 0 }
[14:06:13] hays: let me put up some code so we are tlaking about same thing
[14:06:14] apeiros: hays: a block invoked via yield is not run in the context of the yielder
[14:06:49] apeiros: unless you talk about instance_eval. and wrt encapsulation, all instance_* things are an issue. but entirely unrelated to initialize.
[14:07:14] hays: https://bpaste.net/show/9333ec73d4d5
[14:07:15] havenwood: pabs: For that one you can just: sums = Hash.new 0
[14:07:35] pabs: for example: sums = list.reduce(Hash.new { |h, k| h[k] = 0})) do |r, row| r[row['key_col']] += row['val_col']; r }
[14:08:18] hays: apeiros: so i think i see what you mean. the |c| is outside the context, so this wouldnt work without a public setter
[14:08:33] apeiros: hays: precisely
[14:08:54] apeiros: yield(self) is mostly a convenience thing
[14:09:02] apeiros: and still uses the public interface
[14:10:31] hays: so this is equivalent: https://bpaste.net/show/dbbca19aeab2
[14:11:12] hays: but i guess the yield makes the code look a bit better in a sense because it groups the initialization activity in a block
[14:11:53] apeiros: personally I prefer kwargs for simple stuff like that, though.
[14:12:29] apeiros: car = Car.new color: :red, doors: 4
[14:13:16] haylon: Struct, or OpenStruct ?
[14:14:15] JusticeFries: has joined #ruby
[14:14:54] havenwood: Ruby 2.5 Struct gets keyword_init: https://gist.github.com/havenwood/a9260df1c550a3da5e2905ea68340944
[14:15:04] coderphive: has joined #ruby
[14:15:11] havenwood: apeiros: Structs didn't play nice with kwargs 'till 2.5.
[14:15:25] apeiros: havenwood: yeah, I know
[14:15:38] apeiros: I have a patch for that for pre 2.5 :D
[14:15:41] havenwood: apeiros: ah, your example was a class!
[14:16:20] havenwood: apeiros: I'm glad they got keyword_init, even though it's a bit awkward!
[14:16:41] apeiros: IMO they missed out on providing an "always kwargs" constructor (which is what my patch adds), like: Struct.from_hash(key: …)
[14:17:14] apeiros: errr, MyStruct.from_hash oc
[14:17:26] apeiros: Struct should still be Struct.new(…)
[14:17:43] apeiros: wouldn't mind a Struct.with_defaults(member: default, …) tho :D
[14:18:17] haylon: Ah, I missed some earlier talk. I saw your splurb apeiros and thought it could be an openstruct or struck as well.
[14:18:40] apeiros: haylon: ah, I see
[14:24:35] Ouchy: has joined #ruby
[14:24:35] Ouchy: has joined #ruby
[14:28:08] bmurt: has joined #ruby
[14:28:51] Dimik: has joined #ruby
[14:29:18] k0mpa: has joined #ruby
[14:32:39] k0mpa: has joined #ruby
[14:36:53] adac: has joined #ruby
[14:41:35] k0mpa: has joined #ruby
[14:43:24] dinfuehr: has joined #ruby
[14:43:52] dima_: has joined #ruby
[14:51:03] despai: has joined #ruby
[14:55:15] zwliew: has joined #ruby
[14:55:21] mtkd: has joined #ruby
[15:03:01] no-dashes: has joined #ruby
[15:03:03] rk182: has left #ruby: ()
[15:05:23] kfpratt: has joined #ruby
[15:08:01] T0ggi3: has joined #ruby
[15:09:51] no-dashes: Hey Folks, I think I'd like a 'parameterized' include. `include SomeModule, 'p1', foo: bar` and the parameters are simply passed to `included`. That would make quite some monkey patching obsolete. Any opinions to that?
[15:12:33] apeiros: no-dashes: build it. it's not that hard.
[15:13:03] johno84: has joined #ruby
[15:13:07] apeiros: roughly: class Module; def include_with(mod, *); include mod; mod.__send__(:included_with, *); end
[15:13:23] sina: has joined #ruby
[15:13:27] bmurt: has joined #ruby
[15:14:28] apeiros: no-dashes: also working: `include YourModuleClass.new(…)` where YourModuleClass is `class YourModuleClass < Module; …`
[15:14:48] krz: has joined #ruby
[15:15:51] no-dashes: apeiros: I like the `include YourModuleClass.new` idea!
[15:16:45] kfpratt: has joined #ruby
[15:18:04] conta1: has joined #ruby
[15:24:48] chocoelho: has joined #ruby
[15:28:07] href: has joined #ruby
[15:35:37] jnix: has joined #ruby
[15:37:45] cdg: has joined #ruby
[15:41:17] kfpratt: has joined #ruby
[15:49:03] alfiemax: has joined #ruby
[15:52:06] SirOliver: has joined #ruby
[15:53:29] bhaak: has joined #ruby
[15:54:33] kfpratt: has joined #ruby
[15:55:23] tvw: has joined #ruby
[15:58:50] marius: has joined #ruby
[15:58:57] AgentVenom: has joined #ruby
[16:00:17] Dimik: has joined #ruby
[16:02:11] kfpratt: has joined #ruby
[16:04:51] JusticeFries: has joined #ruby
[16:13:01] rippa: has joined #ruby
[16:13:15] [Butch]: has joined #ruby
[16:13:52] unreal: has joined #ruby
[16:17:18] Byteflux: has left #ruby: ("WeeChat 2.0.1")
[16:20:08] lostandfound: has joined #ruby
[16:20:20] SirOliver: has joined #ruby
[16:20:39] despai: has joined #ruby
[16:21:49] Mia: has joined #ruby
[16:22:49] gizmore: has joined #ruby
[16:26:48] adac: has joined #ruby
[16:29:38] kapil___: has joined #ruby
[16:29:46] apeiros: has joined #ruby
[16:31:15] vipaca: has joined #ruby
[16:31:17] pastorinni: has joined #ruby
[16:32:22] apeiros: has joined #ruby
[16:34:39] Puffball_: has joined #ruby
[16:34:55] llua: has joined #ruby
[16:36:16] McSoFake: has joined #ruby
[16:36:36] lostandfound: has joined #ruby
[16:37:49] jeffreylevesque: has joined #ruby
[16:38:56] DLSteve: has joined #ruby
[16:41:35] alfiemax: has joined #ruby
[16:41:36] graaff: has joined #ruby
[16:51:27] JusticeFries: has joined #ruby
[16:55:12] Vapez: has joined #ruby
[16:56:34] bmurt: has joined #ruby
[17:00:13] mtkd: has joined #ruby
[17:06:17] cdg: has joined #ruby
[17:10:16] JusticeFries: has joined #ruby
[17:12:30] nobitanobi: has joined #ruby
[17:16:48] SirOliver: has joined #ruby
[17:17:54] cdg: has joined #ruby
[17:17:54] leah2: has joined #ruby
[17:20:16] ogres: has joined #ruby
[17:20:29] orbyt_: has joined #ruby
[17:23:31] bmurt: has joined #ruby
[17:23:55] meesles: has joined #ruby
[17:25:46] JusticeFries: has joined #ruby
[17:26:32] cdg: has joined #ruby
[17:26:50] apeiros: has joined #ruby
[17:30:04] apeiros: has joined #ruby
[17:30:12] cdg: has joined #ruby
[17:30:45] cdg_: has joined #ruby
[17:31:56] planigan: has joined #ruby
[17:50:16] bmurt: has joined #ruby
[17:50:31] kwerle: has joined #ruby
[17:51:57] kwerle: In updating my rails app to ruby 2.5.0, I am now receiving a few "uninitialized constant ActionView::CompiledTemplates::EXPR_ARG" in my tests. EXPR_ARG looks like a ruby thing. I find no recent web references, however. Any mention of this here?
[17:54:57] jenrzzz: has joined #ruby
[17:57:38] darix: kwerle: some more context like line numbers and stuff would help. also which actionview version.
[17:58:04] nobitanobi: has joined #ruby
[17:59:16] darix: kwerle: it seems the rdoc version you have is to new
[17:59:47] darix: from ruby2.4 stdlib ./rdoc/ruby_token.rb
[17:59:56] darix: references EXPR_ARG
[18:00:18] darix: ruby 2.5 comes with rdoc 6 which has a rewritten parser
[18:01:23] nobitano_: has joined #ruby
[18:01:38] dionysus69: has joined #ruby
[18:01:57] kwerle: Yeah, that's what I was thinking. Not sure how something from rails could trigger a reference to an outdated symbol, though. Not in a docker build with fresh everything, anyway.
[18:02:58] darix: kwerle: well it was only tested against 2.4.0 :)
[18:03:10] darix: kwerle: maybe rails 5.2 works for ruby 2.5
[18:03:21] kwerle: Not yet released?
[18:03:29] darix: beta or RC phase
[18:03:52] kwerle: Yup. beta 2.
[18:04:09] kwerle: I'll come back when it's golden. Thanks!
[18:04:13] nobitanobi: has joined #ruby
[18:04:16] darix: kwerle: wait
[18:04:27] darix: kwerle: try this: gem 'rdoc', '~> 5'
[18:04:31] darix: to your gemfile
[18:04:34] darix: kwerle: try this: gem 'rdoc', '~> 5.0'
[18:04:47] darix: with a comment to remove it with rails 5.2 maybe
[18:04:56] darix: and that you need it for EXPR_ARG
[18:06:15] bmurt: has joined #ruby
[18:10:01] kwerle: My rdoc is locked at 4.3 - so I think it's something related, but not identical.
[18:10:34] adgtl: has left #ruby: ("Using Circe, the loveliest of all IRC clients")
[18:16:59] KeyJoo: has joined #ruby
[18:18:19] raynold: has joined #ruby
[18:25:47] alfiemax: has joined #ruby
[18:29:57] dviola: has joined #ruby
[18:30:22] bmurt: has joined #ruby
[18:30:57] ur5us: has joined #ruby
[18:38:11] JusticeFries: has joined #ruby
[18:42:24] DrCode: has joined #ruby
[18:43:21] clemens3: has joined #ruby
[18:48:10] miskatonic: has joined #ruby
[18:55:09] havenwood: 42.yield_self.to_a #=> [42]
[18:55:32] havenwood: I guess we have a fancy new response for the folk asking how to turn X into [X].
[18:58:15] meesles: 10/10 would use in production
[18:59:36] despai: has joined #ruby
[19:01:33] nerium: has joined #ruby
[19:03:17] nobitanobi: has joined #ruby
[19:08:25] apeiros: 👍🏻 havenwood
[19:09:31] sameerynho: has joined #ruby
[19:13:20] alfiemax: has joined #ruby
[19:14:32] cjohnson: I ran bundle install --deployment and now bundle install keeps installing locally
[19:14:35] cjohnson: I don't want it to anymore
[19:14:36] AlexRussia: has joined #ruby
[19:14:42] cjohnson: Anybody know which config file it must have changed?
[19:15:17] cjohnson: bundle install --no-deployment fixed it
[19:15:24] cjohnson: But just for my own sake anybody know which file it changed?
[19:18:46] havenwood: cjohnson: .bundle/config
[19:20:37] havenwood: cjohnson: It'd create the `.bundle` folder and `config` file when you run `--deployment` and add the `BUNDLE_FROZEN: "true"` and `BUNDLE_PATH: "vendor/bundle"` to the config YAML file.
[19:21:40] havenwood: --no-deployment removes those key/value pairs but leaves the folder and file
[19:21:59] sagax: has joined #ruby
[19:22:55] cjohnson: I don't have a .bundle/config in my project
[19:22:58] cjohnson: would it put it elsewhere?
[19:31:11] stove: has joined #ruby
[19:31:46] sanscoeur: has joined #ruby
[19:32:40] Vapez: has joined #ruby
[19:33:39] troys: has joined #ruby
[19:33:40] cadillac_: has joined #ruby
[19:34:46] alfiemax: has joined #ruby
[19:39:22] pastorinni: has joined #ruby
[19:47:18] vipaca: has joined #ruby
[19:51:58] alfiemax: has joined #ruby
[19:54:14] Meitei: has joined #ruby
[19:54:55] mistergibson: has joined #ruby
[19:55:36] Meitei: Are there any libraries for AI/Machine learning with ruby? Where is ruby in these ?
[19:56:25] npgm: has joined #ruby
[19:57:16] cdg: has joined #ruby
[19:58:15] claudiuinberlin: has joined #ruby
[19:58:34] DrCode: has joined #ruby
[19:58:59] minimalism: has joined #ruby
[20:04:35] alfiemax: has joined #ruby
[20:04:56] Azure: has joined #ruby
[20:05:07] sanscoeur: has joined #ruby
[20:06:06] lunarkitty7: has joined #ruby
[20:08:54] sanscoeur: has joined #ruby
[20:09:19] bmurt: has joined #ruby
[20:10:00] tAn: has joined #ruby
[20:19:43] despai: has joined #ruby
[20:24:26] drewmcmillan: has joined #ruby
[20:26:10] vipaca: has joined #ruby
[20:27:21] cloaked1: has joined #ruby
[20:30:06] despai: has joined #ruby
[20:30:21] nerium: has joined #ruby
[20:31:38] bmurt: has joined #ruby
[20:35:28] pilne: has joined #ruby
[20:42:02] jeffreylevesque: has joined #ruby
[20:42:50] raynold: ahh it's a wonderful day
[20:43:01] alfiemax: has joined #ruby
[20:47:10] gloscombe: has joined #ruby
[20:50:04] psychicist__: has joined #ruby
[20:54:08] discopatrick: has joined #ruby
[20:57:23] bradland: has joined #ruby
[21:00:01] alfiemax: has joined #ruby
[21:02:10] nicesignal: has joined #ruby
[21:04:37] nerium: has joined #ruby
[21:06:17] marius: has joined #ruby
[21:06:30] despai: has joined #ruby
[21:08:32] al2o3-cr: raynold: why?
[21:10:15] al2o3-cr: raynold: you won the lottery
[21:13:04] pwnd_nsfw`: has joined #ruby
[21:14:24] al2o3-cr: >> Object.const_set(:M, Module.new { C = 99 }); C
[21:14:25] ruby[bot]: al2o3-cr: # => 99 (https://eval.in/927366)
[21:14:45] al2o3-cr: does this work in 2.5?
[21:16:27] pastorinni: has joined #ruby
[21:17:04] alfiemax: has joined #ruby
[21:17:39] pastorinni: has joined #ruby
[21:19:37] havenwood: al2o3-cr: yes
[21:19:42] bkxd: has joined #ruby
[21:23:05] al2o3-cr: havenwood: i've not got 2.5 yet, arch maintainer yet :(
[21:23:52] havenwood: al2o3-cr: isn't that jhass?
[21:24:35] havenwood: al2o3-cr: chruby plays nice with arch Ruby if you want to use 2.5 for now: https://gist.github.com/jhass/8839655bb038e829fba1
[21:25:45] al2o3-cr: havenwood: i'm patient ;)
[21:25:52] havenwood: al2o3-cr: it's still the case that: Module.new.instance_eval { C = 42 }; C #=> 42
[21:26:34] al2o3-cr: whoaaooo wt?
[21:28:37] al2o3-cr: it'll be soon.
[21:29:24] al2o3-cr: the bastards always do python.
[21:29:58] alfiemax: has joined #ruby
[21:30:53] al2o3-cr: snakes in arch.
[21:38:02] Utkarsh: has joined #ruby
[21:38:09] freeze: has joined #ruby
[21:39:06] al2o3-cr: yaourt, i'd rather kick myself in the dick.
[21:39:16] the_f0ster: has joined #ruby
[21:39:25] ahuman: has joined #ruby
[21:39:53] al2o3-cr: pardon my french.
[21:40:25] cjohnson: has joined #ruby
[21:41:12] claudiuinberlin: has joined #ruby
[21:42:35] alfiemax: has joined #ruby
[21:43:36] al2o3-cr: use auracle (cower).
[21:44:49] nikkyjr: has joined #ruby
[21:46:56] jnollette: has joined #ruby
[21:46:57] gloscombe: has joined #ruby
[21:47:18] giraffe: has joined #ruby
[21:48:16] code_zombie: has joined #ruby
[21:51:54] mtkd: has joined #ruby
[21:55:11] dinfuehr: has joined #ruby
[22:08:36] QualityAddict: has joined #ruby
[22:09:55] jnyw: has joined #ruby
[22:14:45] n0vo: has joined #ruby
[22:15:19] orbyt_: has joined #ruby
[22:18:02] n0vo: has joined #ruby
[22:18:02] n0vo: has joined #ruby
[22:32:24] elphe: has joined #ruby
[22:35:13] quobo: has joined #ruby
[22:37:18] shinnya: has joined #ruby
[22:38:00] darkhanb: has joined #ruby
[22:41:59] jenrzzz: has joined #ruby
[22:41:59] jenrzzz: has joined #ruby
[22:42:28] alfiemax: has joined #ruby
[22:59:05] alfiemax: has joined #ruby
[23:00:21] ruby[bot]: has joined #ruby
[23:00:21] ChanServ: +o ruby[bot]
[23:01:15] Psybur: has joined #ruby
[23:05:55] JusticeFries: has joined #ruby
[23:08:38] iszak: has joined #ruby
[23:08:38] iszak: has joined #ruby
[23:09:03] dinfuehr: has joined #ruby
[23:12:00] alfiemax: has joined #ruby
[23:14:47] ldepandis: has joined #ruby
[23:17:04] milardovich: has joined #ruby
[23:29:49] Papierkorb: has joined #ruby
[23:30:01] Papierkorb: has left #ruby: ("Konversation terminated!")
[23:30:12] tvw: has joined #ruby
[23:35:29] al2o3-cr: has joined #ruby
[23:37:39] current_user: has joined #ruby
[23:43:14] rrutkowski: has joined #ruby
[23:43:15] joast: has joined #ruby
[23:46:41] sanscoeur: has joined #ruby
[23:46:44] Ishido: has joined #ruby
[23:50:20] nobitanobi: has joined #ruby
[23:51:35] rrutkowski: has joined #ruby
[23:56:19] rrutkowski: has joined #ruby
[23:57:02] alborok: has joined #ruby
[23:57:58] alborok: has left #ruby: ()
[23:58:07] bkxd: has joined #ruby