hahuang65

Activity Graph

Page 1 of 24 | Next »

2019-01-11

[09:18:04] hahuang65: Ping timeout: 264 seconds
[09:20:54] hahuang65: has joined #RubyOnRails
[09:20:54] hahuang65: has joined #ruby
[09:25:40] hahuang65: Ping timeout: 244 seconds
[09:27:40] hahuang65: has joined #ruby
[09:27:41] hahuang65: has joined #RubyOnRails

2019-01-10

[08:29:37] hahuang65: Quit: ZNC 1.7.1 - https://znc.in
[08:35:54] hahuang65: has joined #RubyOnRails
[08:35:54] hahuang65: has joined #ruby
[20:56:37] hahuang65: what's the proper way to stream a text file line by line from s3
[20:58:08] hahuang65: I guess I have access to the StringIO object that is the body of the file...

2019-01-06

[21:44:17] hahuang65: Ping timeout: 268 seconds

2018-12-30

[21:54:36] hahuang65: has joined #RubyOnRails
[21:54:36] hahuang65: has joined #ruby

2018-12-20

[21:29:09] hahuang65: Ping timeout: 268 seconds

2018-12-01

[11:34:37] hahuang65: Read error: Connection reset by peer
[11:34:52] hahuang65: has joined #RubyOnRails
[11:34:52] hahuang65: has joined #ruby
[14:58:44] hahuang65: Read error: Connection reset by peer
[14:59:03] hahuang65: has joined #RubyOnRails
[14:59:03] hahuang65: has joined #ruby

2018-11-29

[11:32:57] hahuang65: has joined #RubyOnRails
[11:32:57] hahuang65: has joined #ruby

2018-11-26

[03:17:10] hahuang65: Ping timeout: 268 seconds

2018-11-25

[22:38:58] hahuang65: has joined #ruby
[22:38:59] hahuang65: has joined #RubyOnRails

2018-11-16

[16:59:12] hahuang65: Ping timeout: 272 seconds

2018-11-03

[01:18:35] hahuang65: Ping timeout: 276 seconds

2018-10-20

[03:20:23] hahuang65: Ping timeout: 276 seconds

2018-10-06

[09:23:04] hahuang65: Ping timeout: 240 seconds

2018-09-04

[05:03:35] hahuang65: has joined #RubyOnRails
[05:03:35] hahuang65: has joined #ruby

2018-08-29

[07:40:49] hahuang65: Ping timeout: 244 seconds

2018-08-22

[02:00:08] hahuang65: has joined #RubyOnRails
[02:00:08] hahuang65: has joined #ruby
[08:56:15] hahuang65: Read error: Connection reset by peer
[08:58:12] hahuang65: has joined #RubyOnRails
[08:58:12] hahuang65: has joined #ruby

2018-08-21

[07:56:12] hahuang65: Ping timeout: 265 seconds

2018-08-20

[07:08:15] hahuang65: Read error: Connection reset by peer
[07:11:36] hahuang65: has joined #RubyOnRails
[07:11:36] hahuang65: has joined #ruby

2018-08-17

[02:42:16] hahuang65: any one around I can ask about an algorithms problem I'm working on?
[02:50:34] hahuang65: sevenseacat: i've got this so far... https://gist.github.com/hahuang65/749a666b70dc69308c5c1018b47cea0f it doesn't work for obvious reasons. it recurses itself into eternity
[03:04:42] hahuang65: sevenseacat: yeah, I need some place to store the ones that have been processed.
[03:05:14] hahuang65: i either need to store the siblings that are processed, or some clever way to make sure that they can't possibly be processed twice.
[03:10:56] hahuang65: sevenseacat: I'm not entirely sure what would be a suitable store for this
[03:14:32] hahuang65: sevenseacat: i understand the concept, I just mean, in the rails ecosystem, I'm not sure where to store it. Currently I'm thinking a Redis list keyed off the subject's ID
[03:15:01] hahuang65: the list of "items seen before this"
[03:17:59] hahuang65: sevenseacat: i'm not sure how to do that from an instance of the object

2018-08-16

[22:48:50] hahuang65: anyone good with geneaological terms?
[22:49:07] hahuang65: I'm looking for the term that represents nodes that are of the same generation as a subject node.
[22:49:22] hahuang65: I know ancestors are anything above the subject node, and descendants are anything below the subject node
[22:49:29] hahuang65: looking for the term to represent siblings and cousins
[22:59:18] hahuang65: it doesn't include cousins

2018-08-14

[01:25:33] hahuang65: Remote host closed the connection
[03:08:45] hahuang65: has joined #ruby
[03:08:46] hahuang65: has joined #RubyOnRails

2018-08-09

[00:30:18] hahuang65: Radar: sorry I had to step away to cook too, thanks for picking it back up
[00:31:28] hahuang65: Radar: some sirloin steak, corn, and scallops
[00:32:48] hahuang65: Radar: I'd invite you over... but IIRC you live in AUS or something.
[00:42:18] hahuang65: baweaver: lol
[00:56:42] hahuang65: haha lemur you're silly.
[03:35:47] hahuang65: sevenseacat: how did you come up with your handle
[03:36:56] hahuang65: interesting
[20:56:48] hahuang65: Radar: what you been working on these days?

2018-08-08

[16:58:53] hahuang65: hmmm why's that sad?
[18:58:40] hahuang65: Inside: getting rid of old cruft is always a good thing IMO
[18:59:10] hahuang65: Inside: if you've got your code in version control, then delete them
[22:32:41] hahuang65: hmm is there a way, with Enumerator, to iterate on chunks of the set?
[22:32:59] hahuang65: i.e. instead of Enumerator.each do |item|, Enumerator.each(100) do |items|
[22:41:52] hahuang65: if I have a hash, and I separate them out with `hash.keys` and `hash.values`, am I guaranteed that the index of the values matches the index of the keys?
[22:47:42] hahuang65: Radar: lol thanks
[22:47:52] hahuang65: Radar: dammit.
[22:48:39] hahuang65: Radar: I started working with just .each and grouping them by hand. then I saw your reply lol
[22:53:36] hahuang65: Radar: oddly, I was looking thru the Ruby Enumerable docs, and I didn't see each_slice. Maybe my eyes are broken.
[23:01:02] hahuang65: creature: what's params[:bar] look like?
[23:01:27] hahuang65: havenwood: thanks for the detailed explanation! really appreciate it
[23:03:44] hahuang65: creature: can you show us an example of params[:bar]?
[23:07:39] hahuang65: zenspider: I'm not anymore, but I'm doing something similar now... something like this https://gist.github.com/hahuang65/a194c63728b9a4624ca55966706ba4e2
[23:08:12] hahuang65: creature: it's hard to say without seeing the details. I would have expected JSON.parse to work.

2018-08-03

[22:22:54] hahuang65: Slogger: as far as I know, you just need to pass in the :id attribute
[22:23:34] hahuang65: don't forget to whitelist :id in strong params

2018-08-02

[10:31:34] hahuang65: Ping timeout: 264 seconds
[10:37:10] hahuang65: has joined #RubyOnRails
[10:37:10] hahuang65: has joined #ruby

2018-08-01

[23:15:05] hahuang65: what might be some reasons that mail is being sent and received in our system, but 1 particular mail never reaches any inboxes despite the code giving no indication that it's failing to send?

2018-07-31

[19:54:28] hahuang65: anyone know if I can use Postgres' COPY in a Rails migration?
[19:54:51] hahuang65: I seem to get a syntax on the line after COPY

2018-07-16

[19:21:41] hahuang65: Inside: BPM?

2018-07-12

[03:16:45] hahuang65: SteenJobs: I'll take a stab at it... from the client side, it may be confusing, or difficult to distinguish what is a property and what is a totally separate resource?
[03:17:39] hahuang65: from the backend side (and to a degree, the client side), it means having to attach relational objects onto every response, even if it's not useful there.
[03:18:07] hahuang65: you're obviously not forced to do that, but making that an optional addon that's not visibly a "separate resource" to the client may make it difficult to grok
[03:38:59] hahuang65: SteenJobs: I mean if it's not publicly consumed, then really all of this has no bearing. If it IS publicly consumed, I would just say, prepare for people to make comments.
[03:39:56] hahuang65: SteenJobs: what you're saying on the backend-side is correct. It's not "technically difficult", but think about the case when you don't want to attach "comments". what do you do? take out the property? leave it as an empty array? set it to a specific value like :not_loaded?
[03:40:10] hahuang65: if you nest it under `relationships` you can easily leave the entire property out
[03:42:07] hahuang65: because as a client, I can treat everything under `relationships` as a possible no-show. That's not true if it appears as just another property on the main object. I'd have to write custom code. It's just the benefit of encapsulating it under another key.
[03:43:01] hahuang65: if everything under relationships follows a convention like {object_type: MyObject, id: id}, then you can write a parser that goes through everything in `relationships`. not true if it's just another top-level attribute on the main object.
[03:44:00] hahuang65: SteenJobs: lemme see if I can gin up an example to illustrate what I'm saying
[03:52:16] hahuang65: SteenJobs: https://gist.github.com/hahuang65/dfbafcdb06bcfd08755de13d5a222e40
[03:52:42] hahuang65: idk if that kind of explains it more
[03:54:02] hahuang65: I think in the case of including the relation directly on the main object, you have a lot more explaining in docs to do. When are there no related objects, when are they just not loaded, and which keys refer to relationships rather than just attributes
[03:54:27] hahuang65: if you nest it under "relationships" all of that goes away. it's understood that if it's not there, it's not loaded. if it's there but empty, it's empty.
[03:54:39] hahuang65: and the fact that it's under "relationships" makes it a related object, not an attribute
[03:55:04] hahuang65: sure you can distinguish all of that by inspecting the JSON structure, which is easy for a person, but more difficult to read when you code it up
[03:56:40] hahuang65: SteenJobs: that's my 2 cents on this. The more time I spend coding, the more I believe in the benefit of being explicit for everything.
[04:01:49] hahuang65: SteenJobs: in the end, if everyone who is affected by this comes to the same understanding, I really don't think it matters. That's how specs are developed anyway, a group of people agreeing on something that makes sense to them.
[04:02:29] hahuang65: I've got to run, but good luck and hope you come to a conclusion that you're happy with SteenJobs :)

2018-07-11

[20:46:06] hahuang65: masterasia: that one is confusing because it's the phrasing of `1.week.ago`
[20:46:41] hahuang65: keep in mind that `1.week.ago` is a point in time that you're comparing against
[20:48:04] hahuang65: when you read it, it reads "record created_at is greater than 1 week ago", but it really means "record created_at greater than hh:mm where hh:mm is 1 week ago"
[20:50:07] hahuang65: it actually might be better to write it a little less concisely in this case
[20:50:24] hahuang65: record.created_at > (Date.today - 1.week)
[22:42:58] hahuang65: blackcross: if you want to call it in a template, you should put it in a helper file.
[22:43:33] hahuang65: blackcross: see http://api.rubyonrails.org/classes/ActionController/Helpers.html

2018-07-10

[03:47:51] hahuang65: chkhanch: can you elaborate on what you mean?

2018-07-09

[21:09:44] hahuang65: anyone have any suggestions for this scenario: I update an object and fire off an ActionMailer.deliver_later. That deserializes whatevers in Sidekiq/Redis too fast, and fetches the company from the DB too fast and doesn't have the updates I just made

2018-06-20

[17:22:44] hahuang65: has joined #RubyOnRails
[17:22:44] hahuang65: has joined #ruby

2018-06-13

[17:29:42] hahuang65: Ping timeout: 256 seconds

2018-06-06

[17:31:38] hahuang65: has joined #ruby
[17:31:39] hahuang65: has joined #RubyOnRails
[20:23:46] hahuang65: what would be the best way to define a set of callbacks that I want shared between multiple models?
[20:24:18] hahuang65: in this case, I'm trying to define a set of callbacks that publishes a message with information about the object in question when it's created, updated, and destroyed.
[20:28:38] hahuang65: lupine: great, thanks for the tip
[21:44:56] hahuang65: jawatio: do you have a link to the project/
[21:47:44] hahuang65: can you paste your `routes.rb` file as well as one of the controllers?
[21:56:56] hahuang65: wait, you're not saying it's requiring specifically 'entity'
[21:57:23] hahuang65: you're saying, that it is requiring an 'entity', which for this controller, would be 'article'... am I correct?
[21:57:38] hahuang65: yeah, so you are right
[21:57:54] hahuang65: you would remove the `require` part for strong params.
[21:58:51] hahuang65: jawatio: make sure you understand the implications of not using strong params.
[22:04:05] hahuang65: jawatio: just a note from experience... sometimes it's nice to have to be more explicit when having to deal with an API :)
[22:06:11] hahuang65: jawatio: yup, but sometimes, you'll want to add on extra params that have nothing to do with articles
[22:08:06] hahuang65: what about globally scoped things like, API/session IDs, analytics tracking IDs, requestIDs for progress look-up etc.
[22:09:49] hahuang65: or, maybe a more reasonable situation... if you allow `accepts_nested_attributes_for`

2018-05-30

[17:36:05] hahuang65: Ping timeout: 245 seconds

2018-05-29

[02:46:55] hahuang65: *.net *.split
[02:47:46] hahuang65: has joined #RubyOnRails
[02:47:59] hahuang65: has joined #ruby
[02:50:04] hahuang65: *.net *.split
[02:50:33] hahuang65: has joined #RubyOnRails
[02:50:33] hahuang65: has joined #ruby

2018-05-23

[17:23:36] hahuang65: has joined #RubyOnRails
[17:23:36] hahuang65: has joined #ruby
[17:32:24] hahuang65: Quit: ZNC 1.7.0 - https://znc.in
[17:36:09] hahuang65: has joined #RubyOnRails
[17:36:09] hahuang65: has joined #ruby

2018-05-22

[17:38:32] hahuang65: Quit: ZNC 1.6.6 - http://znc.in

2018-05-17

[07:49:05] hahuang65: Read error: Connection reset by peer
[07:51:41] hahuang65: has joined #RubyOnRails
[07:51:41] hahuang65: has joined #ruby
[07:58:17] hahuang65: Ping timeout: 276 seconds
[07:58:55] hahuang65: has joined #RubyOnRails
[07:58:55] hahuang65: has joined #ruby

2018-05-14

[20:19:31] hahuang65: has joined #RubyOnRails
[20:19:51] hahuang65: is #update! a no-op if the attributes are all the same as what already exists?
[20:40:54] hahuang65: tycoon177: okay cool

2018-04-25

[12:25:43] hahuang65: *.net *.split
[12:27:18] hahuang65: has joined #ruby
[15:01:13] hahuang65: *.net *.split
[15:03:19] hahuang65: has joined #ruby

2018-04-16

[16:56:29] hahuang65: Remote host closed the connection
[17:00:38] hahuang65: has joined #ruby

2018-03-16

[07:45:22] hahuang65: Ping timeout: 246 seconds

2018-03-14

[01:51:52] hahuang65: Quit: WeeChat 2.0.1
[01:54:59] hahuang65: has joined #RubyOnRails
[01:54:59] hahuang65: has joined #ruby
[01:55:03] hahuang65: Client Quit
[01:55:41] hahuang65: has joined #ruby
[01:55:48] hahuang65: Remote host closed the connection
[01:57:25] hahuang65: has joined #ruby
[02:15:54] hahuang65: Quit: ZNC 1.6.6 - http://znc.in
[02:16:10] hahuang65: has joined #ruby

2018-03-13

[05:59:46] hahuang65: Ping timeout: 264 seconds
[06:03:05] hahuang65: has joined #ruby
[06:03:07] hahuang65: has joined #RubyOnRails
[08:43:27] hahuang65: Ping timeout: 240 seconds
[08:46:50] hahuang65: has joined #ruby
[08:47:40] hahuang65: has joined #RubyOnRails
[09:16:19] hahuang65: Ping timeout: 246 seconds
[22:07:41] hahuang65: has joined #RubyOnRails
[22:07:41] hahuang65: has joined #ruby

2018-03-12

[05:08:27] hahuang65: Ping timeout: 240 seconds
[05:19:30] hahuang65: has joined #ruby
[05:19:32] hahuang65: has joined #RubyOnRails
[06:02:14] hahuang65: Ping timeout: 260 seconds
[06:05:45] hahuang65: has joined #ruby
[06:05:47] hahuang65: has joined #RubyOnRails
[06:18:40] hahuang65: Ping timeout: 240 seconds
[06:22:40] hahuang65: has joined #ruby
[06:22:42] hahuang65: has joined #RubyOnRails
[06:31:57] hahuang65: Ping timeout: 240 seconds
[06:34:42] hahuang65: has joined #ruby
[06:34:44] hahuang65: has joined #RubyOnRails
[06:53:58] hahuang65: Ping timeout: 268 seconds
[16:53:31] hahuang65: has joined #ruby
[16:53:32] hahuang65: has joined #RubyOnRails
[17:14:27] hahuang65: Ping timeout: 240 seconds
[17:18:54] hahuang65: has joined #ruby
[17:18:56] hahuang65: has joined #RubyOnRails
[17:49:23] hahuang65: Quit: WeeChat 2.0.1
[17:54:11] hahuang65: has joined #RubyOnRails
[17:54:11] hahuang65: has joined #ruby

2018-03-11

[22:33:12] hahuang65: Quit: WeeChat 2.0.1
[22:35:44] hahuang65: has joined #RubyOnRails
[22:35:44] hahuang65: has joined #ruby
[22:35:53] hahuang65: Client Quit
[22:37:19] hahuang65: has joined #RubyOnRails
[22:37:19] hahuang65: has joined #ruby
[22:37:54] hahuang65: Client Quit
[22:39:14] hahuang65: has joined #RubyOnRails
[22:39:14] hahuang65: has joined #ruby
[22:40:23] hahuang65: Client Quit
[22:42:53] hahuang65: has joined #RubyOnRails
[22:42:53] hahuang65: has joined #ruby
[23:33:28] hahuang65: Quit: WeeChat 2.0.1
[23:33:48] hahuang65: has joined #RubyOnRails
[23:33:48] hahuang65: has joined #ruby
[23:35:06] hahuang65: Client Quit
[23:35:41] hahuang65: has joined #RubyOnRails
[23:35:41] hahuang65: has joined #ruby
[23:43:59] hahuang65: Quit: WeeChat 2.0.1
[23:44:18] hahuang65: has joined #RubyOnRails
[23:44:18] hahuang65: has joined #ruby
[23:56:30] hahuang65: Quit: WeeChat 2.0.1
[23:59:08] hahuang65: has joined #RubyOnRails
[23:59:08] hahuang65: has joined #ruby

2018-03-10

[02:53:01] hahuang65: Quit: WeeChat 2.0.1
[02:53:19] hahuang65: has joined #RubyOnRails
[02:53:19] hahuang65: has joined #ruby

2018-03-09

[00:35:57] hahuang65: Quit: WeeChat 2.0.1
[00:38:27] hahuang65: has joined #RubyOnRails
[00:38:27] hahuang65: has joined #ruby

2018-03-07

[23:18:12] hahuang65: Client Quit
[23:19:23] hahuang65: has joined #RubyOnRails
[23:19:23] hahuang65: has joined #ruby