Page 1 of 7 | Next »
[10:06:40] WhereIsMySpoon: is there any way to somehow return from a begin-rescue-end block? Otherwise each time I have one I need to put it in a separate function which is just a bit annoying for such a small piece of code
[10:13:12] WhereIsMySpoon: phaul: https://pastebin.com/XjM0uKNr so if i wanted baz available outside the block id need to do that
[10:14:42] WhereIsMySpoon: phaul: is there some way i dont have to do either of those and just assign baz equal to the result of evaluating the begin-rescue-end block somehow?
[10:15:20] WhereIsMySpoon: ytti: right but thatd still be a separately defined function for essentially 1 or 2 lines of code
[12:01:28] WhereIsMySpoon: I have a function on Mongo::Client that's just # - how do I mock this with rspec? I tried client.stub!(:).and_return(foo) but it complains
[12:01:54] WhereIsMySpoon: # returns a Mongo::Collection given a valid arg in  like say my_client[:my_collection_name]
[12:02:17] WhereIsMySpoon: "#<Double "Mongo::Client"> received unexpected message :stub! with (:)"
[16:14:31] WhereIsMySpoon: Is there a binary version of bson I can depend on instead of bundle install trying to build bson with make each time? The docker image im trying to deploy onto doesnt have make
[09:29:03] WhereIsMySpoon: Hello - small question: how come if I have my two fields in my model as attr_accessor, they get saved to the model in the db fine, but if I have them as attr_writer they dont?
[09:30:06] WhereIsMySpoon: oh wait nvm - i thought attr_writer was going to define readers and writers and accessor was for reading
[09:42:25] WhereIsMySpoon: i confused myself thinking "writer" meant it would generate a reader and writer
[14:01:52] WhereIsMySpoon: Hello - I've got a stupid simple controller + model setup, but for some reason my model attrs arent getting set into the db. Ive put the model + controller + response function in here https://gist.github.com/Jarob22/62e4beece5dd4e3e3473634ddc25b601 - what happens is my server responds with the model as it should be, ie with the reminder_text and reminder_date inside it, set, but those 2 attrs dont get put into the database. What
[14:06:16] WhereIsMySpoon: why does it break with the accessor there? am i overwriting an existing one?
[15:19:46] WhereIsMySpoon: tbuehlmann: i try to do that any time i have a problem :) as someone who does this for a living (not with rails!) i appreciate when i get good bug reports
[11:00:16] WhereIsMySpoon: there are some old issues on the net if you google “puppet timeout.rb segfault
[11:27:22] WhereIsMySpoon: catphish: are your ruby processes using ports or the database or threads in a pool or something similar? Maybe theyre trying to clear resources up but getting the wrong pids
[13:59:17] WhereIsMySpoon: https://stackoverflow.com/questions/15782492/how-to-run-two-methods-in-parallel-ruby
[14:17:36] WhereIsMySpoon: is there not a way in ruby to stream a list in a parallel way? like java has myList.parallelStream().map/forEach which will execute the lambda given in a multithreaded way
[14:24:39] WhereIsMySpoon: check youve got the right function and youre passing in the right objects to the array
[15:38:15] WhereIsMySpoon: memo1: https://askubuntu.com/questions/181215/too-many-open-files-how-to-find-the-culprit this might help you find whats going on
[17:52:10] WhereIsMySpoon: so (zipWith * zipWith)[add, mat1, mat2] applies zipWith to the arguments twice, yes?
[18:02:03] WhereIsMySpoon: i think in general adding ways to more easily code in fp paradigms is good :)