michael_mbp

Activity Graph

Page 1 of 41 | Next »

2019-06-26

[17:53:45] michael_mbp: Ping timeout: 258 seconds
[17:53:53] michael_mbp: has joined #RubyOnRails
[17:56:53] michael_mbp: has joined #elixir-lang

2019-05-23

[07:28:01] michael_mbp: Ping timeout: 248 seconds
[07:30:59] michael_mbp: has joined #RubyOnRails
[07:31:59] michael_mbp: has joined #ruby
[07:33:00] michael_mbp: has joined #elixir-lang

2019-05-17

[08:10:39] michael_mbp: Ping timeout: 244 seconds
[08:19:56] michael_mbp: has joined #elixir-lang
[08:20:50] michael_mbp: has joined #ruby
[08:24:21] michael_mbp: has joined #RubyOnRails
[08:45:47] michael_mbp: Ping timeout: 244 seconds
[08:48:05] michael_mbp: has joined #ruby
[08:50:30] michael_mbp: has joined #RubyOnRails
[08:51:30] michael_mbp: has joined #elixir-lang

2019-03-19

[22:02:21] michael_mbp: I used to be a regular here; semi "retired" now, but thinking of getting back into contract work (remotely)

2019-03-12

[06:07:24] michael_mbp: Ping timeout: 246 seconds
[06:15:38] michael_mbp: has joined #ruby
[06:19:08] michael_mbp: has joined #RubyOnRails
[06:20:38] michael_mbp: has joined #elixir-lang

2019-03-05

[12:56:28] michael_mbp: Ping timeout: 246 seconds
[13:04:58] michael_mbp: has joined #RubyOnRails
[13:05:28] michael_mbp: has joined #ruby
[13:07:28] michael_mbp: has joined #elixir-lang

2019-02-01

[01:19:52] michael_mbp: Ping timeout: 250 seconds
[01:25:22] michael_mbp: has joined #RubyOnRails
[01:25:52] michael_mbp: has joined #ruby

2019-01-14

[21:11:38] michael_mbp: Ping timeout: 268 seconds
[21:15:00] michael_mbp: has joined #RubyOnRails
[21:16:30] michael_mbp: has joined #ruby

2019-01-08

[13:21:10] michael_mbp: Ping timeout: 272 seconds
[13:31:36] michael_mbp: has joined #ruby
[13:32:06] michael_mbp: has joined #RubyOnRails

2018-10-19

[02:30:43] michael_mbp: Ping timeout: 246 seconds
[02:33:42] michael_mbp: has joined #ruby
[02:35:42] michael_mbp: has joined #RubyOnRails

2018-10-09

[11:01:26] michael_mbp: Quit: Checkout my channel at http://www.youtube.com/bsodmike
[11:10:59] michael_mbp: has joined #ruby
[11:11:59] michael_mbp: has joined #RubyOnRails

2018-08-29

[02:42:51] michael_mbp: *.net *.split
[02:58:58] michael_mbp: has joined #RubyOnRails
[03:06:59] michael_mbp: has joined #ruby

2018-07-20

[00:07:18] michael_mbp: *.net *.split
[00:15:28] michael_mbp: has joined #RubyOnRails
[00:15:49] michael_mbp: has joined #ruby

2018-06-01

[21:00:04] michael_mbp: Ping timeout: 268 seconds
[21:12:22] michael_mbp: has joined #RubyOnRails
[21:15:22] michael_mbp: has joined #ruby

2018-05-29

[02:47:20] michael_mbp: *.net *.split
[02:47:49] michael_mbp: has joined #RubyOnRails
[02:48:13] michael_mbp: has joined #ruby

2018-04-25

[12:26:03] michael_mbp: *.net *.split
[12:27:22] michael_mbp: has joined #ruby
[12:27:34] michael_mbp: has joined #RubyOnRails
[15:01:34] michael_mbp: *.net *.split
[15:03:04] michael_mbp: has joined #RubyOnRails
[15:03:15] michael_mbp: has joined #ruby

2018-04-05

[00:51:15] michael_mbp: *.net *.split
[00:54:48] michael_mbp: has joined #RubyOnRails
[00:57:18] michael_mbp: has joined #ruby

2018-02-06

[02:35:35] michael_mbp: Ping timeout: 240 seconds
[02:43:39] michael_mbp: has joined #RubyOnRails
[02:50:09] michael_mbp: has joined #ruby

2017-12-31

[15:38:28] michael_mbp: Ping timeout: 240 seconds
[15:45:30] michael_mbp: has joined #ruby
[15:47:30] michael_mbp: has joined #RubyOnRails
[15:53:01] michael_mbp: has joined ##new2ruby

2017-12-26

[16:01:13] michael_mbp: Ping timeout: 250 seconds
[16:06:35] michael_mbp: has joined #RubyOnRails
[16:08:30] michael_mbp: has joined ##new2ruby
[16:09:00] michael_mbp: has joined #ruby

2017-12-06

[20:31:15] michael_mbp: *.net *.split
[20:47:59] michael_mbp: has joined ##new2ruby
[20:48:03] michael_mbp: has joined #RubyOnRails
[20:48:05] michael_mbp: has joined #ruby
[20:48:33] michael_mbp: Max SendQ exceeded
[20:51:16] michael_mbp: has joined #RubyOnRails
[20:54:16] michael_mbp: has joined ##new2ruby
[20:56:46] michael_mbp: has joined #ruby

2017-12-01

[02:20:11] michael_mbp: Ping timeout: 248 seconds
[02:28:25] michael_mbp: has joined ##new2ruby
[02:28:29] michael_mbp: has joined #ruby

2017-11-17

[20:45:19] michael_mbp: Ping timeout: 248 seconds
[20:52:07] michael_mbp: has joined #ruby
[20:57:37] michael_mbp: has joined ##new2ruby
[20:59:37] michael_mbp: has joined #RubyOnRails

2017-11-16

[01:28:12] michael_mbp: has joined ##new2ruby
[01:28:19] michael_mbp: has joined #ruby
[01:28:20] michael_mbp: has joined #RubyOnRails
[01:28:26] michael_mbp: Max SendQ exceeded
[01:33:08] michael_mbp: has joined #ruby
[01:36:08] michael_mbp: has joined #RubyOnRails
[01:38:08] michael_mbp: has joined ##new2ruby

2017-09-19

[02:02:14] michael_mbp: hey Radar o/ how are you mate?
[02:03:23] michael_mbp: Got a strange question - how can I instantiate an object, technically an AR-backed model, from a hash; however, I do not want any DB call being made? So far I've bee doing `User.new(hsh)` as a quick example, but that is essentially a `new_record`.
[03:27:02] michael_mbp: how can I instantiate an object, technically an AR-backed model, from a hash; however, I do not want any DB call being made? So far I've bee doing `User.new(hsh)` as a quick example, but that is essentially a `new_record`.
[03:29:46] michael_mbp: well matthewd to give you some context. An existing AR instance is cached in Redis; I'm working on fixing the deserialisation approach.
[03:30:05] michael_mbp: caching is done to reduce calls to the DB
[03:52:44] michael_mbp: matthewd: well, it has already shown huge improvements. The way I've set it up is that logic is stuffed into procs; if a matching cache key doesn't exist in the configured Redis DB, the proc is evaluated and the result is persisted at the respective key. There are jobs also that run to 'prime' the cache etc. As for model syncing, yes, there are AR hooks to call various cache busting strategies
[03:53:45] michael_mbp: matthewd: agreed, there are other dangers due to the lack of mutexes on the Redis keys; i.e. a job could potentially wipe/mutate contents of a key, but I've thrown safeguards in.
[03:55:40] michael_mbp: Radar: project I'm on uses https://github.com/rails-api/active_model_serializers heavily, and that's a pretty horrid gem. In a mature app, when lots of models are serialised (and relations are serialised) you find a terrible cascading effect, and repeated DB calls for essentially the same data. Admittedly, the caching approach is a bandage on top of this.
[03:57:07] michael_mbp: matthewd: before the caching approach, loading a very dynamic landing page would take 2-3 minutes on a m4.xlarge EC2 isntance. with the caching, it's down to 14-15secs.
[03:57:30] michael_mbp: matthewd: that's the trouble, it's not just 1 DB call, it's a crap-load.
[03:57:52] michael_mbp: just a single load of the landing page that I referred to, will generate anywhere close to 200-300 keys in redis
[03:57:57] michael_mbp: (all unique).
[03:58:30] michael_mbp: and that's unique by currently signed in user.
[03:59:14] michael_mbp: your point about marshalling. that's where I've taken a wrong turn.
[03:59:19] michael_mbp: I've serialised to JSON.
[04:00:08] michael_mbp: matthewd: Marshal.dump/load eh?
[04:03:05] michael_mbp: matthewd: aye, also Marshal.load(foo).new_record? is false, which is what I'm after.
[04:04:00] michael_mbp: well sort-of; it's actually caching of very expensive method calls in the controller-chain.

2017-09-18

2017-09-15

[12:19:32] michael_mbp: sounds like JSON.parse?
[12:20:39] michael_mbp: sajinmp: are you using Hash#to_json doesn't work?
[12:23:00] michael_mbp: sounds like a 3rd party API issue. You should be able to send Hash#to_json to that API without any issues.
[12:29:12] michael_mbp: sajinmp: LOL no
[12:29:26] michael_mbp: Ruby/Rails sends JSON.
[12:30:16] michael_mbp: sajinmp: there's nothing wrong with that
[12:30:30] michael_mbp: You're using Ruby, so it parses to Ruby.
[12:33:09] michael_mbp: work backwards from Postman
[12:33:25] michael_mbp: at least you have that as a base line.
[12:33:54] michael_mbp: how are you 'sending' it in Ruby?
[23:11:29] michael_mbp: I've cached a record in redis (by hand) and am performing a deserialisation, also by hand. Right now, I'm returning the model by doing Model.new(hash); where the hash is the deserialised info.
[23:12:17] michael_mbp: How can I make that PORO (Model) be the same as the model that one would fetch by doing Model.find() ?
[23:12:26] michael_mbp: i.e. without making a DB call.

2017-09-07

[19:27:12] michael_mbp: hi all, what do you call the output of a proc
[19:29:03] michael_mbp: proc block invocation?

2017-09-06

[20:48:51] michael_mbp: Do singletons support class vars?
[20:49:16] michael_mbp: matthewd: most likely needed to do a native compile.
[21:00:36] michael_mbp: matthewd: aye
[21:00:47] michael_mbp: especially since I'm working with redis and workers.

2017-08-25

[01:11:26] michael_mbp: Anyone interesting in pondering a strange resque/redis question?
[01:12:34] michael_mbp: I'm running a couple in a Docker swarm - thoughts on how to kill the workers gracefully, i.e do I need to send TERM or SIGQUIT to the actual resque process?
[01:13:12] michael_mbp: I could ps aux grep for those PIDs, but then the docker swarm would replace them with a new container.

2017-08-24

[20:39:05] michael_mbp: hi all could someone let me know where in the FormHelpers is a div with class form-group added?
[20:39:13] michael_mbp: I tried searching Rails source and just couldn't find any reference.
[20:39:37] michael_mbp: Any text_field, password_field are wrapped in a div.form-group

2017-08-09

[08:47:18] michael_mbp: *.net *.split
[09:31:53] michael_mbp: has joined ##new2ruby
[09:33:47] michael_mbp: has joined #RubyOnRails
[09:36:18] michael_mbp: has joined #ruby

2017-08-04

[06:57:29] michael_mbp: I'm looking for advice on managing Unicorn workers, especially in terms of running a large number.
[06:58:14] michael_mbp: Reason being, on a 32GB RAM compute instance (for example), easily 80 workers if not more could be run (using only ~18GB of RAM, so there's a lot more headroom).
[07:00:30] michael_mbp: However, this translates to 80x Postgres connections. This absolutely hammers the DB.
[15:07:31] michael_mbp: That's a good point Pro777. That 'organisation' (or convention over configuration nature) of Rails also _generally_ makes it easier for new comers to a project to easily re-familiarise themselves with a code-base they've never seen before, well usually.
[15:08:07] michael_mbp: ^^ only depends on how far a team sticks to the 'usual Rails' way, and there's a lot of reasons not to as well.

2017-07-31

[22:13:12] michael_mbp: hey all - I'm trying to trace AR (DB) calls in a controller action and correlate those calls to actual code. I've basically killed all before filters except 1, and am still seeing loads of DB calls.
[22:13:23] michael_mbp: so I replaced the instance var with a dummy object - AND still DB calls!
[22:13:39] michael_mbp: What's a dummy object? Well, just a PORO with fake methods.

2017-07-27

[08:39:53] michael_mbp: does anyone here use Siege (the tool that is) to get some insight into performance metrics?
[08:40:13] michael_mbp: if I simulate say 40-100 concurrent users, it looks like DB bottlenecking is an issue.

2017-07-12

[00:56:35] michael_mbp: I'm looking at planning to handle concurrency at the stack level, are there any ball-park metrics one should aim for in general? I.e. should a stack _generally_ be capable of say 100 concurrent requests?
[00:56:55] michael_mbp: Looking to see if there's any case-studies on this front.
[00:57:29] michael_mbp: most stacks would have auto-scaling compute instances; the implementation I'm working on doesn't have the financial leeway for that.
[01:02:26] michael_mbp: fryguy: it's meant to be a social platform, at the moment it's pretty hard to plan for that
[01:03:05] michael_mbp: at launch though, I feel we'd need quite a few app instances spooled and ready to go behind the load-balancer.
[01:03:47] michael_mbp: Been doing some tests with siege and Passenger's performance is pretty abismal. Will switch to Unicorn/puma and benchmark.

2017-06-20

[00:17:25] michael_mbp: *.net *.split
[00:22:38] michael_mbp: has joined #RubyOnRails
[00:23:02] michael_mbp: has joined #ruby

2017-06-16

[23:26:16] michael_mbp: *.net *.split
[23:28:34] michael_mbp: has joined ##new2ruby
[23:29:35] michael_mbp: has joined #RubyOnRails
[23:34:35] michael_mbp: has joined #ruby

2017-06-02

2017-05-20

[00:18:32] michael_mbp: really odd Q - is there a destructor in Ruby objects, when being gc'd?
[00:24:33] michael_mbp: w00t ObjectSpace#define_finalizer

2017-05-18

[01:34:17] michael_mbp: Something I'm working on, I'm making calls from Ruby to C++, crunching in C14, and then passing JSON back to the Rails app
[01:34:43] michael_mbp: planning to extend with gRPC at somepoint. Take away here, don't get fixated on a singular language.
[01:35:17] michael_mbp: complex modelling took me a under a couple hours in Ruby, vs. porting said logic to C++.

2017-05-16

[01:32:19] michael_mbp: hi all how can I open a Tempfile in binmode as a block?
[01:32:33] michael_mbp: from what I've seen it's a case of Tempfil.new(..).binmode
[21:27:05] michael_mbp: havenwood: what's strange is docs for Tempfile do not go into such detail.
[22:03:49] michael_mbp: havenwood: gotcha!

2017-05-09

[00:55:15] michael_mbp: lupine: yes, I've used it.
[00:55:36] michael_mbp: been hunting through the source but I haven't found where a middlware initializer is registered

2017-05-08

[22:34:28] michael_mbp: I'm curious as to how Rails internally handles a file-upload
[22:34:46] michael_mbp: is there any default middleware that handles this?

2017-04-28

[04:36:46] michael_mbp: I'm seeing some very strange Postgres behaviour
[04:36:50] michael_mbp: https://gist.github.com/bsodmike/c84779d88a5ddeca7270e56ee168805b
[05:23:26] michael_mbp: hey ryan how are you mate
[05:23:29] michael_mbp: ah no worries, figured it out
[05:24:32] michael_mbp: I'm working on a rather interesting problem - have you written any random weighted samplers algos?
[05:47:49] michael_mbp: a sampler to rank posts for a new platform
[05:48:06] michael_mbp: the current version is too crude, but I'm planning to move it into AWS's machine learning tool.
[05:53:29] michael_mbp: I've got it working in C++ with rails running the 'tool' via a pipe for now
[05:53:41] michael_mbp: will be porting it to gRPC later on

2017-04-22

[01:10:27] michael_mbp: thought on how to approach ranking content?
[01:11:18] michael_mbp: as in weighing data in separate collections, then creating a composite collection where the ranking will affect which items are closer to the start of the collection (array)
[01:11:47] michael_mbp: i.e. a = [], b = [] then I want to apply equal weighting to items in a and items in b
[01:12:35] michael_mbp: then I would do stack << a; stack << b // but that would take the weighting into considering before doing a randomised 'jumbling'
[01:17:00] michael_mbp: ranking re. facets or ?

2017-04-08

[00:30:30] michael_mbp: if I have Notepad has_many :pages and Page belongs_to :notepad, I want to be able to create the Notepad via when Page.create! or Page.new().save! is done
[00:31:39] michael_mbp: i.e. Notepad validates :pages, presence: true
[00:31:53] michael_mbp: the point here is that a Notepad cannot be created without at least 1 page.
[00:33:33] michael_mbp: Page.build( name: 'Section 1', notepad: Notepad.new()) ?

2017-04-05

[18:40:36] michael_mbp: kallisti5: wow.
[18:58:58] michael_mbp: Chaps, any leads on remote Rails work by any chance?
[19:01:09] michael_mbp: silver searcher is excellent for that `ag -l openshift`
[19:01:57] michael_mbp: cnk: yeah been following that for a while
[19:02:09] michael_mbp: ironically, lot of the posts are for non-remote (go figure!)
[19:02:22] michael_mbp: or for US only.
[19:03:28] michael_mbp: matthewd: oh? Will do, I see a lot of those.

2017-03-12

[03:36:43] michael_mbp: *.net *.split
[03:42:31] michael_mbp: has joined #RubyOnRails
[03:43:01] michael_mbp: has joined #ruby
[03:44:01] michael_mbp: has joined ##new2ruby

2017-03-07

[12:42:01] michael_mbp: I just created a new 5.0.2 app, and active record is acting as if attributes are missing
[12:42:07] michael_mbp: I did attr_accessor in the model
[12:42:17] michael_mbp: has Rail 5.0+ changed anything drastically?
[12:43:00] michael_mbp: https://gist.github.com/bsodmike/0c30c61ab3ffeb80a56aed61dc098520
[12:47:38] michael_mbp: matthewd: oh?
[12:47:51] michael_mbp: what's wrong with attr_accessor?
[12:49:56] michael_mbp: hang on I'll add my migration
[12:50:27] michael_mbp: https://gist.github.com/bsodmike/0c30c61ab3ffeb80a56aed61dc098520

2016-07-01

[19:42:29] michael_mbp: Ping timeout: 252 seconds
[19:53:23] michael_mbp: has joined ##new2ruby
[19:53:53] michael_mbp: has joined #RubyOnRails
[19:56:23] michael_mbp: has joined #ruby

2016-06-27

[13:01:34] michael_mbp: well I'm assuming `set daemon n` is in seconds; my config has it set to 300s or 5 Min.
[13:01:46] michael_mbp: that sounds about right, for 'takes ages' :)
[13:02:48] michael_mbp: pontiki: recall where the unicorn reap time is set?
[13:03:49] michael_mbp: ah the timeout directive (nuke workers)
[13:10:07] michael_mbp: thanks chaps.