<CableNinja>
as far as I can tell, it seems to be a problem with the client side code
jottr has quit [Ping timeout: 250 seconds]
<CableNinja>
I've tried all sorts of variations on ssl/tls version as well as ciphers, nothing seems to make a difference
Swyper has joined #ruby
<adam12>
CableNinja: There's a ton going on in here. I'd probably try to reduce it down into 2 small scripts to reproduce.
OneNeptune has joined #ruby
Swyper has quit [Remote host closed the connection]
orbyt_ has quit [Ping timeout: 246 seconds]
hightower2 has joined #ruby
krawchyk has joined #ruby
ngw has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hightower2 has quit [Changing host]
hightower2 has joined #ruby
krawchyk has quit [Client Quit]
ngw has quit [Ping timeout: 246 seconds]
Swyper has joined #ruby
jottr has joined #ruby
ngw has joined #ruby
jottr has quit [Ping timeout: 258 seconds]
<CableNinja>
adam12, alright, will do. do you have any info regarding what those SSL errors actually mean? (ssl errors are so unhelpful sometimes)
<adam12>
CableNinja: Not really. I took the liberty of pulling out a bunch of your code into 2 smaller files and it _looks_ like it works, at least on my end.
<adam12>
CableNinja: But I ripped out everything to do with threads and loops and connection handlers.
ngw has quit [Ping timeout: 246 seconds]
<adam12>
CableNinja: OpenSSL errors are definitely unhelpful :\
<adam12>
CableNinja: Maybe try my 2 small versions and see if they work? If they do, maybe we can see where your code differs from mine.
james382 has quit [Quit: Lost terminal]
<CableNinja>
ok, I'll try the same here in a bit, about to eat dinner
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 246 seconds]
Swyper has joined #ruby
agent_white has quit [Quit: gnight]
ngw has joined #ruby
dviola has quit [Quit: WeeChat 2.4]
ngw has quit [Ping timeout: 244 seconds]
OneNeptune has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has joined #ruby
seydar has joined #ruby
<seydar>
what's the idiom i'm looking for here? `def search(query=nil, opts={})...`
<seydar>
`search "str"` or `search :param => 3`. right now, passing a hash is greedily accepted as the `query` parameter
fphilipe has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
DTZUZO has quit [Ping timeout: 258 seconds]
jmcgnh has quit [Ping timeout: 250 seconds]
fphilipe has quit [Ping timeout: 276 seconds]
<adam12>
seydar: If you're _stuck_ with that style of method signature, you might have to get fancy and accept an array of args.
<adam12>
seydar: If you're not stuck with that style of method signature, you might be able to make query a keyword argument and then capture the rest of the keyword arguments as options.
<adam12>
seydar: If you're looking for a name of that style of method, I might call it polymorphic?
ngw has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
<seydar>
adam12: i feel so old, i disappeared right before keyword arguments became a thing
<adam12>
seydar: They're mostly good, tho some parts are jank and Matz yearns to fix them.
<adam12>
seydar: You might be able to do something like `def search(query: nil, **opts)` if you're on a reasonably new version of Ruby.
<adam12>
seydar: Also, you should come back.
<seydar>
adam12: ahh, i just discovered the **
<seydar>
i'm rocking 2.6
ngw has quit [Ping timeout: 246 seconds]
jelera has joined #ruby
Puffball has joined #ruby
<seydar>
adam12: okay, the double splat is exactly what i'm looking for. i'm convinced precedence changed at some point in the past five years, because i swear that was an idiom i used to use
dsmythe has joined #ruby
<seydar>
thank you!
<adam12>
seydar: I can't remember when it was introduced but it's wicked handy
<adam12>
seydar: Also I screwed up; with kwargs, you can still use a nil-default positional param.
<adam12>
seydar: So this signature is fine too if you want it: `def search(query=nil, **opts)`
OneNeptune has joined #ruby
sam_ has joined #ruby
sam_ has quit [Client Quit]
dsmythe_ has quit [Ping timeout: 276 seconds]
<seydar>
adam12: yep, that's what i ended up going with
seydar has quit [Quit: leaving]
jottr has joined #ruby
tdy1 has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
dsmythe has quit [Read error: Connection reset by peer]
ngw has joined #ruby
dsmythe has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ngw has quit [Ping timeout: 250 seconds]
jmcgnh has joined #ruby
tdy1 has quit [Ping timeout: 245 seconds]
SeepingN has joined #ruby
jottr has joined #ruby
AJA4350 has quit [Remote host closed the connection]
dviola has joined #ruby
jottr has quit [Ping timeout: 255 seconds]
ngw has joined #ruby
comet23 has quit [Quit: Connection closed for inactivity]
ngw has quit [Ping timeout: 258 seconds]
zacts has joined #ruby
zacts has quit [Quit: WeeChat 2.4]
zacts has joined #ruby
jelera has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zacts has quit [Client Quit]
tdy1 has joined #ruby
gnufied has quit [Remote host closed the connection]
OneNeptune has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Puffball has quit [Read error: Connection reset by peer]
ngw has joined #ruby
ngw has quit [Ping timeout: 250 seconds]
jelera has joined #ruby
noobineer has quit [Remote host closed the connection]
ngw has joined #ruby
ngw has quit [Ping timeout: 258 seconds]
braincrash has quit [Quit: bye bye]
ngw has joined #ruby
braincrash has joined #ruby
ngw has quit [Ping timeout: 244 seconds]
gix has joined #ruby
gix- has quit [Ping timeout: 268 seconds]
spacesuitdiver has joined #ruby
fphilipe has joined #ruby
ramfjord has joined #ruby
fphilipe has quit [Ping timeout: 250 seconds]
ramfjord has quit [Ping timeout: 245 seconds]
OneNeptune has joined #ruby
ngw has joined #ruby
duderonomy has joined #ruby
ngw has quit [Ping timeout: 255 seconds]
ngw has joined #ruby
ngw has quit [Ping timeout: 246 seconds]
ricekrispie has joined #ruby
ricekrispie2 has quit [Ping timeout: 250 seconds]
ngw has joined #ruby
ngw has quit [Ping timeout: 258 seconds]
ngw has joined #ruby
ngw has quit [Ping timeout: 245 seconds]
OneNeptune has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jelera has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Puffball has joined #ruby
stan_ has quit [Quit: No Ping reply in 180 seconds.]
OneNeptune has joined #ruby
stan has joined #ruby
ngw has joined #ruby
dellavg_ has joined #ruby
ngw has quit [Ping timeout: 250 seconds]
marmotini_ has joined #ruby
ngw has joined #ruby
Puffball has quit [Quit: Puffball]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
dellavg_ has quit [Ping timeout: 244 seconds]
ngw has quit [Ping timeout: 246 seconds]
OneNeptune has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ngw has joined #ruby
Swyper has quit [Remote host closed the connection]
reber has joined #ruby
ngw has quit [Ping timeout: 250 seconds]
Swyper has joined #ruby
conta has joined #ruby
Zeno_ has joined #ruby
Swyper has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
tdy1 has quit [Ping timeout: 246 seconds]
fphilipe has joined #ruby
dar123 has joined #ruby
Inline has quit [Quit: Leaving]
<quarters>
woodruffw, thanks. I was wondering if some_hash.find or find_all will be a linear operation
cd has quit [Quit: cd]
fphilipe has quit [Ping timeout: 245 seconds]
hightower2 has joined #ruby
shah^ has quit []
DTZUZO has joined #ruby
m_antis_ has quit [Quit: m_antis_]
abaiste^ has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has joined #ruby
fphilipe has joined #ruby
hightower2 has quit [Changing host]
hightower2 has joined #ruby
fphilipe has quit [Ping timeout: 246 seconds]
pwnd_nsfw` has joined #ruby
pwnd_nsfw has quit [Ping timeout: 250 seconds]
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fphilipe has joined #ruby
gix has quit [Ping timeout: 250 seconds]
marmotini_ has quit [Ping timeout: 244 seconds]
spacesuitdiver has joined #ruby
_whitelogger has joined #ruby
krandi has quit [Remote host closed the connection]
_whitelogger has joined #ruby
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
Tempesta has quit [Ping timeout: 255 seconds]
aupadhye has quit [Ping timeout: 250 seconds]
_whitelogger has joined #ruby
clemens3_ has joined #ruby
nowhere_man has quit [Ping timeout: 258 seconds]
aupadhye has joined #ruby
jefffrails35 has joined #ruby
ramfjord has joined #ruby
BH23 has joined #ruby
_whitelogger has joined #ruby
zacts has joined #ruby
MihaRekar has joined #ruby
_whitelogger has joined #ruby
donofrio_ has quit [Remote host closed the connection]
_whitelogger has joined #ruby
prestorium has quit [Client Quit]
pwnd_nsfw` has quit [Ping timeout: 245 seconds]
alem0lars has joined #ruby
waheedi has joined #ruby
teclator has quit [Ping timeout: 245 seconds]
MihaRekar has quit [Remote host closed the connection]
teclator has joined #ruby
dsmythe has quit [Remote host closed the connection]
dsmythe has joined #ruby
jottr has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
lxsameer has joined #ruby
ur5us has joined #ruby
_joes_ has quit [Ping timeout: 258 seconds]
conta has quit [Ping timeout: 244 seconds]
ngw has joined #ruby
BH23 has quit [Ping timeout: 276 seconds]
jottr has joined #ruby
conta has joined #ruby
_joes_ has joined #ruby
BH23 has joined #ruby
_joes_ has quit [Remote host closed the connection]
_joes_ has joined #ruby
KeyJoo has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
marmotini has joined #ruby
marmotini_ has quit [Ping timeout: 245 seconds]
galaxie has quit [Ping timeout: 256 seconds]
galaxie has joined #ruby
kyrylo has joined #ruby
MihaRekar has joined #ruby
jottr has joined #ruby
MihaRekar has quit [Ping timeout: 250 seconds]
jottr has quit [Ping timeout: 245 seconds]
dhollinger has quit [Ping timeout: 245 seconds]
GodFather has quit [Ping timeout: 258 seconds]
iMadUtilsMan has quit [Ping timeout: 245 seconds]
dhollinger has joined #ruby
kapil____ has joined #ruby
jottr has joined #ruby
Dbugger has joined #ruby
dviola has quit [Quit: WeeChat 2.4]
jottr has quit [Ping timeout: 255 seconds]
marmotini_ has joined #ruby
ech0s7 has joined #ruby
<ech0s7>
hi
pwnd_nsfw` has joined #ruby
m_antis has joined #ruby
pwnd_nsfw has quit [Ping timeout: 255 seconds]
marmotini has quit [Ping timeout: 244 seconds]
<ech0s7>
I'm redefining the to_json method of the Hash class, here: https://rextester.com/WFIS61395. But how can I call the default(super= to_json method from my method?
<woodruffw>
quarters: yep, both should be linear/linear with some coefficient (since you're applying an additional test to the key)
teclator_ has joined #ruby
teclator has quit [Ping timeout: 258 seconds]
<towo>
Is there a simple way I can combine a regexp match on a string with an if clause and parsing the match data? So e.g. 'if foo.match?(bar) then puts "#{2}" end'
jmcgnh has joined #ruby
hightower2 has joined #ruby
jmcgnh has quit [Client Quit]
<towo>
To specify: yes, in my current instance I can reduce it to the string returned from the match, but this is assuming I actually wanted to parse the data; I could store the matchdata and do an if on it, of course, I was just wondering if there's a more elegant way to have it appropriately ephemeral
hightower2 has quit [Changing host]
hightower2 has joined #ruby
fphilipe_ has joined #ruby
vondruch has quit [Quit: vondruch]
fphilipe has quit [Ping timeout: 245 seconds]
vondruch has joined #ruby
ech0s7 has joined #ruby
alem0lars has quit [Remote host closed the connection]
alem0lars has joined #ruby
dsmythe has quit [Remote host closed the connection]
<phaul>
it's not really replacing though, the original implementation still exists at the same place, just that a SingletonClass jumped in front of it that now catches the method lookup ( as the new class of the object is its singleton class whose parent is the original class ).
jmcgnh has joined #ruby
<phaul>
very similar to module prepend, except that would affect all instances as opposed tojust one object
<ech0s7>
phaul: but in case then I would call the original method from the "patched" one?
<VG234>
When I try to load a file in to irb it just falls back to prompt: http://dpaste.com/08F01XT. Shouldn't it stay in irb?
<phaul>
you can just call super. super just goes further up in the class hierarchy, it doesnt care if it's a singleton class, a prepended module, or any other class
<ech0s7>
from line 9 I need to access to the field initialized in the outer function
<phaul>
yeah, my last example is 1:1 applicable, just rename the variables
<phaul>
str.define_singleton_method(:test) { @foobar } # it doesn't even have to be @, it can be just local var
<phaul>
blocks let outer scope local variables through. or in other word they are closures
postmodern has joined #ruby
jmcgnh has quit [Ping timeout: 245 seconds]
OneNeptune has joined #ruby
jmcgnh has joined #ruby
<ech0s7>
phaul: the problem with define_singleton_method() is that you cannot call the super
dionysus70 has joined #ruby
<phaul>
&>> a = 'cat' ; define_method(:init) { |obj| a.define_singleton_method(:upcase) { super + obj } }; init('!!!'); a.upcase
<rubydoc>
# => implicit argument passing of super from method defined by define_method() is not supported. Specify all... check link for more (https://carc.in/#/r/6tbn)
<ech0s7>
phaul: I'm getting this error: implicit argument passing of super from method defined by define_method() is not supported. Specify all arguments explicitly.
<ech0s7>
calling super
<phaul>
yeah just pass arguments explicitly ie super()
bmurt has joined #ruby
reber has quit [Read error: Connection reset by peer]
<CableNinja>
adam12, I think I sorted out my problem... I think... idk, I'm running on only a few hours of sleep. It seems that when using Threads/fork, you need to completely start the connection (TCPSocket/SSLSocket) within the thread, at least, thats what I think the problem ended up being. I stripped the entire start_client command into the loop that had the thread portion
jmcgnh has quit [Client Quit]
jmcgnh has joined #ruby
sp01nk has joined #ruby
OneNeptune has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]