#ruby - 25 March 2019
« Back 1 day Forward 1 day »
[00:06:27] marz_d`ghostman: Anyone using the redis-rb gem? How do you display the actual command after getting an error?
[00:17:05] al2o3-cr: xco: does this work for you: $>.ioctl(0x5412, "\C-l") # 0x5412 = TIOCSTI i'm pretty sure it's the same on osx
[00:19:36] al2o3-cr: actually, that was just me testing, probably better to use STDOUT.ioctl(0x5412, "\C-l")
[00:27:00] al2o3-cr: what the output of this command "grep TIOCSTI /usr/include/asm-generic/ioctls.h"
[00:32:46] xco: al2o3-cr: want to review my what i was wriing? please? if you have time and willingness?
[00:56:01] xco: al2o3-cr: there’s a whole folder, runnable version here: https://www.dropbox.com/s/r63x6x2nm1xjh3u/cli.zip?dl=0
[01:01:29] xco: this makes me happy because this is the part where i write quickly to get tests to pass
[01:01:58] xco: after getting some sleeping i’ll looking into making it better/refactoring that’s why a clear pair of eyes and advise will be nice
[01:10:23] phaul: it's in a pretty ad hoc phase, jumping from rails to sinatra to roda, rom-rb, to sequel to pg, react to elm. Basically trying many things and experiment
[04:12:24] marz_d`ghostman: I have a hash whose key value pairs corresponds to an instance variables. How do I instantiate an object by iterating through a hash? e.g. https://gist.github.com/marzdgzmn/085808bc45267a9beafc9b11b4e92f14
[11:22:43] phaul: you call Loco.new everywhere and then just garbage collect the result. And Loco doesn't have any instance state
[11:23:11] phaul: In this case you are better of creating a module instead of a class, and call you methods on that module
[11:26:40] xco: so Loco would better be a module than a class right? is this for best practice or it has something to do with performance, which side that this lean towards more?
[11:27:23] phaul: instance state is something tht you want to preserve in an instance between method calls.
[11:29:04] phaul: here @a is the instance state, meaning after x = A.new ; x.foo the 1 is stored in that instance. and later x.bar retreives it
[16:38:36] also_uplime: I've got a weird issue... I'm trying to use httparty to download a peer certificate, which theoretically should be possible according to https://github.com/jnunemaker/httparty/blob/master/examples/peer_cert.rb However, when I try to run it, I get the following error https://clbin.com/5shYf using ruby 2.6. Any ideas how to fix it? I'm on a Mac if it