Swyper has quit [Remote host closed the connection]
enix has joined #ruby
enix has left #ruby [#ruby]
AJA4351 has joined #ruby
Swyper has joined #ruby
AJA4350 has quit [Ping timeout: 246 seconds]
AJA4351 is now known as AJA4350
gheegh has joined #ruby
<gheegh>
hey all, anyone have a suggestion as to how to "memoize" a dynamic singleton class variable?
Swyper has quit [Ping timeout: 252 seconds]
<gheegh>
I've got a folder that has a bunch of files in it that i'm converting into class methods on a class. I just realized that one of hte problems is that its reloading them from disk every time it's called, versus just 1 time. I need to "memoize" them.. but i'm not sure exactly how to do that. Here's a gist.. imagine the files as something that i'm turning into Arrays..
<RougeR>
also anyone else got experience with resque, ive got a fair bit and am trying to implement some plugin logic
vondruch_ has joined #ruby
vondruch has quit [Ping timeout: 258 seconds]
vondruch_ is now known as vondruch
alexeev has quit [Remote host closed the connection]
alexeev has joined #ruby
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
deathwishdave has joined #ruby
AJA4350 has joined #ruby
Swyper has joined #ruby
waheedi has joined #ruby
Swyper has quit [Ping timeout: 268 seconds]
Swyper has joined #ruby
<zenspider>
gheegh: there's pretty simple ways around that... tho looking at your code, I'd start by pulling the File.read out of the define_method. Use the power of the closure.
Swyper has quit [Ping timeout: 252 seconds]
alem0lars has quit [Remote host closed the connection]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
Devalo has joined #ruby
alem0lars has joined #ruby
tdy has quit [Ping timeout: 252 seconds]
Devalo has quit [Ping timeout: 246 seconds]
dminuoso has joined #ruby
_joes_ has joined #ruby
segy has quit [Ping timeout: 250 seconds]
<dminuoso>
Is there a canonical way to feed build flags into native gems?
stooj has quit [Read error: Connection reset by peer]
stooj has joined #ruby
segy has joined #ruby
alexeev_ has joined #ruby
<dminuoso>
Specifically I see some mention of `gem install ... -- --build-flags [options]` but the behavior of those build flags is not clearly documented.
alexeev has quit [Ping timeout: 245 seconds]
_joes_ has quit [Ping timeout: 246 seconds]
Swyper has joined #ruby
mangold has joined #ruby
AJA4350 has quit [Quit: AJA4350]
lupine has quit [Ping timeout: 250 seconds]
dollyrocker has joined #ruby
dollyrocker has left #ruby [#ruby]
ldnunes has joined #ruby
lupine has joined #ruby
alexeev_ has quit [Remote host closed the connection]
alexeev has joined #ruby
stryek has joined #ruby
reber has joined #ruby
alexeev has quit [Remote host closed the connection]
raddazong has quit [Quit: leaving]
madhatter has joined #ruby
garyserj2 has joined #ruby
garyserj2 has quit [Client Quit]
garyserj2 has joined #ruby
garyserj has quit [Disconnected by services]
garyserj2 is now known as garyserj
m27frogy has quit [Ping timeout: 252 seconds]
conta has quit [Ping timeout: 272 seconds]
bmurt has joined #ruby
Swyper has quit [Ping timeout: 246 seconds]
tpanarch1st has quit [Ping timeout: 246 seconds]
m27frogy has joined #ruby
clemens3 has joined #ruby
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alexeev has joined #ruby
alexeev has quit [Remote host closed the connection]
r3m has quit [Quit: WeeChat 2.5-dev]
r3m has joined #ruby
conta1 has joined #ruby
iMadper|Sleepy has quit [Read error: Connection reset by peer]
mangold has quit [Quit: This computer has gone to sleep]
deathwishdave has joined #ruby
ams__ has joined #ruby
m27frogy has quit [Ping timeout: 250 seconds]
za1b1tsu has quit [Read error: Connection reset by peer]
za1b1tsu has joined #ruby
_joes_ has joined #ruby
conta1 has quit [Ping timeout: 245 seconds]
deathwishdave has quit [Read error: Connection reset by peer]
garyserj has quit [Ping timeout: 272 seconds]
jrafanie has joined #ruby
<adam12>
dminuoso: I _think_ it's related to how their extconf.rb file is configured. Options available in --build-flags are related to what enable_config methods are called in extconf.rb.
<adam12>
dminuoso: So it's likely up to the library author to provide access to specific build flags.
<adam12>
dminuoso: If this is what I think you're referring to, anyways.
lxsameer has quit [Ping timeout: 245 seconds]
jrafanie has quit [Ping timeout: 244 seconds]
<dminuoso>
adam12: Gotcha, I was already on that track patching a rather silly written library ruby-oci8 which simply fails to build on nix because the author thought it would be nice to deprecate and remove any dir_config controllable --with-oracle-instantclient flags..
<adam12>
dminuoso: Story of my life, since /usr/local/lib isn't in LD_LIBRARY_PATH on FreeBSD.
<dminuoso>
adam12: Ah that blows. Same library?
<dminuoso>
At least LD_LIBRARY_PATH is patchable with no effort. On nix I dont even have /sbin and some packages have hardcoded paths for that..
<dminuoso>
Not that Im trying to compare who is worse off..
<adam12>
dminuoso: Nope. I actually don't run into missing flags _too_ often, thankfully. Just some libraries (like sqlite) need a bit of help to compile.
za1b1tsu has quit [Remote host closed the connection]
griffindy has joined #ruby
jrafanie has joined #ruby
vondruch has quit [Ping timeout: 244 seconds]
Swyper has joined #ruby
renich has joined #ruby
grr12314 has quit [Remote host closed the connection]
Swyper has quit [Remote host closed the connection]
gnufied has joined #ruby
segy has quit [Ping timeout: 255 seconds]
segy has joined #ruby
mangold has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.4]
Dbugger has joined #ruby
bogn has joined #ruby
alexeev has joined #ruby
VladGh_ has quit [Read error: Connection reset by peer]
VladGh has joined #ruby
waheedi has quit [Quit: waheedi]
Devalo has joined #ruby
VladGh has quit [Remote host closed the connection]
VladGh has joined #ruby
hightower2 has quit [Ping timeout: 250 seconds]
dar123 has joined #ruby
Devalo has quit [Ping timeout: 245 seconds]
iNs_ has quit [Remote host closed the connection]
al2o3-cr has joined #ruby
TvL2386_ has joined #ruby
_joes_ has quit [Ping timeout: 244 seconds]
iNs has joined #ruby
TvL2386 has quit [Ping timeout: 255 seconds]
Swyper has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.4]
Swyper has quit [Ping timeout: 245 seconds]
renich has quit [Ping timeout: 272 seconds]
al2o3-cr has joined #ruby
i1nfusion has quit [Remote host closed the connection]
i1nfusion has joined #ruby
tdy has joined #ruby
bogn has quit [Quit: Konversation terminated!]
mistergibson has joined #ruby
bogn has joined #ruby
<mistergibson>
Question: anyone have docs on getting unicorn to listen to multiple IP addresses?
bogn has quit [Client Quit]
bogn has joined #ruby
bogn has quit [Client Quit]
bogn has joined #ruby
bogn has quit [Client Quit]
Swyper has joined #ruby
bogn has joined #ruby
_joes_ has joined #ruby
ams__ has quit [Quit: Connection closed for inactivity]
polishdub has joined #ruby
grilix has joined #ruby
<c-c>
mistergibson: a http-server?
<mistergibson>
c-c: yeah, it is a replacement (I'm thinking) for puma
<mistergibson>
c-c: I know how to make it do multiple ports on an IP, but I'd rather do A port on Many IPs
<c-c>
it sounds like "wha, mu-mu-multiple IP's?!" to me
<c-c>
how can your machine have multiple IP's
<c-c>
bbl
<t0x>
2 network cards
naught-fowl has joined #ruby
<t0x>
or maybe he wants load-balancing across a multiple of machines
beefjoe has joined #ruby
<havenwood>
mistergibson: you should be able to reverse proxy to the Unicorn socket from whatever you'd like
<mistergibson>
havenwood: yes, the key though is aligning the workers and IPs to proxy in the first place
<mistergibson>
I like HAProxy for that
<mistergibson>
or Nginx
<mistergibson>
I'll dork with unicorn configurator and see if I can bump into a solution'
<alexeev>
i think nginx would great resolve your problem
<alexeev>
but set host to 0.0.0.0 should also resolve the problem, isn't it?
Inline has joined #ruby
hightower2 has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
aufi_ has quit [Ping timeout: 246 seconds]
orbyt_ has joined #ruby
alexeev has quit [Remote host closed the connection]
Swyper has joined #ruby
alexeev has joined #ruby
alexeev_ has joined #ruby
rippa has joined #ruby
alexeev has quit [Read error: Connection reset by peer]
i1nfusion has quit [Remote host closed the connection]
alexeev has quit [Ping timeout: 252 seconds]
i1nfusion has joined #ruby
vovs03 has joined #ruby
mistergibson has quit [Quit: Leaving]
Devalo has joined #ruby
mikecmpbll has joined #ruby
waheedi has joined #ruby
Beams has quit [Quit: .]
kyrylo has joined #ruby
ruby-lang062 has joined #ruby
nowhere_man has joined #ruby
<ruby-lang062>
Hello people. I am working on a Sinatra project and I am using gem 'zip' and I am using this method: Zip::OutputStream.write_buffer It works as expected in my machine but when I run the container I have generated, it complains about uninitialized constant Zip::OutputStream
<ruby-lang062>
In my code I have the `require 'zip'` and it runs fine on my machine. In the Dockerfile I have installer zlib and also zlibdev but they both are installed already.
<ruby-lang062>
I am using ruby 2.3.8
RougeR has joined #ruby
RougeR is now known as Guest51022
Swyper has joined #ruby
<xco>
is there a way i can convert a string like this "2015-07-11T09:23:00+01:00" to a Ruby Time object?
<al2o3-cr>
xco: you have to require 'time' to use that method.
<xco>
al2o3-cr: :) Thanks :)
<al2o3-cr>
np
alem0lars has quit [Ping timeout: 250 seconds]
Swyper has quit [Ping timeout: 272 seconds]
tdy has quit [Ping timeout: 244 seconds]
Inline has quit [Quit: Leaving]
<xco>
al2o3-cr: if i do Time.iso8601(some_later_time) - Time.iso8601(some_earlier_time) i get some number (which i think is in seconds) does this subraction take into account timezones?
Guest51022 has quit [Ping timeout: 272 seconds]
<al2o3-cr>
hmm, not sure.
<xco>
ok :)
<al2o3-cr>
xco: i don't think it does, tbh.
<al2o3-cr>
wait, yes it does.
<xco>
i think to be sure i can convert both times to GMT before i do the substraction, that way i get a real value
kapil____ has quit [Quit: Connection closed for inactivity]
renich has joined #ruby
waheedi has quit [Quit: waheedi]
<xco>
you’re right, it does :) calculated manually :)
<al2o3-cr>
:)
<xco>
dealing with time is very tricky
<al2o3-cr>
it is.
<xco>
espcially if different timezones are concerne
<xco>
d
<havenwood>
i don't think i believe in time
i1nfusion has quit [Remote host closed the connection]
<xco>
me neither
<al2o3-cr>
me three
reber has joined #ruby
Brainium has quit [Quit: Konversation terminated!]
<xco>
sometimes i think about time and my mind gets messed up
i1nfusion has joined #ruby
agent_white has joined #ruby
englishm has quit [Quit: Updating details, brb]
cd has joined #ruby
i1nfusion has quit [Remote host closed the connection]
Swyper has joined #ruby
englishm has joined #ruby
englishm has quit [Excess Flood]
clemens3 has joined #ruby
englishm has joined #ruby
i1nfusion has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
ruby-lang062: Are they the same version? Zip::VERSION
<havenwood>
ruby-lang062: `require 'zip/output_stream'` has been in `zip.rb` for 6 years