WhereIsMySpoon

Activity Graph

Page 1 of 7 | Next »

2019-05-29

[08:09:24] WhereIsMySpoon: Read error: Connection reset by peer
[08:10:59] WhereIsMySpoon: has joined #ruby
[08:10:59] WhereIsMySpoon: has joined #ruby
[08:29:44] WhereIsMySpoon: Ping timeout: 272 seconds

2019-05-28

[14:06:44] WhereIsMySpoon: has joined #ruby
[14:06:44] WhereIsMySpoon: has joined #ruby

2019-04-01

[08:32:28] WhereIsMySpoon: has joined #ruby

2019-03-29

[05:19:22] WhereIsMySpoon: has joined #ruby
[05:19:22] WhereIsMySpoon: has joined #ruby
[05:23:51] WhereIsMySpoon: Ping timeout: 246 seconds
[08:15:36] WhereIsMySpoon: has joined #ruby
[08:15:37] WhereIsMySpoon: has joined #ruby
[08:54:06] WhereIsMySpoon: Ping timeout: 268 seconds
[09:21:49] WhereIsMySpoon: has joined #ruby
[09:21:49] WhereIsMySpoon: has joined #ruby
[09:21:58] WhereIsMySpoon: Remote host closed the connection
[10:06:10] WhereIsMySpoon: has joined #ruby
[10:06:11] WhereIsMySpoon: has joined #ruby
[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:06:49] WhereIsMySpoon: or assign the result of the block to a variable
[10:13:12] WhereIsMySpoon: phaul: https://pastebin.com/XjM0uKNr so if i wanted baz available outside the block id need to do that
[10:13:21] WhereIsMySpoon: or put it in a function like this https://pastebin.com/ez2VB6HH
[10:13:28] WhereIsMySpoon: gah, ill do it next time
[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
[10:16:28] WhereIsMySpoon: i assume phaul's version is also discouraged?
[10:18:51] WhereIsMySpoon: i want the error to be raised
[10:19:05] WhereIsMySpoon: i dont want baz to contain the error
[10:21:17] WhereIsMySpoon: what a silly circle
[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 (:[])"
[12:06:54] WhereIsMySpoon: phaul: undefined method `and_return' for :[]:Symbol
[12:07:59] WhereIsMySpoon: `allow(client).to receive (:[]).and_return(collection)`
[12:10:50] WhereIsMySpoon: that works thanks
[12:58:23] WhereIsMySpoon: Ping timeout: 250 seconds
[13:13:46] WhereIsMySpoon: has joined #ruby
[13:31:12] WhereIsMySpoon: Ping timeout: 250 seconds
[14:09:39] WhereIsMySpoon: has joined #ruby
[14:09:39] WhereIsMySpoon: has joined #ruby
[16:34:37] WhereIsMySpoon: Read error: Connection reset by peer

2019-03-28

[16:14:09] WhereIsMySpoon: has joined #ruby
[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
[16:17:08] WhereIsMySpoon: or can I make mongo gem not depend on bson_ext?
[16:41:20] WhereIsMySpoon: i dont really want to write jruby
[17:22:22] WhereIsMySpoon: Ping timeout: 244 seconds
[19:16:18] WhereIsMySpoon: has joined #ruby
[19:16:18] WhereIsMySpoon: has joined #ruby
[19:20:34] WhereIsMySpoon: Ping timeout: 255 seconds

2019-01-28

[09:45:26] WhereIsMySpoon: Quit: http://quassel-irc.org - Chat comfortably. Anywhere.

2019-01-25

[09:28:14] WhereIsMySpoon: has joined #ruby
[09:28:23] WhereIsMySpoon: has joined #RubyOnRails
[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:41:19] WhereIsMySpoon: fox_mulder_cp: wait, so i dont need to specify my fields at all?
[09:41:46] WhereIsMySpoon: in my model class
[09:42:11] WhereIsMySpoon: i changed writer to accessor
[09:42:25] WhereIsMySpoon: i confused myself thinking "writer" meant it would generate a reader and writer
[09:42:30] WhereIsMySpoon: i havent done ruby in a while :P
[09:45:08] WhereIsMySpoon: has left #ruby: ("http://quassel-irc.org - Chat comfortably. Anywhere.")
[14:01:52] WhereIsMySpoon: gives? Im sure it must be something stupid...
[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:02:36] WhereIsMySpoon: have updated the gist with the server console output
[14:04:30] WhereIsMySpoon: im probably doing something super dumb, i havent used rails for years
[14:05:22] WhereIsMySpoon: 1|||2019-01-25 13:58:31.343583|2019-01-25 13:58:31.343583
[14:05:22] WhereIsMySpoon: id|reminder_text|reminder_date|created_at|updated_at
[14:05:22] WhereIsMySpoon: sqlite> select * from reminders;
[14:05:50] WhereIsMySpoon: i dont need the fields in the model at all?
[14:06:04] WhereIsMySpoon: thats..confusing
[14:06:16] WhereIsMySpoon: why does it break with the accessor there? am i overwriting an existing one?
[14:06:42] WhereIsMySpoon: now it works :D
[14:07:53] WhereIsMySpoon: thank you tbuehlmann
[14:08:23] WhereIsMySpoon: i knew it would be something stupid :P
[14:08:38] WhereIsMySpoon: last time i used rails was uh...5 years ago
[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

2018-04-18

[15:39:10] WhereIsMySpoon: Disconnected by services

2018-04-05

[19:56:24] WhereIsMySpoon: has joined #ruby
[19:56:25] WhereIsMySpoon: has joined #ruby
[20:00:17] WhereIsMySpoon: Read error: Connection reset by peer
[20:04:36] WhereIsMySpoon: has joined #ruby
[20:04:37] WhereIsMySpoon: has joined #ruby

2018-03-28

[09:08:40] WhereIsMySpoon: has joined #ruby
[10:18:56] WhereIsMySpoon: Quit: WhereIsMySpoon
[10:21:46] WhereIsMySpoon: has joined #ruby
[10:21:46] WhereIsMySpoon: has joined #ruby
[11:35:18] WhereIsMySpoon: Quit: WhereIsMySpoon
[12:26:07] WhereIsMySpoon: has joined #ruby
[12:26:08] WhereIsMySpoon: has joined #ruby
[12:47:57] WhereIsMySpoon: Quit: WhereIsMySpoon
[15:12:55] WhereIsMySpoon: has joined #ruby
[16:12:40] WhereIsMySpoon: Quit: WhereIsMySpoon
[23:37:37] WhereIsMySpoon: has joined #ruby

2018-03-27

[09:07:30] WhereIsMySpoon: has joined #ruby
[09:07:30] WhereIsMySpoon: has joined #ruby
[10:52:42] WhereIsMySpoon: silam: are you trying to get puppet to use an external CA?
[11:00:16] WhereIsMySpoon: there are some old issues on the net if you google “puppet timeout.rb segfault
[11:00:25] WhereIsMySpoon: but theyre like 4-5 years old
[11:26:31] WhereIsMySpoon: catphish: I have no idea, but that sounds whacky :D
[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
[11:27:28] WhereIsMySpoon: Just a random shot in the dark
[12:00:29] WhereIsMySpoon: Quit: WhereIsMySpoon
[12:34:50] WhereIsMySpoon: has joined #ruby
[12:34:50] WhereIsMySpoon: has joined #ruby
[13:46:01] WhereIsMySpoon: zaka: ask the question, and maybe someone will
[13:59:17] WhereIsMySpoon: https://stackoverflow.com/questions/15782492/how-to-run-two-methods-in-parallel-ruby
[14:11:55] WhereIsMySpoon: catphish: yay for multiprocess programs :D
[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:18:38] WhereIsMySpoon: oh wait, that parallel gem does like…exactly that
[14:18:43] WhereIsMySpoon: zaka: follow the readme in that library
[14:18:52] WhereIsMySpoon: its super super simple
[14:24:03] WhereIsMySpoon: then whatever you’re passing in doesnt have a createImage function
[14:24:21] WhereIsMySpoon: you said doImages when you first said this
[14:24:25] WhereIsMySpoon: then createImages
[14:24:39] WhereIsMySpoon: check youve got the right function and youre passing in the right objects to the array
[14:58:50] WhereIsMySpoon: zaka: are you on windows?
[15:13:43] WhereIsMySpoon: zaka: youre out of luck, you cant fork on windows
[15:22:49] WhereIsMySpoon: mugurel_: you know this data is readily available on various websites?
[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:05:51] WhereIsMySpoon: Quit: WhereIsMySpoon

2018-03-26

[08:49:00] WhereIsMySpoon: has joined #ruby
[10:00:26] WhereIsMySpoon: Quit: WhereIsMySpoon
[10:04:12] WhereIsMySpoon: has joined #ruby
[17:10:24] WhereIsMySpoon: Ping timeout: 256 seconds

2018-03-23

[17:58:20] WhereIsMySpoon: has joined #ruby
[17:58:20] WhereIsMySpoon: has joined #ruby
[20:53:08] WhereIsMySpoon: Quit: WhereIsMySpoon
[20:55:11] WhereIsMySpoon: has joined #ruby
[21:26:51] WhereIsMySpoon: Ping timeout: 240 seconds

2018-03-22

[10:54:09] WhereIsMySpoon: has joined #ruby
[10:54:10] WhereIsMySpoon: has joined #ruby
[12:38:45] WhereIsMySpoon: Ping timeout: 264 seconds

2018-03-21

[10:06:49] WhereIsMySpoon: has joined #ruby
[10:42:45] WhereIsMySpoon: Quit: WhereIsMySpoon
[11:33:25] WhereIsMySpoon: has joined #ruby
[12:17:06] WhereIsMySpoon: Quit: WhereIsMySpoon
[13:54:37] WhereIsMySpoon: has joined #ruby
[15:56:14] WhereIsMySpoon: Quit: WhereIsMySpoon
[15:59:29] WhereIsMySpoon: has joined #ruby
[16:20:00] WhereIsMySpoon: Quit: WhereIsMySpoon
[16:45:40] WhereIsMySpoon: has joined #ruby
[16:45:40] WhereIsMySpoon: has joined #ruby
[17:35:07] WhereIsMySpoon: Quit: WhereIsMySpoon
[20:15:03] WhereIsMySpoon: has joined #ruby
[21:11:51] WhereIsMySpoon: Ping timeout: 256 seconds

2018-03-20

[09:39:21] WhereIsMySpoon: has joined #ruby
[09:39:21] WhereIsMySpoon: has joined #ruby
[09:57:31] WhereIsMySpoon: Quit: WhereIsMySpoon
[10:08:32] WhereIsMySpoon: has joined #ruby
[11:51:20] WhereIsMySpoon: Quit: WhereIsMySpoon
[11:56:04] WhereIsMySpoon: has joined #ruby
[12:20:46] WhereIsMySpoon: Quit: WhereIsMySpoon
[13:01:45] WhereIsMySpoon: has joined #ruby
[16:44:44] WhereIsMySpoon: thats not what you specified before
[16:44:52] WhereIsMySpoon: who made up this data format? o.O
[16:47:03] WhereIsMySpoon: havenwood: what on earth is that code?
[16:47:10] WhereIsMySpoon: outside, _, inside ?
[16:48:12] WhereIsMySpoon: you broke the bot
[16:49:08] WhereIsMySpoon: havenwood: it wasnt accusatory, i was just curious
[16:49:47] WhereIsMySpoon: right, ruby has multiple variable assignments in one expression
[16:51:32] WhereIsMySpoon: havenwood’s solution looks nicest so far i think
[17:25:42] WhereIsMySpoon: is this going to be some form of #define
[17:27:29] WhereIsMySpoon: i have no idea what yield_self is :D
[17:28:25] WhereIsMySpoon: its similar to what dminuoso was talking to me about yesterday
[17:28:59] WhereIsMySpoon: allows you to chain method calls that you would normally nest
[17:29:54] WhereIsMySpoon: then seems like a reasonable alias
[17:30:21] WhereIsMySpoon: its kinda like the promise chaining stuff in js
[17:35:47] WhereIsMySpoon: >> 42.yield_self
[17:36:37] WhereIsMySpoon: damnit, bot maintainer!
[17:45:47] WhereIsMySpoon: Quit: WhereIsMySpoon

2018-03-19

[17:43:03] WhereIsMySpoon: which lambda call please
[17:44:00] WhereIsMySpoon: im lost a little
[17:44:05] WhereIsMySpoon: whats the output of that code
[17:48:09] WhereIsMySpoon: dminuoso: right
[17:49:49] WhereIsMySpoon: morfin: yes, but haskell was built with this in mind :)
[17:52:10] WhereIsMySpoon: so (zipWith * zipWith)[add, mat1, mat2] applies zipWith to the arguments twice, yes?
[17:53:02] WhereIsMySpoon: then im a bit conufsed :D
[17:58:51] WhereIsMySpoon: i think i kinda get it :P
[18:00:41] WhereIsMySpoon: now my brain is leaking
[18:02:03] WhereIsMySpoon: i think in general adding ways to more easily code in fp paradigms is good :)
[18:02:16] WhereIsMySpoon: fp code is generally less prone to bugs and more succinct
[18:12:27] WhereIsMySpoon: Ping timeout: 240 seconds