Activity Graph

Page 1 of 5 | Next »


[17:53:46] syndikate: Ping timeout: 258 seconds


[06:20:20] syndikate: Is there any advantage for #1 over #2
[06:24:23] syndikate: Okay, good point. I will see if that can be done - some of the conditions are derived from joining other tables and is easily made available via the model method, hence resorted to this way..
[06:25:02] syndikate: Although, currently I was asked why not use #find_each instead of #2 but from what I understood #2 happens underneath #1. So, except the syntactic sugar is there any advantage sevenseacat ?
[06:25:28] syndikate: Ooh, missed that.


[04:48:06] syndikate: One of the codebase that am working on has a case statement where the `when` condition has multiple (more than 5) values against it. What is a better way to write this?
[06:46:07] syndikate: Haha I wish mcspud :D
[06:46:25] syndikate: I took it out into an array and used splat to compare
[07:15:02] syndikate: baweaver, sure will do. I closed that work for now :D
[07:15:15] syndikate: Hey baweaver, are you this person ->
[07:16:15] syndikate: Haha nice. Good to know :D I was watching that video yesterday, gotta finish it
[07:17:00] syndikate: Yes, I think I didn't finish that too, not because I didn't like it coz I haven't had much time recently
[07:17:29] syndikate: Yeah I try to squeeze them in during lunch breaks and stuff
[07:18:41] syndikate: I really like the way how you put so much effort, like literally making a play :D
[07:18:45] syndikate: I already follow you in twitter :D
[07:23:02] syndikate: baweaver, it's quite funny - beardonomics
[07:24:25] syndikate: baweaver, wow 10 years of talk. I have lot of questions
[07:25:54] syndikate: How do you pick up so many topics? I have been trying to much figure about something to talk at local meetups
[07:26:04] syndikate: I could use a tip or two
[07:27:09] syndikate: Oh, okay sure. Do you prefer twitter or some other media?
[07:28:02] syndikate: Alright, I will drop a message on twitter then
[07:30:16] syndikate: I had read your post on pattern matching although it didn't feel natural to me initially, I will give it a go again.
[07:30:43] syndikate: I had done some elixir before, maybe that has influenced me as well
[07:32:47] syndikate: What's the ADT that you guys are talking about? (Type system noob here)
[07:33:15] syndikate: Oh, somehow that reminds me of haskell
[07:34:06] syndikate: dminuoso, Oh. Okay. What all did you go through to learn more about these stuff?
[07:34:27] syndikate: Type theory and language design
[07:34:37] syndikate: I mean it's a pretty vast subject on it's own right?
[07:37:34] syndikate: Oh, okay. They just opened a whole new perspective for me
[07:37:38] syndikate: dminuoso, thanks
[07:38:02] syndikate: baweaver, that's another magic word I want to understand - monoids
[07:38:39] syndikate: I believe so atleast
[07:38:51] syndikate: accumulator
[07:39:00] syndikate: The initial value
[07:39:21] syndikate: Sets the type of result?
[07:45:32] syndikate: baweaver, Thanks a lot! Man those re some good stuff in simple words. Saved it
[07:45:46] syndikate: dminuoso, Oh okay! Thanks that makes it more clear
[07:45:51] syndikate: So in programming where does it hold value?
[07:49:49] syndikate: dminuoso, oh okay. The only polymorphism I know is from OOP.
[07:50:09] syndikate: So monois is essentially a property
[07:50:14] syndikate: Or behavior
[07:51:51] syndikate: Okay I will go a bit more through it now that I have some understanding
[07:54:17] syndikate: What do you guys practice to understand it?
[07:55:03] syndikate: Ah okay, I may not have enough time for another language atm :(
[08:07:32] syndikate: Oh okay, yeah it's starting to make some sense now
[08:10:39] syndikate: Yeah like a reducer, has an accumulator with initial value.
[08:11:47] syndikate: A noob doubt here - so if am writing a moonoid function it would have a local value inside (closure like) which has the default starting value?
[08:20:58] syndikate: Okay gotcha, you are talking as monoid as on object, I was talking monoid as function
[08:23:20] syndikate: Okay, I will have to not think it from ruby then.


[09:24:08] syndikate:
[09:24:08] syndikate: I am trying to understand this file watcher gem, but unable to figure the code where it does the polling...can somebody help me navigate through this?
[09:40:15] syndikate: Oh, got it. It checks the mtime of the file


[05:35:29] syndikate: has joined #ruby
[05:35:29] syndikate: has joined #elixir-lang
[05:35:29] syndikate: has joined #RubyOnRails


[06:54:05] syndikate: Okay, figured out access logs, now only thing left is to sync the log file
[06:54:17] syndikate: As of now WEBrick only syncs it on process exit
[08:55:43] syndikate: Quit: M'Kay


[03:32:02] syndikate: havenwood, I am creating a server of out of WebRick::HTTPServer, ( I will be looking into making use of unix sockets soon). So right now I want to write all the logs into a file. The logger should log things in detail like for example in rails app


[19:30:34] syndikate: Can someone help understand how I can log all the requests with IP address and path and body like how rails does in webrick?
[19:30:37] syndikate: I am kinda lost
[19:30:53] syndikate: I am stuck at Accesslog but I have not clue what or how to do with it


[03:32:26] syndikate: Is it a good practice to make use of lambdas and process in a big codebase? Apparently it's rails. I wanted to make some chained method calls look concise so I am declaring a lambda and passing it to one of the maps
[03:32:56] syndikate: But I am not sure how generally it is perceived, the codebase I am on doesn't have any lambda/proc usage as such.
[03:33:03] syndikate: Except for some builtin rails stuff
[05:44:32] syndikate: havenwood, here ->
[05:48:52] syndikate: havenwood, yeah okay. I just opted for the latter for now but I think the first looks more concise. How and why a constant havenwood ?
[05:52:44] syndikate: Oh, okay. I thought so. I didn't get this part "A block handily never instanciates an object".
[05:53:22] syndikate: al2o3-cr, havenwood I could do that. I changed that to this, this felt a little more concise for me, maybe coz I was taking some elixir lessons.
[05:53:34] syndikate: I wasn't sure if I should go down this route actually, that's why I thought to ask :D
[05:56:16] syndikate: OH, okay. havenwood so even if I make it a constant and define it outside, would it still have the issue or allocation objects again?
[05:59:20] syndikate: Yeah okay. I will make it a constant outside the method at the class level so that one lambda is instantiated when the object is instantiated and will be called in the map
[05:59:52] syndikate: Then again, is it okay if I go down this route in ruby code? I mean for me it makes the whole .map.with_index looks better havenwood
[06:03:13] syndikate: havenwood, no it doesn't, but what am trying to do is reduce the number of methods with all this. Right now I could remove one method if I make this chained call concise with lambda and move the call upto the parent method
[06:04:41] syndikate: I think am at borderline overdoing stuff
[06:07:48] syndikate: Ah okay, gotcha. Yeah, the only reason for lambda is for the syntactic sugar of being able to call it like (&lambda_name)
[06:28:39] syndikate: havenwood, bit detailed (sorry) but here is what exactly am doing -
[06:33:54] syndikate: havenwood, yeah the block makes much more sense here. I was just going through the code again. The reason why I opted for lambda first of all is because I could do that &method here. I can't do that if defined a method as def method; end.
[06:34:38] syndikate: But that's again defining a method which has a lambda inside it right? As you said this is gonna create a lambda every time - there is not advantage to this right?
[06:36:27] syndikate: The only advantage of lambda for me here is the syntactic sugar
[06:36:43] syndikate: Ah okay, yeah noted the point regarding freeze.
[06:38:12] syndikate: Yeah I am changing to this, I can prevent a lambda creation here ^
[06:40:45] syndikate: Ah okay, but if I am abstracting it out to the model then the lambda has no much use case, right?
[06:45:56] syndikate: Yeah, so if I am not moving that abstraction to the model, i.e keeping that manipulation method definition in the current class itself maybe I could have a named lambda and re-use it. Now that I have moved it I guess a block is good enough. Is my understanding correct havenwood ?
[06:53:32] syndikate: Ah okay. So I should see it as more of a requirement for a first class citizen to be passed around.


[13:48:54] syndikate: Is there any equivalent way of doing this in ruby? Elixir snippet: Enum.reduce(a_map, &process(&1, &2)), essentially I want to be able to pass a method into where it would automatically pass the two arguments into process_all
[13:54:48] syndikate: I believe it is not possible to get that syntax in ruby, but I just wanted to be sure.
[13:55:11] syndikate: ellcs, what do you mean by multiple os instances?
[17:32:34] syndikate: NL3limin4t0r, phaul Thanks! I was using (&:custom_method) which was causing error, instead I had to use (&custom_method)
[17:32:46] syndikate: I used symbol


[10:04:38] syndikate: Can help me understand what I am missing in this simple unix program?
[10:04:39] syndikate:
[10:05:24] syndikate: I start the programs, takes an input in parent and sends to worker. But in worker I am not able to receive it
[10:05:32] syndikate: It just gets stuck there
[10:21:29] syndikate: Nvm guys, fixed it :D


[19:41:33] syndikate: Was trying out Rails 6 RC1 on an old project and I got this warning
[19:41:35] syndikate: WARN Selenium [DEPRECATION] Selenium::WebDriver::Chrome#driver_path= is deprecated. Use Selenium::WebDriver::Chrome::Service#driver_path= instead.
[19:41:52] syndikate: I understand there is tighter integration for system tests now, but how do I go about this warning


[21:58:46] syndikate: Ping timeout: 246 seconds
[22:07:38] syndikate: has joined #ruby
[22:07:38] syndikate: has joined #elixir-lang
[22:07:38] syndikate: has joined #RubyOnRails


[16:50:07] syndikate: *.net *.split


[18:15:48] syndikate: Hey, I am trying to define a guard like this but am getting syntax error. Although am not able to figure what I am missing here.
[18:16:14] syndikate: defguard valid_position({x, y}) when is_integer(x) and is_integer(y)
[18:16:14] syndikate: defguard valid_position({x, y}) when is_integer(x) and is_integer(y)
[18:16:21] syndikate: Sorry, double paste
[19:33:39] syndikate: Nicd-
[19:33:47] syndikate: Not the full file but the error
[19:35:13] syndikate: Why would that be so?
[19:35:22] syndikate: Is it because of how macro gets expanded?


[18:23:18] syndikate: In this example, the array inside gets created and destroyed each time the method is called, right? Is the reason being going out of scope?
[18:23:21] syndikate:
[18:24:53] syndikate: Ah okay, it would be the same in any language right?
[18:26:43] syndikate: Thanks, yeah, that's what I do havenwood, but that habit came to me from somewhere and was there without me thinking. So, I was just thinking about this now. I was curious for any language that would destroy objects after scope, this would be the same, right?
[18:28:31] syndikate: Oh, okay. What languages are there such?
[18:28:31] syndikate: havenwood, Any string that is being used in a class I usually make it constant and freeze, and some arrays too.
[18:31:08] syndikate: Oh python does that ? :O
[18:35:03] syndikate: I didn't know it has such optimisations while ruby doesn't
[18:45:58] syndikate: Ah well something new for today


[03:26:36] syndikate: Hey, can someone help me understand this further?
[03:27:27] syndikate: Specifically clearing this error - definitions with multiple clauses and default values require a header
[03:27:51] syndikate: So when I define a header method, it does not have a definition so how does elixir know what to return?
[03:38:38] syndikate: starbelly, is there more to that shared text/
[03:49:23] syndikate: Oh, okay so when you have multiple heads, internally it will have a case for arguments and return them and there will be a case for nil? Am I right?
[03:50:19] syndikate: Okay, I got one more silly question
[03:51:58] syndikate: I am trying to wrap my head around this since I am coming from a non functional background. Here is how my brain visualises it - if there are multiple function definitions with different arguments, the language will pick the definition with the matching argument
[03:52:15] syndikate: So, when I think of it that way - the header function has no definition
[03:53:01] syndikate: And suppose I have two other methods definitions as well. Now, when I pass nil arguments, the language would essentially know what to give for default values, but how does it know which definition to pick?
[04:01:21] syndikate: Okay, yeah I got that how that case statement would work. I am wondering when the function gets compiled and it has a case statement based on the arguments, what is the RHS of it? Is it function definition?
[04:03:36] syndikate: OH! So the language knows the header is just to fill in the default values and calls the case again with the default values and starts the chain again
[04:04:22] syndikate: Oh man! Okay! Thanks a lot!
[04:04:26] syndikate: Yeah, this was driving me crazy
[04:04:53] syndikate: Is that bit what you said, in the docs somewhere?
[04:06:48] syndikate: Okay, I think it's not that explicit
[04:06:56] syndikate: Well, maybe it's because am way too beginner
[04:07:33] syndikate: For some odd reason this reminded me of Rails magic and when you figure how some of the "magic" happens :D
[04:08:07] syndikate: Yeah, I want to know where I can get these info. It will be a good read. Doc/book.
[04:08:16] syndikate: A bit more of the language details
[04:32:02] syndikate: Alright, Okay I will justly the abstractions be for now. Thanks starbelly and Nicd-


[11:34:23] syndikate: Does it matter if we memoize a variable in a controller? Wouldn't that controller be destroyed once the request is done and the memoization leaves no benefit?
[11:37:03] syndikate: guyzmo, this is the scenario
[11:38:20] syndikate: Its just for the request life span, there is no use after it
[11:38:26] syndikate: I have the current code like this
[11:38:33] syndikate: But I don't understand why we need to do that
[11:38:54] syndikate: @book variable
[11:39:24] syndikate: Memoising current_user inside APplicationController makes sense because lots of controllers would be inherited (right?)
[11:41:23] syndikate: Agreed, but my question is memoizing that @book variable makes any sense? Because the controller object is done once the request is finished, and no other class inherits/uses it
[11:43:12] syndikate: Yes, check this paste ->
[11:43:16] syndikate: I passed two different ones
[11:43:35] syndikate: The paste I shared above, isn't that memoization?
[11:44:43] syndikate: Yes, so setting @book ||= Book.find(x) is useless, right?
[11:45:27] syndikate: Yup, that's what I wanted to confirm. My current code bas has this style for such controllers and I wanted to remove them, not that they are harm they are just useless
[11:46:55] syndikate: No, none. I checked all those.
[11:47:02] syndikate: This is a fresh module, fresh controller
[11:48:25] syndikate: Totally agree, but I need to use it here
[11:48:49] syndikate: I just wanted to get that ||= out of the way, I wanted to make sure my assumption is correct


[15:41:25] syndikate: How can I implement a dedup with other available functions?
[15:41:50] syndikate: I am working on a problem and it is to remove consecutive duplicate elements in a list
[15:42:07] syndikate: I figured dedup can do it, but I am curious how I can implement otherwise
[18:05:59] syndikate: I am trying to read the definition of deduce but am not still able to understand :D


[13:02:56] syndikate: How do I do an idiomatic lazy lookup for translations in a partial under namespaced route?
[13:03:03] syndikate: Right now I get a path is not available error
[13:06:26] syndikate: Sample file for reference


[05:30:48] syndikate: Remote host closed the connection
[05:31:13] syndikate: has joined #ruby
[05:31:13] syndikate: has joined #elixir-lang
[05:31:13] syndikate: has joined #RubyOnRails


[17:34:44] syndikate: Quit: M'Kay
[17:59:54] syndikate: has joined #ruby
[17:59:54] syndikate: has joined #elixir-lang
[17:59:54] syndikate: has joined #RubyOnRails


[13:29:45] syndikate: Anybody migrated from feature spec to system specs? I am seeing to be having problem in configuring chrome for capybara
[13:41:18] syndikate: Okay, I want to run chrome in headless mode
[13:41:42] syndikate: I am not able to understand what to set it to get It running on an existing applicationn
[13:43:22] syndikate: Nope, I whatever I change it brings up chrome and not headless. I have both old Capybara config setting for default driver and the driven_by as well. Let me share config?
[13:48:57] syndikate: tbuehlmann,
[13:49:06] syndikate: Sorry if any of that is stupid I am just starting to pick this up
[13:59:28] syndikate: tbuehlmann, I think there are many issues, let me do some clean up and get back
[14:38:55] syndikate: tbuehlmann, I have `Rspec.feature` is it mandatory to have that changed to `Rspec.describe` ?


[07:38:05] syndikate: If am running my specs using parallel_tests gems and in between in one of the specs if I call `DatabaseCleaner.clean` does it wipe out data from all the connections? How does this behave?
[07:51:46] syndikate: Can I interpret that word as "god knows" or "anomaly" or "can't say"
[07:52:15] syndikate: I have not used that word before sevenseacat :P
[07:53:08] syndikate: database_cleaner gem shows the clean method calling clean on all connections
[07:53:30] syndikate: Now gotta see what happens when we have parallel_tests to the mix :( Why do people have to bring in complicated situations


[12:58:17] syndikate: If my clean up strategy is truncation does it truncate only the data added in that test or the whole table?
[13:22:02] syndikate: Ah okay thanks


[06:34:44] syndikate: Is true parallelism possible in ruby using processes?
[06:37:35] syndikate: Ah okay havenwood. Was reading through parallel_tests gem
[06:48:51] syndikate: Oh, they are helped by having the VM eh? havenwood
[06:49:25] syndikate: havenwood, Yeah that's what I meant. Oh okay nice will read through.
[06:50:28] syndikate: Oh, I have never worked on it so pretty un-informed on these
[06:51:16] syndikate: havenwood, Thanks! I have been on rails for sometime but haven't written much tools in Ruby. Recently started looking into gems and seeing if I can get hands into more ruby stuff
[06:52:39] syndikate: havenwood, Any pointers, suggestions, mentoring on stuff to begin contribution are all welcome :D socketry/falcon is something that I wanted to look into for a while now. Fibers as well.
[06:56:14] syndikate: havenwood, Oh didn't know that. Sure, I will probably request for clarification for things I don't understand :D
[07:01:20] syndikate: Oh okay, let me check them. Might need some time :D
[07:02:58] syndikate: Yeah I started picking up enumerators a while ago
[07:03:35] syndikate: But problem is that there is not much scope to write much stuff with all those in my current work as mostly it's the usual rails related stuff
[07:07:56] syndikate: Exactly, after a while the charm is lost - well for someone who wants to do something new most of the time. It's not that the current application is best ever but when you working with business requirements and timelines out of scope work is always in the backlogs. You do what's required and that's mostly straightforward stuff. So, I thought looking into more of ruby can help me take something back.
[07:08:25] syndikate: Oh alright, that's quite a lot of stuff to bookmark now :D
[07:08:47] syndikate: Thanks havenwood !
[07:09:21] syndikate: I am trying to see how I can (If I can) improve the tooling and use it to it's utmost potential in my project
[07:09:35] syndikate: mostly the ruby gems and all


[13:43:02] syndikate: How long does y'all monolith app's test suite's take to complete? Is something near to an hour normal thing?
[13:51:12] syndikate: tbuehlmann, do they have any writeup on how they have parallelized it? (I know it's coming in rails 6 and also know about parallel_tests), just curious
[13:51:21] syndikate: Also, what is it that you mean by testing preferences?
[13:52:11] syndikate: In such cases what do we do when we want a pipeline to be completed before having a PR merged? We check for the "green tick" before merging a branch and I was trying to see how I can bring the spec timings down
[14:05:00] syndikate: Looks like I scared you away
[14:09:08] syndikate: tbuehlmann, alright. I have got all those in the app now.
[14:09:22] syndikate: fox_mulder_cp, how do you segregate the relevant tests?
[14:13:53] syndikate: I was thinking along the lines of an automated test. What I had in mind was when a person submits a PR, run a subset of tests and not the whole suite. Trying to figure that "subset" is what am trying to do for now.
[14:13:58] syndikate: Not sure if I made sense
[14:46:52] syndikate: tbuehlmann, yeah that's the thing. It could break something else.


[12:35:50] syndikate: Anybody used parallel_tests gem with database_cleaner to run capybara tests? I am running into issue in my pipeline where it gets stuck and not exiting eventually pipeline has to time out
[12:35:57] syndikate: Not sure where to start debugging from


[06:05:31] syndikate: I see this method #with_responders in a codebase I am working on but I can't figure where it is coming from. It's being called on ActiveRecord collection object
[06:22:03] syndikate: TLDR; Need info on `with_responders` method
[06:25:00] syndikate: Correction - it's a relation object
[06:34:55] syndikate: My bad everyone, feel so stupid right now. There was a concern written for some other context but used the same naming
[06:35:22] syndikate: Grep failed and I didn't notice
[06:35:27] syndikate: On local code


[06:19:56] syndikate: IGnorAND, yes, I am trying to understand more innards of the gem. Still looking into it.


[18:49:33] syndikate: I am trying to understand the new Zeitwerk Gem and how it fixes the current issue. Have been going through the code and current Auto Load issues, but failing to understand. Can anybody give me few pointers here please?


[05:13:55] syndikate:
[05:14:05] syndikate: There is a typo here -> s/had/add
[05:14:11] syndikate: It's already fixed in master
[05:14:21] syndikate: But not reflected here


[04:43:10] syndikate: Is it advised to use Pundit rules in views? I have this page in which a partial has to be rendered only if the user has a certain role.
[04:48:10] syndikate: Scratch that^


[04:22:28] syndikate: fox_mulder_cp, Oh okay.


[11:20:53] syndikate: Do we use son serialisers for non model object? My API has to return a value( integer ) and I can't figure how I would create a serialiser for it. Should I be using jsonapi then I can't create it for an object with no model associated
[11:21:25] syndikate: Just creating a placeholder model object seems overkill and also it won't have a unique id


[05:41:59] syndikate: Could it be something related to ES6?