EdwardIII

Activity Graph

Page 1 of 8 | Next »

2018-08-20

[14:08:51] EdwardIII: has joined #RubyOnRails
[20:26:23] EdwardIII: Quit: ZNC 1.6.3+deb1 - http://znc.in
[21:34:31] EdwardIII: has joined #RubyOnRails

2017-11-26

[22:46:46] EdwardIII: has joined #ruby
[22:46:46] EdwardIII: Changing host
[22:46:46] EdwardIII: has joined #ruby
[23:54:12] EdwardIII: Ping timeout: 260 seconds

2017-11-25

[16:24:05] EdwardIII: has joined #ruby
[16:25:02] EdwardIII: hey. i just want to fire off a bunch of http requests on a non-blocking way (just doing a little "site uptime checker" for some internal bits and pieces). i'm reading around but there's so much stuff i'm not sure where to start. em, promises.rb, fibres, ruby-concurrent
[16:26:09] EdwardIII: concurrent-ruby looked like it'd be the quickest to get up and running as it supports promises which i'm pretty familiar with, but that requires intern.h. i can't figure out what library this header comes from and googling came up with nothing helpful
[16:27:43] EdwardIII: next i tried promise.rb. this worked pretty nicely - it requires EM to actually execute async i think. works sort of ok but the app doesn't stop when finished and i wasn't sure of a sane way to make event reactor stop when it was finished or how to quickly add timeouts etc
[16:28:11] EdwardIII: wondered if there was a sort of popular route to go for this kind of activity?
[16:59:24] EdwardIII: apeiros: hmm odd. maybe i had a typo or something - i'll double check. thanks
[17:29:01] EdwardIII: Ping timeout: 240 seconds
[17:30:57] EdwardIII: Changing host
[17:30:57] EdwardIII: has joined #ruby
[17:30:58] EdwardIII: has joined #ruby
[18:16:27] EdwardIII: Ping timeout: 240 seconds

2017-03-10

[09:28:50] EdwardIII: has left #RubyOnRails: ()

2016-07-26

[10:35:34] EdwardIII: Ping timeout: 240 seconds
[10:38:51] EdwardIII: has joined #ruby
[11:05:55] EdwardIII: Ping timeout: 244 seconds
[11:07:51] EdwardIII: has joined #ruby
[16:11:49] EdwardIII: Ping timeout: 244 seconds
[16:12:50] EdwardIII: has joined #ruby
[16:42:19] EdwardIII: Ping timeout: 260 seconds
[16:43:50] EdwardIII: has joined #ruby
[18:41:06] EdwardIII: Ping timeout: 244 seconds
[18:47:50] EdwardIII: has joined #ruby
[19:03:51] EdwardIII: Ping timeout: 250 seconds
[19:08:50] EdwardIII: has joined #ruby
[19:08:55] EdwardIII: has joined #ruby
[19:08:55] EdwardIII: Changing host
[20:15:27] EdwardIII: Ping timeout: 276 seconds
[20:20:50] EdwardIII: has joined #ruby

2016-07-25

[13:25:32] EdwardIII: Ping timeout: 258 seconds
[13:27:48] EdwardIII: has joined #ruby
[16:43:49] EdwardIII: Ping timeout: 260 seconds
[16:45:18] EdwardIII: has joined #ruby
[17:08:40] EdwardIII: Ping timeout: 244 seconds
[17:13:48] EdwardIII: has joined #ruby
[19:25:29] EdwardIII: Ping timeout: 258 seconds
[19:28:47] EdwardIII: has joined #ruby
[20:41:54] EdwardIII: Ping timeout: 244 seconds
[20:43:17] EdwardIII: has joined #ruby
[22:09:27] EdwardIII: Ping timeout: 276 seconds
[22:11:48] EdwardIII: has joined #ruby
[22:18:42] EdwardIII: Ping timeout: 244 seconds
[22:25:20] EdwardIII: has joined #ruby

2016-07-22

[15:27:06] EdwardIII: Ping timeout: 272 seconds
[15:27:12] EdwardIII: has joined #ruby

2016-06-11

[18:53:01] EdwardIII: Ping timeout: 240 seconds
[18:55:58] EdwardIII: has joined #ruby

2016-05-24

[05:16:04] EdwardIII: Ping timeout: 240 seconds
[05:18:16] EdwardIII: has joined #ruby
[14:42:38] EdwardIII: *.net *.split
[15:45:54] EdwardIII: has joined #ruby
[15:57:33] EdwardIII: *.net *.split
[16:06:16] EdwardIII: has joined #ruby

2016-05-20

[06:38:04] EdwardIII: Ping timeout: 240 seconds
[06:38:46] EdwardIII: has joined #ruby
[16:53:24] EdwardIII: Ping timeout: 244 seconds
[16:56:14] EdwardIII: has joined #ruby

2016-05-10

[00:04:09] EdwardIII: Ping timeout: 250 seconds
[00:10:10] EdwardIII: has joined #ruby

2016-05-09

[05:58:04] EdwardIII: Ping timeout: 240 seconds
[06:01:10] EdwardIII: has joined #RubyOnRails
[06:01:10] EdwardIII: has joined #ruby
[22:51:04] EdwardIII: Ping timeout: 240 seconds
[22:53:40] EdwardIII: has joined #ruby
[22:54:11] EdwardIII: has joined #RubyOnRails
[23:05:32] EdwardIII: Ping timeout: 260 seconds
[23:09:11] EdwardIII: has joined #RubyOnRails
[23:09:40] EdwardIII: has joined #ruby
[23:34:04] EdwardIII: Ping timeout: 240 seconds
[23:37:11] EdwardIII: has joined #RubyOnRails
[23:37:11] EdwardIII: has joined #ruby
[23:57:04] EdwardIII: Ping timeout: 240 seconds
[23:58:40] EdwardIII: has joined #ruby
[23:59:10] EdwardIII: has joined #RubyOnRails

2016-05-04

[06:04:30] EdwardIII: Ping timeout: 246 seconds
[06:07:19] EdwardIII: has joined #RubyOnRails
[06:07:19] EdwardIII: has joined #ruby

2016-04-29

[12:56:33] EdwardIII: Ping timeout: 240 seconds
[13:00:02] EdwardIII: has joined #RubyOnRails
[13:00:02] EdwardIII: has joined #ruby

2016-04-27

[13:16:19] EdwardIII: Ping timeout: 268 seconds
[13:18:23] EdwardIII: has joined #ruby
[13:18:53] EdwardIII: has joined #RubyOnRails
[18:50:33] EdwardIII: Ping timeout: 240 seconds
[18:55:21] EdwardIII: has joined #RubyOnRails
[18:55:21] EdwardIII: has joined #ruby

2016-04-25

[15:59:21] EdwardIII: Ping timeout: 246 seconds
[16:14:10] EdwardIII: has joined #RubyOnRails
[16:14:11] EdwardIII: has joined #ruby

2016-04-21

[00:37:44] EdwardIII: Ping timeout: 252 seconds
[00:48:53] EdwardIII: has joined #RubyOnRails
[00:49:23] EdwardIII: has joined #ruby
[17:00:40] EdwardIII: Ping timeout: 268 seconds
[17:09:21] EdwardIII: has joined #ruby
[17:09:22] EdwardIII: has joined #RubyOnRails

2016-04-18

[11:06:24] EdwardIII: Ping timeout: 260 seconds
[17:09:36] EdwardIII: Ping timeout: 276 seconds
[17:10:51] EdwardIII: has joined #RubyOnRails
[17:11:21] EdwardIII: has joined #ruby

2016-04-11

[01:13:02] EdwardIII: Ping timeout: 248 seconds
[01:15:21] EdwardIII: has joined #RubyOnRails
[01:15:21] EdwardIII: has joined #ruby

2016-04-07

[08:55:06] EdwardIII: has joined #RubyOnRails
[08:55:06] EdwardIII: has joined #ruby

2016-04-06

[09:19:04] EdwardIII: Ping timeout: 240 seconds

2016-03-17

[10:03:04] EdwardIII: hrm, i'm confused. the docs (http://www.rubydoc.info/gems/money/Money/Formatting) say you can do `Money.new(100, "USD") #=> "$1.00"` but `Money.new(100, "USD")` gives me *** ArgumentError Exception: wrong number of arguments (given 1, expected 0)
[10:03:28] EdwardIII: and i looked up the constructor of the object in ~/.gems and it does say this so it looks like it should work: def initialize(obj, currency = Money.default_currency, bank = Money.default_bank)
[10:03:50] EdwardIII: when i do it in irb it works, so i think something in rails is causing an issue
[10:05:46] EdwardIII: damnit i needed to restart the server, stupid heh
[10:05:51] EdwardIII: but how come a Money object already exists?
[10:07:55] EdwardIII: universa1: not in my code
[10:08:05] EdwardIII: universa1: but i'm guessing somewhere in one of the deps. maybe rails itself?
[10:09:06] EdwardIII: i think this is the culprit: /Users/edward/.gem//ruby/2.3.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/postgresql/oid/money.rb
[10:09:28] EdwardIII: *was* the culprit
[10:09:36] EdwardIII: the real culprit was not restarting my server
[10:09:43] EdwardIII: universa1: yeah, with byebug (byebug uses pry i think?)
[10:11:57] EdwardIII: norc: ah i didn't get a stack trace from byebug, i'll make sure i figure out how to get it and gist it next time
[10:12:05] EdwardIII: well, or just read it
[10:14:02] EdwardIII: norc: nothing at all, if anything i consider your time more valuable than mine
[10:14:50] EdwardIII: norc: i'm not used to naming collisions like this, and because i don't know what i don't know, i had no idea what to read to figure it out
[10:15:33] EdwardIII: norc: maybe i've been a big ask-happy - i'm sorry i offended you
[10:23:12] EdwardIII: norc: well, i'm apologise - that wasn't my intention and i don't expect special treatment
[11:41:40] EdwardIII: that's interesting
[11:44:29] EdwardIII: and it looks like with mysql, if you have no FKs it'll drop & recreate the table, but if you have FKs it does delete from <each table> - was seeing this weirdness on another project

2016-03-16

[01:23:39] EdwardIII: Ping timeout: 276 seconds
[01:26:08] EdwardIII: has joined #RubyOnRails
[01:26:08] EdwardIII: has joined #ruby
[07:34:04] EdwardIII: Ping timeout: 240 seconds
[07:38:41] EdwardIII: has joined #RubyOnRails
[07:38:41] EdwardIII: has joined #ruby
[15:09:45] EdwardIII: sorry for the baity question but... is there a rough consensus on which tool to use to get a nice new version of ruby running? i've used chruby on my app, but i'm now preparing ansible (and maybe cap) jobs to deploy into prod
[15:11:32] EdwardIII: so just pick one and use it then i guess
[15:12:08] EdwardIII: hrm with ubuntu lts i'm not going to get a nice modern version fo ruby
[15:12:57] EdwardIII: one thing about chruby that i'm not so wild about, everyone seems to use it as root-by-default, whereas local::lib and virtualenv are always my-user-by-default
[15:13:12] EdwardIII: (or perlbrew might be a better comparision)
[15:13:21] EdwardIII: apeiros: ruby-install... without chruby?
[15:13:26] EdwardIII: apeiros: and just install as root?
[15:14:10] EdwardIII: mmm brightbox looks like quite a nice solution
[15:18:48] EdwardIII: yeah let's use brightbox hehe
[15:18:55] EdwardIII: ACTION uninstalls chruby
[15:39:04] EdwardIII: i'm working iwth ansible
[15:39:11] EdwardIII: switched from chef, i've had some good results
[15:39:35] EdwardIII: i'd go insane without some kind of tool like that to bring systems into sync
[15:40:47] EdwardIII: man i've not even heard of nix package manager
[15:41:01] EdwardIII: brew-killer!?
[15:41:15] EdwardIII: that's be nice, there's been a big gap for something like this in the 'market' for a loooong time
[15:42:01] EdwardIII: i'm kinda married to brew now though
[16:57:10] EdwardIII: ok getting down to it, i've got my ansible build which creates the box, installs a sane version of ruby
[16:57:18] EdwardIII: i can easily do bundle install from ansible
[16:57:32] EdwardIII: but i guess it's a question of whether to use cap for the rest
[16:59:09] EdwardIII: i think doing a puma install without cap might be a bit hairy

2016-03-15

[13:50:43] EdwardIII: hrm i've got these parameters coming in like: "extras"=>["HOND"] - works great as long as i'm outputting as radio buttons. if i need to pass it on, and do <%= stay_request_builder.input field, as: :hidden %>, it comes out as <input class="hidden form-control" type="hidden" value="HOND" name="stay_detail[extras]" id="stay_detail_extras" />
[13:52:37] EdwardIII: how do i say like "hidden input, but respect the arrayishness of the value?
[13:53:01] EdwardIII: ah, i think i should have rtfm
[14:11:02] EdwardIII: array.map {|v| "string" => v } isn't valid syntax? i want to convert ['a', ...] into ['string' => 'a', ...]
[14:11:39] EdwardIII: i want an array of hashes
[14:12:05] EdwardIII: ok, done - but in some places ruby seems to just dwim
[14:12:09] EdwardIII: in regards to this
[14:12:24] EdwardIII: e.g. ['a' => 'b']
[14:14:39] EdwardIII: i'm thirsty for berevity
[14:14:50] EdwardIII: and a spellchecker
[14:18:07] EdwardIII: havenwood: i think the rigth approach is to use {} here
[14:18:23] EdwardIII: havenwood: the outcome i wanted was [{'a' => 'b'}]
[14:18:49] EdwardIII: those are interesting though, thanks!
[14:21:02] EdwardIII: shevy: often both
[14:22:40] EdwardIII: one little thing that's got me thinking, sometimes method_name! seems to denote it's going to change state, but sometimes it seems to denote it might throw an exception rather than just return nil?
[14:23:35] EdwardIII: well the big one i've seen is a_model.save! if you want it throw exceptions on validation errors
[14:25:30] EdwardIII: this is going to expose me as an absolutely crappy programmer but... should i be worried about mutating from a thread-safe perspective? unless the objects/vars i'm working with are global i should be ok right?
[14:26:16] EdwardIII: maybe "shared resource" is better criterion?
[14:32:08] EdwardIII: righty-ho then
[15:25:19] EdwardIII: hrm i have a design issue
[15:25:42] EdwardIII: i have so my StayRequest can have a bunch of extras, these come from an api based on a bunch of different criteria specific to your exact use-case and search as a user
[15:25:55] EdwardIII: so i don't think a m2m or whatever makes sense in this instance
[15:26:33] EdwardIII: i've come up with the idea of implementing my own objects with load/dump, then i can can use serialize: MyClassName on my model! awesome! and they get saved as json in the db, beautiful
[15:26:55] EdwardIII: but it's kinda a pain to then pass these around between form submits heh
[15:27:16] EdwardIII: just wondering if anyone has done something like this before? or just wants to accuse me of being insane?
[15:31:37] EdwardIII: tubbo: it's a bit of a dangerous guess, but i'm guessing rail's json serialiser on a model doesn't let you serialise methods, only data
[15:33:48] EdwardIII: tubbo: i'll double check it then: https://gist.github.com/EdwardIII/480ef83f734f80748a50
[15:34:54] EdwardIII: heh in a glorious loop of justice
[15:35:31] EdwardIII: https://gist.github.com/EdwardIII/480ef83f734f80748a50#file-extra_collection-rb-L26
[15:37:40] EdwardIII: and it's running through this (snipped for readability): https://gist.github.com/EdwardIII/480ef83f734f80748a50#file-a_model-rb-L4
[15:42:21] EdwardIII: or maybe i SHOULD just do a one-to-many and delete all the old ones
[15:42:27] EdwardIII: this is a common problem for me
[15:42:38] EdwardIII: i've never found a really nice solution to it
[15:43:00] EdwardIII: * delete all the old ones periodically
[16:13:22] EdwardIII: ungh just did my first bit of metaprogramming
[17:09:49] EdwardIII: i'm struggling to get these params through permit: {"stay_detail"=>{"arrival_date"=>"2016-03-16", "extras"=>{"HOND"=>{"name"=>"HOND", "number_of_extras"=>"1"}, "ONTBIJT"=>{"name"=>"ONTBIJT", "number_of_extras"=>"2"}}}}
[17:10:20] EdwardIII: i tried :extras => [:name, [:name, :number_of_extras], ] but no joy
[17:11:52] EdwardIII: or maybe i'm abusing simple_fields_for too much
[17:22:49] EdwardIII: it's a plain old ruby object that gets serialised: https://gist.github.com/EdwardIII/480ef83f734f80748a50#file-extra-rb
[17:23:29] EdwardIII: i think i've managed to sneak it past params, but i'm seeing "Attribute was supposed to be a RezExchange::ExtraCollection, but was a ActionController::Parameters. -- {}" because of https://gist.github.com/EdwardIII/480ef83f734f80748a50#file-a_model-rb-L4
[17:23:41] EdwardIII: but how come this doesn't happen for like... one to many relationships? how does rails navigate those?
[17:29:31] EdwardIII: ah, this looks pretty excellent: http://stackoverflow.com/a/31798620/3486297
[17:30:09] EdwardIII: CassioAlmeidas: my feeling is that if you import the whole db structure verbatim and try to build on top of it you'll end up spending a lot of time wrestling rails
[17:30:48] EdwardIII: CassioAlmeidas: but if you build your app then do a migration script to massage the data from one app to the other (either by directly reaching into mysql, or json export or whatever) that pain is only happening at one point
[17:41:19] EdwardIII: what do you guys use to manage your apps? ansible & capistrano? just ansible? something like that?
[17:41:32] EdwardIII: i use ansible extensively, not sure if i should bother with cap
[17:45:18] EdwardIII: fryguy: why chef & cap? why not just chef?
[17:47:53] EdwardIII: cool, thanks for the input
[17:49:46] EdwardIII: i've deployed other apps with ansible, i haven't tied it in with autoscale but apparently that works
[17:49:49] EdwardIII: never a rails app though
[17:54:00] EdwardIII: gonna try and deploy my first app in the morning
[17:55:03] EdwardIII: puma seems pretty popular
[17:55:52] EdwardIII: yeah puma seems to be up there on all the howto guides (digital ocean etc)
[17:56:33] EdwardIII: tubbo: what's your approach to deployment?
[17:59:34] EdwardIII: so travis just does 'git push production 1.5.0' # job done take the rest of the day off?
[17:59:54] EdwardIII: don't you find heroku kind of expensive?
[18:02:32] EdwardIII: based on the source i've been seeing 'a' seems to be the most popular
[18:28:28] EdwardIII: did any of you guys see those videos saying procedural > oo?
[18:28:43] EdwardIII: was it sandi's code they were using as an example? i think it might have been
[18:30:19] EdwardIII: heh no he really means procedural, not functional
[18:30:26] EdwardIII: it was on /r/programming a few days ago
[18:30:52] EdwardIII: https://www.youtube.com/watch?v=IRTfhkiAqPw
[18:32:59] EdwardIII: it echoes a lot of what david west said
[18:33:06] EdwardIII: pretty sure these were some metrics he used too
[18:35:11] EdwardIII: yeah if you've ever worked with symfony... that's a good education
[18:38:46] EdwardIII: that being said people are going nuts about the number of classes in the FB mobile app heh
[19:30:51] EdwardIII: i've been playing with turbolinks
[19:30:56] EdwardIII: i kinda like it

2016-03-14

[16:59:35] EdwardIII: i'm not even sure where it's supposed to be getting that info from
[17:01:28] EdwardIII: i'm actually not sure if it's a simple_for_for fields problem or a cocoon issue
[17:09:16] EdwardIII: does cocoon just not work when you want to do 'edit'?
[17:11:01] EdwardIII: it saves 'em just fine
[17:11:27] EdwardIII: hahaha no it doesn't, stupid!
[17:15:47] EdwardIII: hrm how can i get the real instance id or even better real instance for this form when it's in update mode? https://gist.github.com/EdwardIII/e39d3426f2066e648112#file-r-html-erb-L2
[17:17:42] EdwardIII: ok lemme take a step back
[17:17:58] EdwardIII: i want to put a preview image next to an upload box in a nested param getting loaded with cocoon
[17:18:10] EdwardIII: i can do that if i can get the instance
[17:18:34] EdwardIII: ah, you can do f.object, that gets the underlying instance, nice
[17:20:47] EdwardIII: slash_nick: this is a more complete example from earlier
[17:32:49] EdwardIII: SteenJobs: yeah i'm new to rails, i just started using paperclip
[17:38:02] EdwardIII: slash_nick: no this is for when you come back an edit a room and it already has a bunch of images
[17:38:41] EdwardIII: slash_nick: i got it working nicely: https://gist.github.com/EdwardIII/bcfbc09d00bce7b3bcba#file-_image_fields-html-erb-L4-L6
[17:47:31] EdwardIII: slash_nick: thanks!
[17:47:39] EdwardIII: slash_nick: if you think this is a dumb way of doing it, do feel free to say
[17:47:53] EdwardIII: or maybe if there a bunch of components that already do stuff like this and i just don't know about them yet