syndikate

Activity Graph

Page 1 of 5 | Next »

2019-05-21

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

2019-05-18

[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

2019-05-17

[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

2019-05-16

[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

2019-05-14

[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 -> https://dpaste.de/7G00
[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 - https://dpaste.de/AyQZ#L1
[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.

2019-05-13

[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 enum_with_index.map(&:process_all) 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

2019-05-01

[10:04:38] syndikate: Can help me understand what I am missing in this simple unix program?
[10:04:39] syndikate: https://paste.ee/p/gUImo
[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

2019-04-25

[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

2019-04-22

[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

2019-04-13

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

2019-04-11

[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- https://hastebin.com/ojowutajeh.coffeescript
[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?

2019-04-09

[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: https://hastebin.com/zelivamaxi.rb
[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

2019-04-04

[03:26:36] syndikate: Hey, can someone help me understand this further? https://elixirschool.com/en/lessons/basics/functions/#default-arguments
[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-

2019-03-22

[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 https://hastebin.com/weqidujepi.rb
[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 https://hastebin.com/ifaqucewis.rb
[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 -> https://hastebin.com/ifaqucewis.rb
[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

2019-03-17

[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

2019-03-15

[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 http://dpaste.com/2Q92GVY

2019-03-13

[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

2019-03-09

[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

2019-03-04

[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, http://dpaste.com/2BX3F67
[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` ?

2019-02-28

[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

2019-02-23

[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

2019-02-22

[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

2019-02-12

[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.

2019-02-11

[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

2019-02-06

[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

2019-02-05

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

2019-02-04

[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?

2019-01-19

[05:13:55] syndikate: https://guides.rubyonrails.org/active_support_instrumentation.html#send-data-action-controller
[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

2019-01-02

[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^

2018-12-27

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

2018-12-26

[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

2018-12-24

[05:41:40] syndikate: I have some javascript code that dynamically loads page content using fetch, this code fails in my build pipeline but passes in local. Where do I even start debugging it? I have no clue
[05:41:59] syndikate: Could it be something related to ES6?

2018-12-13

[17:25:01] syndikate: Ping timeout: 252 seconds
[17:26:19] syndikate: has joined #RubyOnRails
[17:26:19] syndikate: has joined #ruby

2018-12-12

[17:42:00] syndikate: Not sure what caused this - I used draper gem, created a decorator which has a field being called itself inside a method with same name essentially going into an infinite loop. So, the app got stuck and I killed it. This somehow broke my mysql data. The table name got rewritten and I am not sure where to start debugging for this. Although, I could replace my dev data and go ahead but I want to inv
[17:42:05] syndikate: estigate what happened.

2018-12-08

[00:18:40] syndikate: Ping timeout: 240 seconds
[00:19:13] syndikate: has joined #RubyOnRails
[00:19:13] syndikate: has joined #ruby

2018-12-02

[14:05:18] syndikate: Ping timeout: 264 seconds
[14:05:33] syndikate: has joined #RubyOnRails
[14:05:33] syndikate: has joined #ruby

2018-11-17

[06:05:25] syndikate: Does this PR means that there won't be anymore coffee script left in Rails? https://github.com/rails/rails/pull/34177
[06:06:29] syndikate: Think I just misread that

2018-11-09

[15:01:36] syndikate: Trying to do a redirect_to to the same controller's index action after a PUT request. The PUT request is made using javascript fetch. But unfortunately render does not happen - rails log shows the page being sent with status 200 but at the browser only the 'being redirected' html page is recieved.
[16:11:09] syndikate: crankharder, https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
[16:11:18] syndikate: But I guess you are right, that's where I must be missing it
[16:13:25] syndikate: has left #RubyOnRails: ("Leaving")
[16:15:54] syndikate: has joined #RubyOnRails
[16:16:13] syndikate: Exited by mistake, so if crankharder you said anything I missed it :/
[17:22:56] syndikate: thasnk crankharder

2018-11-06

[18:53:22] syndikate: Hey, can someone help me understand why this happens? https://github.com/rails/rails/blob/1353610ff2ab4d16d022d5c31d5b4e5d908e05a8/actionpack/lib/action_controller/metal/redirecting.rb#L38

2018-11-05

[04:20:34] syndikate: Anybody upgraded to rubicon 0.6 on a rails project and faced any issues?

2018-11-01

[06:53:17] syndikate: If time cop is not used in `before` block would the time freezing leak out globally to all specs?
[07:03:44] syndikate: Or rather I am looking for a strong argument on why time cop should be in `before` blcok

2018-10-17

[06:54:57] syndikate: When sorting with ransack if the field values are all same ransack does not sort the entire table - how does ransack manage to do that?
[06:56:00] syndikate: My assumption was this - even if the specific column values are all same, the table should get sorted desc and ask alternatively. Is it because the SQL query returns the rows without difference?

2018-09-05

[08:34:18] syndikate: Is there any naming convention for boolean field?

2018-09-04

2018-09-03

[15:42:49] syndikate: Are you trying to do array1 - array2?

2018-08-30

[03:55:54] syndikate: Is module or class preferred for creating namespaces models?
[04:02:15] syndikate: Alright thanks baweaver, anywhere I can read why that's preferred?
[04:07:51] syndikate: Oh okay, yeah here its' just purely namespacing purpose with not much functionality of it's own, rather than define a self.table_name_prefix
[04:12:44] syndikate: pipework, can you explain that with a gist pleasE?
[04:14:33] syndikate: Oh, okay TIL thanks pipework
[04:38:33] syndikate: baweaver, pipework another thing though - I have a table_name_prefix for the intended tables (obviously), so as per Rails 5 convention is it okay to create a module and declare a self.table_name_prefix method in it?
[04:39:27] syndikate: I tried, it works. I wanted to know if it's a preferred approach to have such a method in module
[04:51:07] syndikate: baweaver, pipework This is the kind of simplified setup I have now - https://hastebin.com/osixisafuk.rb
[04:52:25] syndikate: There is no table for library as such but book and division
[04:57:22] syndikate: Sorry if any confusions were caused, I thank you guys' help. Just wanted to understand if I have any convention to follow

2018-08-21

[20:19:28] syndikate: *.net *.split
[20:21:02] syndikate: has joined #ruby
[20:21:02] syndikate: has joined #RubyOnRails

2018-08-14

[00:57:12] syndikate: *.net *.split
[01:04:29] syndikate: has joined #RubyOnRails
[01:04:29] syndikate: has joined #ruby
[08:17:11] syndikate: Can someone help me figure how to add filter in 'administrate' gem?

2018-08-08

[23:02:49] syndikate: *.net *.split
[23:03:11] syndikate: has joined #ruby
[23:03:11] syndikate: has joined #RubyOnRails

2018-08-02

[09:48:02] syndikate: Andr3as, can you elaborate please?
[09:53:28] syndikate: Or you could add a class to the field if the returned object has no error for it?
[09:53:53] syndikate: Which I believe could be a repetitive task

2018-07-27

[04:07:11] syndikate: tycoon177, as in if I use `probations` it will be come `...probations_path` but if I use `probation` it will become `...probation_index_path`

2018-07-26

[18:54:49] syndikate: tycoon177, okay. Although I thought even if I don't give plural names, only the naming schema would be screwed, apparently the whole path is changed