baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.0, 2.3.3 & 2.2.6: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
whathappens has quit [Quit: Leaving...]
Rodya_ has joined #ruby
jcao219 has quit [Ping timeout: 240 seconds]
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
<leitz> Okay, new idea working in concept, code cleaned up and pushed up. Nappy time.
leitz has quit [Quit: Nappy time]
Yzguy has quit [Quit: Bye]
dionysus69 has quit [Ping timeout: 258 seconds]
ur5us_ has quit [Ping timeout: 240 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yokel has quit [Ping timeout: 240 seconds]
yokel has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
mim1k has joined #ruby
despai has quit [Ping timeout: 264 seconds]
eclm has quit [Read error: Connection reset by peer]
despai has joined #ruby
mim1k has quit [Ping timeout: 252 seconds]
BackEndCoder has quit [Excess Flood]
yokel has quit [Ping timeout: 260 seconds]
yokel has joined #ruby
BackEndCoder has joined #ruby
gloscombe_ has joined #ruby
VladGh_ has quit [Ping timeout: 245 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
despai has quit [Ping timeout: 268 seconds]
charliesome has joined #ruby
ecuanaso has joined #ruby
fredolinhares has quit [Quit: WeeChat 1.6]
SirOliver has joined #ruby
millerti has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
VladGh has joined #ruby
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardovich has joined #ruby
bmurt has joined #ruby
rkoller has quit [Quit: Textual IRC Client: www.textualapp.com]
bigtawm has joined #ruby
freddymungo has quit [Ping timeout: 260 seconds]
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
harfangk has joined #ruby
mim1k has joined #ruby
zotherstupidguy has joined #ruby
milardovich has quit [Ping timeout: 260 seconds]
EckT has quit [Ping timeout: 260 seconds]
Eiam_ has joined #ruby
yonatankoren has quit [Quit: ZNC 1.6.1 - http://znc.in]
pragmaticus has joined #ruby
<Eiam_> Is there a better way to assign a value to a hash if it doesn't exist? I was going with h = {}; h.fetch(key) { |key| h[key] = "some value"};
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
<Eiam_> feels a bit verbose but seemed to be the most sane way to do it
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<SeepingN> wh....what does that do?
mim1k has quit [Ping timeout: 264 seconds]
<Eiam_> SeepingN: it adds the value to the hash if it doesn't exist
<Eiam_> and if it does exist it just returns the value
<SeepingN> OIC
<SeepingN> not familiar with fetch. now I see
<Eiam_> meh just realized my hash needs arrays hung off each key. minor modification
genpaku has joined #ruby
<SeepingN> closest I do is x ||= {} to initialize a hash if it doesn't exist or leave it alone if it does
t-recx has quit [Quit: t-recx]
__Yiota has joined #ruby
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yokel has quit [Quit: leaving]
SirOliver has quit [Quit: ZZZzzz…]
johnzorn has quit [Read error: Connection reset by peer]
yokel has joined #ruby
johnzorn has joined #ruby
<al2o3-cr> Eiam_: Hash.new { |h, k| h[k] = "some value" } ?
<Eiam_> it'll just replace the value if it exists though
gusrub has quit [Remote host closed the connection]
<Eiam_> >> k = {}; k.fetch("yo") {|item| k[item] ||= []; k[item].push("dawg")}
<ruby[bot]> Eiam_: # => ["dawg"] (https://eval.in/738025)
enterprisey has joined #ruby
<Eiam_> think that'll get the hash key if it exists, if not, create it and push the value into it.
<al2o3-cr> oright yeah
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
jhack has quit [Quit: jhack]
<marchelzo> >> h = Hash.new { |h, k| h[k] = [] }; h['yo'].push('dawg')
<ruby[bot]> marchelzo: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
bkxd has joined #ruby
<marchelzo> ._.
<Eiam_> ;P
<Eiam_> fetch man, its safe
gusrub has joined #ruby
ur5us has joined #ruby
mim1k has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
marr has quit [Ping timeout: 264 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
enterprisey has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 256 seconds]
EckT has joined #ruby
mim1k has quit [Ping timeout: 276 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
esObe has quit [Remote host closed the connection]
<SeepingN> need ||=
ddffg has quit [Quit: Leaving]
nictrasavios has left #ruby ["Ex-Chat"]
esObe has joined #ruby
<Eiam_> hmm it still destroys each new iteration
esObe has quit [Ping timeout: 256 seconds]
longtran415 has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<marchelzo> i need life advice
<marchelzo> how do i get hired to work on rails apps
<marchelzo> i don't know rails
mlindahl has quit [Remote host closed the connection]
Channel6 has joined #ruby
mlindahl has joined #ruby
<havenwood> marchelzo: Learn you some Rails for great good. Then you can get hired. Or get hired then learn you some Rails.
<marchelzo> havenwood: how do i learn it though
<havenwood> marchelzo: Order optional. Books help.
<Eiam_> hmm, fetch won't always execute the block. damnit
<marchelzo> is it worth learning still i have no professional experience. is it a good way to start my career
<havenwood> marchelzo: Well, you can get a non-Rails Ruby job, but Rails is quite popular so its a good bet.
mim1k has joined #ruby
<havenwood> it's*
<Eiam_> block is only executed if fetch fails, not on top of the resulting value if it doesn't fail
<marchelzo> havenwood: how does rails work
<havenwood> marchelzo: Do you know what Rack is?
<Eiam_> well thats a topic with many books on it
<marchelzo> havenwood: nope
<Eiam_> marchelzo: I was hired to work on something that ended up being written in ruby and rails, I knew neither.
<havenwood> marchelzo: I'd suggest first creating a Rack app. Rails is one of many Rack adapters.
TPug has joined #ruby
<havenwood> marchelzo: It shouldn't take you long at all to create a Rack "Hello world" then go on to make a few routes and error codes.
<marchelzo> ok
<marchelzo> now this rack thing
<Eiam_> marchelzo: life advice, apply for places that hire people to solve problems not people who know <x> technology
<havenwood> marchelzo: At that point you'll see why you want to use something other than Rack. Then make a Roda app, and read through each of the Roda plugins - to see what all else you might want to bring to a framework.
<havenwood> marchelzo: Then look at Rails.
mlindahl has quit [Ping timeout: 268 seconds]
<Eiam_> that rails app I was hired to work on, long gone, replaced by various bits of Closure, Python and other things. guess im the outlier .
<marchelzo> does rack come with an http server
<havenwood> marchelzo: https://rack.github.io/
<marchelzo> can i use rails apps with nginx through fastcgi
cgibsonmm has joined #ruby
zacts has joined #ruby
<Eiam_> rack uses webrick by default I thought
<havenwood> marchelzo: You typically reverse proxy from Nginx to the socket or port of your Rack Webserver.
<marchelzo> so people use the rack webserver in production?
<havenwood> marchelzo: Yes.
mim1k has quit [Ping timeout: 260 seconds]
<havenwood> marchelzo: There are many Rack apps. Or there are simple Rack adapters like Sinatra or Roda. Or convention-based ones like Rails or Hanami.
<marchelzo> i see
<marchelzo> once i get familiar with rack, and look at roda, how should i learn about rails
<havenwood> marchelzo: Read a book on Rails. Or even just start with the Rails docs. They're pretty good.
<havenwood> marchelzo: If you know Rack and Roda and are familiar with the Roda plugins, then a lot of what Rails adds will become apparent.
<havenwood> marchelzo: A book will guide you from routes to controllers, models and views. Rails has many labeled drawers to put things in.
geekb4ck has joined #ruby
marxarelli is now known as marxarelli|afk
<havenwood> marchelzo: It's worth knowing how to make a simple Rack app, Sinatra/Roda app, and Rails/Hanami app.
<marchelzo> whhat is the best rails book
<havenwood> marchelzo: Rails 4 in Action (written by Radar) is often recommended: https://www.manning.com/books/rails-4-in-action
<havenwood> written by Radar and friends*
<marchelzo> excellent
Rodya_ has quit [Remote host closed the connection]
<cgibsonmm> I have a question on nested resources, I have a nested ads controller inside of mags controller, When I link to new_mag_ads_path(@mag, @ads) I need to be able to access the @mag.id and I am not having luck.
gloscombe_ has quit [Quit: gloscombe_]
<havenwood> marchelzo: Take a look at these "Hello world"s written in various Rack adapters and Rack itself: https://github.com/luislavena/bench-micro
<cgibsonmm> ActiveRecord::RecordNotFound at /mag/3/ads/new, Couldn't find Item with 'id'=
Rodya_ has joined #ruby
<marchelzo> havenwood: this is cool
AndrewIsHere has quit []
<havenwood> marchelzo: Note in the Rack on you have to manually parse the Rack env Hash: https://github.com/luislavena/bench-micro/blob/master/apps/rack.ru
username_ has quit [Ping timeout: 245 seconds]
JeanCarloMachado has quit [Read error: Connection reset by peer]
<marchelzo> i thought Sinatra was simple
<marchelzo> it makes more allocations/request and handles fewer requests/sec
mim1k has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<marchelzo> than rails*
rfoust has joined #ruby
mim1k has quit [Ping timeout: 255 seconds]
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
cgibsonmm has quit []
JeanCarloMachado has joined #ruby
_whitelogger has joined #ruby
<geekb4ck> anyone able to help me sort out why im able to interact with a UNIXSocket using 'socat' with no problem but can't 's = UNIXSocket.new("path")' and then 's.write'. write never completes it looks like
TheHodge has quit [Quit: Connection closed for inactivity]
raspado has quit [Remote host closed the connection]
<fowlduck> code showing the behavior might help us help you
<eam> geekb4ck: bind vs connect
<eam> UNIXSocket.new is doing a bind
skweek has joined #ruby
<eam> and I'm assuming you want to connect to an existing socket?
<geekb4ck> eam: yes. a daemon has opened the socket and im trying to write to it and read the response
<eam> use #open
jameser has joined #ruby
jc_io has quit [Quit: WeeChat 0.3.7]
<eam> wait let me make sure I'm giving you the right advice
mim1k has joined #ruby
<geekb4ck> i've seen some code regarding HAProxy but haven't found much else
<eam> nah I have it backwards, #new should be connect() and #open should be bind()
<eam> what crummy names
bkxd has joined #ruby
brent__ has quit [Ping timeout: 240 seconds]
<eam> geekb4ck: easiest thing: strace each and compare
<eam> what's your socat invocation?
mim1k has quit [Ping timeout: 240 seconds]
<geekb4ck> socat - unix-connect:/var/run/dokku-daemon/dokku-daemon.sock
<geekb4ck> when i type "help" and hit enter, the response comes back through the socket
<eam> try s.syswrite
<geekb4ck> i've modified the daemon side and added a bunch of locations to have it log where it is and have found that the server side is not receiving the input. its starting a listener for the input but it never finishes receiving the data.
<eam> is it even writing?
<eam> one no-no is using buffered io and socketes
bkxd has quit [Ping timeout: 268 seconds]
ocbtec has quit [Quit: leaving]
gusrub has quit []
raul782 has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Chagel has joined #ruby
jhack has joined #ruby
milardovich has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
<geekb4ck> dang. im having zero luck.
<marchelzo> :/
safetypin has joined #ruby
<marchelzo> i believe in you geekb4ck
safetypin has quit [Client Quit]
kht has joined #ruby
mim1k has joined #ruby
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #ruby
mlindahl has joined #ruby
jhack has quit [Quit: jhack]
raul782 has joined #ruby
zeroDi has quit [Quit: WeeChat 1.7]
milardovich has quit [Remote host closed the connection]
mim1k has quit [Ping timeout: 255 seconds]
charliesome has joined #ruby
milardovich has joined #ruby
jhack has joined #ruby
bmurt has joined #ruby
montanonic has quit [Ping timeout: 260 seconds]
TPug has quit [Quit: Textual IRC Client: www.textualapp.com]
milardovich has quit [Ping timeout: 240 seconds]
raul782 has quit [Ping timeout: 276 seconds]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
freddymungo has joined #ruby
JeanCarloMachado has joined #ruby
bigtawm has quit [Ping timeout: 256 seconds]
sepp2k has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
newrubycoder has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
tolerablyjake has joined #ruby
montanonic has joined #ruby
xall has joined #ruby
jose_leeto has joined #ruby
tolerablyjake has quit [Ping timeout: 256 seconds]
ResidentBiscuit has joined #ruby
mim1k has joined #ruby
Derperperd has quit [Max SendQ exceeded]
Derperperd has joined #ruby
gnufied has quit [Remote host closed the connection]
ecuanaso has joined #ruby
marxarelli|afk is now known as marxarelli
ResidentBiscuit has quit [Ping timeout: 256 seconds]
marxarelli is now known as marxarelli|afk
Rodya_ has quit [Quit: Leaving...]
mim1k has quit [Ping timeout: 268 seconds]
nismo has joined #ruby
_djbkd has quit [Quit: My people need me...]
Puffball has quit [Remote host closed the connection]
Channel6 has quit [Quit: Leaving]
P1ro has joined #ruby
cdg has joined #ruby
shinnya has joined #ruby
Puffball has joined #ruby
xall has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
__Yiota has joined #ruby
kht has quit [Ping timeout: 268 seconds]
brent__ has joined #ruby
case__ has joined #ruby
Chagel has quit [Ping timeout: 260 seconds]
Chagel has joined #ruby
brent__ has quit [Ping timeout: 256 seconds]
chris____ has joined #ruby
amclain has quit [Quit: Leaving]
jdm has quit [Remote host closed the connection]
mim1k has joined #ruby
bkxd has joined #ruby
d^sh_ has quit [Ping timeout: 258 seconds]
d^sh has joined #ruby
xall has joined #ruby
nismo has quit [Ping timeout: 260 seconds]
tvw has quit [Ping timeout: 255 seconds]
bkxd has quit [Ping timeout: 240 seconds]
rkazak_ has joined #ruby
dc2 has quit [Ping timeout: 240 seconds]
Definity has quit [Ping timeout: 260 seconds]
mim1k has quit [Ping timeout: 256 seconds]
rkazak has quit [Ping timeout: 240 seconds]
rkazak_ is now known as rkazak
tusharmalik has joined #ruby
jhack has quit [Quit: jhack]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
csk157_ has joined #ruby
bruce_lee has quit [Ping timeout: 260 seconds]
bruce_lee has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
sarbs has quit [Ping timeout: 252 seconds]
csk157_ has quit [Ping timeout: 245 seconds]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
gnufied has joined #ruby
pilne has quit [Quit: Quitting!]
mim1k has joined #ruby
JeanCarloMachado has joined #ruby
tusharmalik has quit [Ping timeout: 240 seconds]
sarbs has joined #ruby
mim1k has quit [Ping timeout: 258 seconds]
Derperperd has quit [Max SendQ exceeded]
Derperperd has joined #ruby
beilabs has joined #ruby
cdg has quit [Remote host closed the connection]
Derperperd has quit [Max SendQ exceeded]
astrobunny has joined #ruby
Derperperd has joined #ruby
hahuang61 has quit [Ping timeout: 264 seconds]
nankyokusei has joined #ruby
brent__ has joined #ruby
saneax-_-|AFK is now known as saneax
elifoster has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
Klumben has quit [Ping timeout: 240 seconds]
alem0lars has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
shinnya has quit [Ping timeout: 240 seconds]
mwlang has joined #ruby
cschneid_ has joined #ruby
stevenhong has joined #ruby
cschneid_ has quit [Ping timeout: 276 seconds]
Chagel has quit [Ping timeout: 264 seconds]
djbkd has joined #ruby
cgibsonmm has joined #ruby
minimalism has joined #ruby
jose_leeto has quit [Quit: Leaving.]
govg has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
enterprisey has joined #ruby
Joufflu has joined #ruby
bkxd has joined #ruby
cgibsonmm has quit []
mim1k has quit [Ping timeout: 240 seconds]
brent__ has quit [Read error: Connection reset by peer]
xall has quit [Ping timeout: 258 seconds]
brent__ has joined #ruby
xall has joined #ruby
bkxd has quit [Ping timeout: 245 seconds]
csk has joined #ruby
brent__ has quit [Remote host closed the connection]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
charliesome has quit [Read error: Connection reset by peer]
bheesham has joined #ruby
charliesome has joined #ruby
braincrash has quit [Quit: bye bye]
mwlang has quit [Quit: mwlang]
hahuang61 has joined #ruby
Cohedrin has joined #ruby
Klumben has joined #ruby
Silthias1 has joined #ruby
Silthias has quit [Ping timeout: 252 seconds]
alem0lars has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
govg has joined #ruby
mim1k has joined #ruby
hahuang61 has quit [Ping timeout: 240 seconds]
d^sh has quit [Ping timeout: 260 seconds]
nanoz has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
nofxx has quit [Ping timeout: 258 seconds]
EckT has quit [Read error: Connection reset by peer]
d^sh has joined #ruby
Chagel has joined #ruby
freddymungo_ has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
nofxx has joined #ruby
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #ruby
freddymungo has quit [Ping timeout: 240 seconds]
Chagel has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 255 seconds]
JeanCarloMachado has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
electrostat has quit [Quit: uwotm8]
electrostat has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
bkxd has joined #ruby
JeanCarloMachado has joined #ruby
patarr has joined #ruby
mlindahl has quit []
xall has quit [Ping timeout: 260 seconds]
raul782 has joined #ruby
gix has quit [Ping timeout: 260 seconds]
bkxd has quit [Ping timeout: 240 seconds]
stevenhong has quit [Remote host closed the connection]
patarr has quit [Ping timeout: 256 seconds]
nowhere_man has quit [Ping timeout: 276 seconds]
cschneid_ has joined #ruby
gix has joined #ruby
freddymungo_ has quit [Ping timeout: 260 seconds]
mim1k has joined #ruby
nofxx has quit [Ping timeout: 268 seconds]
stevenhong has joined #ruby
cschneid_ has quit [Ping timeout: 256 seconds]
braincrash has joined #ruby
CloCkWeRX has quit [Ping timeout: 240 seconds]
cbasites has joined #ruby
chris____ has quit [Ping timeout: 240 seconds]
jcao219 has joined #ruby
JeanCarloMachado has quit [Ping timeout: 276 seconds]
JeanCarloMachado has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
CloCkWeRX has joined #ruby
stevenhong has quit [Ping timeout: 276 seconds]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
raul782 has quit [Remote host closed the connection]
al2o3-cr_ has joined #ruby
saneax is now known as saneax-_-|AFK
stevenhong has joined #ruby
al2o3-cr has quit [Ping timeout: 260 seconds]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xall has joined #ruby
stevenhong has quit [Ping timeout: 240 seconds]
saneax-_-|AFK is now known as saneax
ecuanaso has joined #ruby
stevenhong has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nankyokusei has joined #ruby
Coldblackice_ has quit []
stevenhong has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
UnknownSoldier has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
marchelzo has quit [Quit: marchelzo]
nankyokusei has quit [Ping timeout: 240 seconds]
stevenhong has joined #ruby
charliesome has joined #ruby
nanoz has quit [Read error: Connection reset by peer]
jeyraof^mbpr has joined #ruby
advorak has joined #ruby
Chagel has joined #ruby
stevenhong has quit [Ping timeout: 260 seconds]
mim1k has joined #ruby
stevenhong has joined #ruby
mim1k has quit [Ping timeout: 255 seconds]
jeyraof^mbpr has quit [Quit: This computer has gone to sleep]
jeyraof^mbpr has joined #ruby
Chagel has quit [Ping timeout: 264 seconds]
Chagel has joined #ruby
stevenhong has quit [Remote host closed the connection]
squ has joined #ruby
stevenhong has joined #ruby
anisha has joined #ruby
bkxd has joined #ruby
mim1k has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
JeanCarloMachado has joined #ruby
stevenhong has quit [Ping timeout: 264 seconds]
mim1k has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 268 seconds]
kylo_ has joined #ruby
grh has joined #ruby
bigtawm has joined #ruby
chris____ has joined #ruby
stevenhong has joined #ruby
saneax is now known as saneax-_-|AFK
mim1k has joined #ruby
naprimer_2 has quit [Ping timeout: 260 seconds]
versigtig has quit [Quit: This computer has gone to sleep]
versigtig has joined #ruby
versigtig has quit [Client Quit]
versigtig has joined #ruby
Sammichmaker has joined #ruby
Sammichmaker has joined #ruby
Sammichmaker has quit [Changing host]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
versigtig has quit [Client Quit]
ifctj has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
advorak has quit [Quit: This computer has gone to sleep]
grh has quit [Ping timeout: 260 seconds]
hotpancakes has quit [Ping timeout: 256 seconds]
hutch34 has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
cagmz has quit [Read error: Connection reset by peer]
hutch34 has quit [Ping timeout: 264 seconds]
toretore has joined #ruby
elifoster has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
govg has quit [Ping timeout: 252 seconds]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
andrewdvorak has joined #ruby
chris____ has quit [Ping timeout: 240 seconds]
saneax-_-|AFK is now known as saneax
bkxd has joined #ruby
patarr has joined #ruby
eb0t_ is now known as eb0t
def_jam is now known as eblip
Anonymoose2 has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
patarr has quit [Ping timeout: 258 seconds]
synstack has joined #ruby
reverberations has quit [Ping timeout: 256 seconds]
bigkevmcd has joined #ruby
bigtawm has quit [Ping timeout: 256 seconds]
s0l__ has joined #ruby
braincrash has quit [Ping timeout: 240 seconds]
18WAAKD4C has quit [Ping timeout: 252 seconds]
andrewdvorak has quit [Quit: This computer has gone to sleep]
Immune has joined #ruby
raul782 has joined #ruby
govg has joined #ruby
LoneHerm_ has joined #ruby
jgnagy has quit [Remote host closed the connection]
andrewdvorak has joined #ruby
andrewdvorak has quit [Client Quit]
Derperperd has quit [Ping timeout: 240 seconds]
ecuanaso has joined #ruby
Clarity has joined #ruby
lxsameer has joined #ruby
jamesaxl has joined #ruby
ifctj has quit [Read error: Connection reset by peer]
ifctj has joined #ruby
JoshS has quit [Quit: Leaving]
neuraload has joined #ruby
jdm has joined #ruby
JeanCarloMachado has quit [Ping timeout: 256 seconds]
esObe has joined #ruby
esObe has quit [Remote host closed the connection]
bkxd has joined #ruby
JeanCarloMachado has joined #ruby
esObe has joined #ruby
braincrash has joined #ruby
nankyokusei has joined #ruby
hotpancakes has joined #ruby
last_staff has joined #ruby
esObe has quit [Ping timeout: 240 seconds]
andikr has joined #ruby
nankyokusei has quit [Ping timeout: 276 seconds]
aglorei has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 264 seconds]
hotpancakes has quit [Ping timeout: 258 seconds]
aglorei has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
govg has quit [Ping timeout: 240 seconds]
ifctj has quit [Ping timeout: 240 seconds]
hahuang61 has joined #ruby
conta has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
bheesham has quit [Ping timeout: 256 seconds]
bkxd has quit [Ping timeout: 240 seconds]
hahuang61 has quit [Ping timeout: 260 seconds]
lenwood has joined #ruby
al2o3-cr_ has quit [Ping timeout: 240 seconds]
terens has quit [Remote host closed the connection]
grh has joined #ruby
govg has joined #ruby
manjaro-kde5_ has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
lenwood has quit [Ping timeout: 255 seconds]
Qchmqs has joined #ruby
enterprisey has quit [Remote host closed the connection]
Tempesta has joined #ruby
ta has quit [Remote host closed the connection]
Tempesta has quit [Client Quit]
Tempesta has joined #ruby
p1p10l0 has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
csk157_ has joined #ruby
raul782 has quit [Remote host closed the connection]
milardovich has joined #ruby
aufi has joined #ruby
biberu has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
montanonic has quit [Ping timeout: 240 seconds]
xall has quit [Ping timeout: 240 seconds]
DaniG2k has joined #ruby
aganov has joined #ruby
djbkd has quit [Quit: My people need me...]
Pumukel has joined #ruby
Snickers has joined #ruby
raul782 has joined #ruby
Pumukel has quit [Read error: Connection reset by peer]
xall has joined #ruby
TomyWork has joined #ruby
raul782 has quit [Ping timeout: 264 seconds]
dionysus69 has joined #ruby
Pumukel has joined #ruby
mark_66 has joined #ruby
Mortomes|Work has joined #ruby
DaniG2k has quit [Quit: leaving]
djbkd has joined #ruby
antgel has joined #ruby
Burgestrand has joined #ruby
ifctj has joined #ruby
noan has joined #ruby
aupadhye has joined #ruby
ifctj has quit [Ping timeout: 260 seconds]
kylo_ has quit [Ping timeout: 260 seconds]
fkiejs has joined #ruby
hutch34 has joined #ruby
ta has joined #ruby
despai has joined #ruby
<Bish> is there a shortcut for
<Bish> > x=3;"something_#{x}".to_sym
TomyWork has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
JeanCarloMachado has quit [Ping timeout: 264 seconds]
yokel has quit [Ping timeout: 264 seconds]
yokel has joined #ruby
blaxter has joined #ruby
TomyWork has joined #ruby
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
bkxd has quit [Ping timeout: 260 seconds]
fkiejs has quit [Remote host closed the connection]
<noan> what's the 'right' way to handle importing everything in to a ruby project? Is it really just to require_relative basically everything? And how would one go about exposing a singleton object to many many files without fear of creating duplicates?
<herwin> isn't the definition of a singleton object that you can't create duplicates?
<toretore> the right way is to `require 'file'` at the top of each file where 'foo' is used
blaxter has quit [Quit: foo]
<noan> herwin, I haven't touched ruby in a couple years... so yeah, that's the desire. I am not sure how much I trust myself to do it right in ruby though. Ruby is very very permissive
teclator_ has quit [Ping timeout: 276 seconds]
<noan> toretore, is it acceptable practice to create a rackup file and just recursively grab up everything? Ie. models, controllers, the like? For context, I am creating a sinatra project.
jenrzzz has joined #ruby
<toretore> no
<toretore> in each file, require what you need
Silthias1 has quit [Ping timeout: 240 seconds]
<noan> if A requires B requires C, each at the top of the file, does A see C?
patarr has joined #ruby
<toretore> if A requires B, it should `require 'b'`, no more, no less
<noan> that's what I mean
<noan> a.rb at the top calls require 'b'. b at the top calls require 'c'. Is c exposed in a?
<herwin> that's pretty easy just to try out
<toretore> whether A can "see" C or not is irrelevant. if you have an explicit dependency in A on C, then A should require 'c'
govg has quit [Ping timeout: 240 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<toretore> but you shall not rely on the fact that B requires C to use C in a without declaring this dependency explicitly
csk157_ has quit [Quit: WeeChat 1.7]
<noan> In that context I was more concerned with 'bleed through'
<noan> and namespace pollution
govg has joined #ruby
csk157 has joined #ruby
<toretore> everything that's required is available globally
<toretore> so namespacing is something you have to do yourself
Sp4rKy_ has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
patarr has quit [Ping timeout: 255 seconds]
Silthias has joined #ruby
<noan> okay good to know. now I'm trying to figure out how ruby handles the case of multiple different files requiring the same dependency where the dependency defines something I only ever want to exist once, namely my database connection pool.
<toretore> requiring a file should not result in something like that
yokel has quit [Ping timeout: 260 seconds]
<noan> so if I have db.rb that defines DB = Sequel.connect(..... each model.rb file should be able to safely require that in?
mim1k has joined #ruby
<toretore> it should be: `require 'db/pool'; my_pool = DB::Pool.new`
<toretore> you should not have that in a file and require it
loechel has joined #ruby
<noan> okay, so then the DB should be required only once, in say the app context? Then models required after would have that exposed to them? or should it be passed to them later as an argument?
<toretore> it should be passed
nowhere_man has joined #ruby
mikecmpbll has joined #ruby
<toretore> the first option is relying on external state that may or may not be there, which causes all sorts of problems
nowhere_man has quit [Client Quit]
yokel has joined #ruby
Pumukel has quit [Ping timeout: 245 seconds]
jsrn has joined #ruby
nowhere_man has joined #ruby
nowhere_man has quit [Client Quit]
loechel has quit [Read error: Connection reset by peer]
mim1k has quit [Ping timeout: 240 seconds]
Pumukel has joined #ruby
nowhereman has joined #ruby
<noan> hmm, I think Sequel models by default look for something named "DB" in the global namespace.
nowhereman has quit [Read error: Connection reset by peer]
nowhereman has joined #ruby
<toretore> yes, unfortunately
nowhereman has quit [Client Quit]
rippa has joined #ruby
nowhereman has joined #ruby
pandaant has joined #ruby
jgnagy has joined #ruby
nowhereman has quit [Client Quit]
nowhereman has joined #ruby
Derperperd has joined #ruby
jcao219 has quit [Ping timeout: 240 seconds]
jgnagy has quit [Ping timeout: 264 seconds]
nowhereman has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
cschneid_ has joined #ruby
Derperperd has quit [Ping timeout: 276 seconds]
tomphp has joined #ruby
CloCkWeRX has joined #ruby
BackEndCoder has quit [Excess Flood]
<Burgestrand> noan in ruby, `require`ing the same file twice will only evaluate it once, as long as it's in the same path
jcao219 has joined #ruby
BackEndCoder has joined #ruby
<Burgestrand> noan it's because `require`d files end up in $LOADED_FEATURES, and if a required file's path match one of those in $LOADED_FEATURES it won't be pulled in again
astrobunny has quit [Remote host closed the connection]
djbkd has quit []
<Burgestrand> noan it is not uncommon to have a `config.rb` that sets up things like `DB = …` or other one-off globals/singletons
aryaching_ has joined #ruby
<noan> Burgestrand, cheers
CloCkWeRX has quit [Client Quit]
CloCkWeRX has joined #ruby
cschneid_ has quit [Ping timeout: 276 seconds]
aryaching has quit [Ping timeout: 240 seconds]
jcao219 has quit [Ping timeout: 256 seconds]
TheHodge has joined #ruby
<Burgestrand> noan oh and one last thing, it's also not crazy to expect to have some kind of environment set up before you without explicitly requiring `config.rb` in every file, so it's OK to require `config.rb` from `app.rb` before requiring all your other dependencies
<Burgestrand> noan I came a bit late to the party but I wanted to give a slightly different perspective than the one you were given :P
<noan> I appreciate it. Last time I worked in ruby it was in a rails context, which obviously does have a lot of the environment setup idea going on
jenrzzz has joined #ruby
despai has quit [Ping timeout: 258 seconds]
despai has joined #ruby
despai has quit [Client Quit]
loechel has joined #ruby
<Burgestrand> noan most non-rails things tend to end up with a bug-ridden poor implementation of rails anyways, it's expected to be a bit lost :)
nankyokusei has joined #ruby
<Burgestrand> noan (if you're still doing web that is)
<noan> I am
<noan> I'm trying to quickly scaffold a test-api for a game I'm working on
<noan> if it ever gets near to a real usable form, I'll throw the ruby api away in favour of something faster
<noan> this is just meant as a prototype
govg has quit [Ping timeout: 240 seconds]
<Burgestrand> noan that makes sense!
<Burgestrand> I'm quite comfortable doing non-rails web things, but it's easy to fall into the trap of inventing your own web framework instead of actually doing what you wanted to do in the first place :P
despai has joined #ruby
<noan> oh yeah screw that
<noan> I'm just using sinatra and sequel
hotpancakes has joined #ruby
Pumukel has quit [Ping timeout: 245 seconds]
<noan> give me some to and from json, some endpoints, a couple connection filters, and I'm happy
<noan> :3
nankyokusei has quit [Ping timeout: 276 seconds]
jud has quit [Read error: Connection reset by peer]
jud has joined #ruby
<Burgestrand> :)
bkxd has joined #ruby
Luna_Moonfang has quit [Remote host closed the connection]
Luna_Moonfang has joined #ruby
hotpancakes has quit [Ping timeout: 276 seconds]
teclator has joined #ruby
govg has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
loechel has quit [Read error: Connection reset by peer]
Pumukel has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
minimalism has quit [Ping timeout: 260 seconds]
Tharbakim has quit [Ping timeout: 252 seconds]
minimalism has joined #ruby
nettoweb has joined #ruby
yeticry has joined #ruby
hahuang61 has joined #ruby
Tharbakim has joined #ruby
Fernando-Basso has joined #ruby
marr has joined #ruby
yeticry_ has quit [Ping timeout: 264 seconds]
nettoweb has quit [Client Quit]
aryaching has joined #ruby
Tharbakim has quit [Excess Flood]
Tharbakim has joined #ruby
hahuang61 has quit [Ping timeout: 245 seconds]
aryaching_ has quit [Ping timeout: 240 seconds]
despai has quit [Read error: Connection reset by peer]
despai has joined #ruby
Beams has joined #ruby
dionysus69 has quit [Ping timeout: 258 seconds]
radic has quit [Ping timeout: 240 seconds]
SirOliver has joined #ruby
yokel has quit [Ping timeout: 260 seconds]
ketan has quit [Remote host closed the connection]
ketan has joined #ruby
govg has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
neuraload has quit [Quit: Leaving]
Sp4rKy_ has quit [Quit: leaving]
yokel has joined #ruby
neuraload has joined #ruby
despai has quit [Ping timeout: 260 seconds]
grh has quit [Ping timeout: 260 seconds]
milardovich has joined #ruby
Sp4rKy has quit [Quit: leaving]
csk157 has quit [Quit: WeeChat 1.7]
Sp4rKy has joined #ruby
ych has joined #ruby
Sp4rKy is now known as Guest89584
aryaching_ has joined #ruby
milardovich has quit [Ping timeout: 252 seconds]
davezd has joined #ruby
Guest89584 has quit [Quit: Reconnecting]
jamesaxl has quit [Read error: Connection reset by peer]
Sp4rKy_ has joined #ruby
aryaching has quit [Ping timeout: 276 seconds]
lxsameer has quit [Quit: WeeChat 1.6]
despai has joined #ruby
jamesaxl has joined #ruby
vondruch has quit [Quit: vondruch]
despai has quit [Client Quit]
pragmaticus has quit [Ping timeout: 276 seconds]
Sp4rKy_ has quit [Changing host]
Sp4rKy_ has joined #ruby
hotpancakes has joined #ruby
jeyraof^mbpr has quit [Quit: This computer has gone to sleep]
Pumukel has quit [Remote host closed the connection]
grh has joined #ruby
freddymungo_ has joined #ruby
loechel has joined #ruby
hotpancakes has quit [Ping timeout: 245 seconds]
Sp4rKy_ is now known as Sp4rKy
nettoweb has joined #ruby
ChampagneHouse has joined #ruby
JoshS has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
vondruch has joined #ruby
aryaching_ has quit [Ping timeout: 260 seconds]
centrx has joined #ruby
centrx has joined #ruby
centrx has quit [Changing host]
zotherstupidguy has quit [Ping timeout: 264 seconds]
ChampagneHouse is now known as NeverTired
ldnunes has joined #ruby
yokel has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
nofxx has quit [Ping timeout: 256 seconds]
yokel has joined #ruby
zipp0 has joined #ruby
zipp0 has left #ruby [#ruby]
stevenhong has quit [Remote host closed the connection]
ledestin has quit [Quit: Textual IRC Client: www.textualapp.com]
dman[m] has left #ruby ["User left"]
csk157 has joined #ruby
hutch34 has quit [Ping timeout: 258 seconds]
ddffg has joined #ruby
Burgestrand has quit [Quit: Closing time!]
Rutix has quit []
JeanCarloMachado has joined #ruby
Burgestrand has joined #ruby
jaruga______ has joined #ruby
govg has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
patarr has joined #ruby
jameser has quit [Ping timeout: 260 seconds]
jdm has quit [Read error: Connection reset by peer]
JeanCarloMachado has joined #ruby
patarr has quit [Ping timeout: 268 seconds]
browndawg has joined #ruby
SirOliver has quit [Quit: ZZZzzz…]
nettoweb has quit [Quit: Textual IRC Client: www.textualapp.com]
elementaru has joined #ruby
grh has quit [Ping timeout: 260 seconds]
Pumukel has joined #ruby
loechel has quit [Ping timeout: 245 seconds]
blackmesa has joined #ruby
Derperperd has joined #ruby
blackmesa has quit [Client Quit]
blackmesa has joined #ruby
LambdaSi1 is now known as LambdaSix
lxsameer has joined #ruby
Derperperd has quit [Ping timeout: 240 seconds]
braincrash has quit [Ping timeout: 240 seconds]
grh has joined #ruby
colegatron has joined #ruby
saneax is now known as saneax-_-|AFK
nettoweb has joined #ruby
SirOliver has joined #ruby
tvw has joined #ruby
braincrash has joined #ruby
csk has quit [Quit: ZZZzzz…]
Chagel has quit [Ping timeout: 268 seconds]
duper has quit [Read error: Connection reset by peer]
xall_ has joined #ruby
Chagel has joined #ruby
xall has quit [Ping timeout: 260 seconds]
nankyokusei has joined #ruby
vondruch has quit [Quit: vondruch]
jgnagy has joined #ruby
SirOliver has quit [Quit: ZZZzzz…]
braincrash has quit [Ping timeout: 245 seconds]
tildes has joined #ruby
nankyokusei has quit [Ping timeout: 245 seconds]
squ_ has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
xall_ has quit [Ping timeout: 255 seconds]
squ has quit [Ping timeout: 245 seconds]
SirOliver has joined #ruby
ggaeit has joined #ruby
Chagel has quit [Ping timeout: 276 seconds]
Ishido has joined #ruby
squ has joined #ruby
squ has quit [Remote host closed the connection]
squ_ has quit [Ping timeout: 260 seconds]
saneax-_-|AFK is now known as saneax
beilabs has quit []
bheesham has joined #ruby
manjaro-kde5_ has quit [Ping timeout: 240 seconds]
manjaro-kde5_ has joined #ruby
Burgestrand has quit [Quit: Closing time!]
patarr has joined #ruby
bheesham has quit [Ping timeout: 256 seconds]
pearlus has joined #ruby
jaruga______ has quit [Quit: jaruga______]
lynxer has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
Burgestrand has joined #ruby
govg has quit [Ping timeout: 260 seconds]
yokel has quit [Ping timeout: 260 seconds]
patarr has quit [Ping timeout: 258 seconds]
hotpancakes has joined #ruby
Burgestrand has quit [Read error: Connection reset by peer]
padi_ has joined #ruby
Burgestrand has joined #ruby
Silthias1 has joined #ruby
SirOlive_ has joined #ruby
braincrash has joined #ruby
Silthias has quit [Ping timeout: 252 seconds]
SirOliver has quit [Ping timeout: 240 seconds]
yokel has joined #ruby
Silthias has joined #ruby
Silthias1 has quit [Ping timeout: 240 seconds]
padi_ has quit [Ping timeout: 258 seconds]
hotpancakes has quit [Ping timeout: 258 seconds]
nadir has quit [Quit: Connection closed for inactivity]
SirOlive_ has quit [Quit: Ave]
milardovich has joined #ruby
naprimer has joined #ruby
braincrash has quit [Ping timeout: 240 seconds]
advorak has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
jcao219 has joined #ruby
nettoweb has quit [Quit: Textual IRC Client: www.textualapp.com]
nettoweb has joined #ruby
xall_ has joined #ruby
dionysus69 has joined #ruby
despai has joined #ruby
vondruch has joined #ruby
SirOliver has joined #ruby
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
davezd has quit [Ping timeout: 256 seconds]
manjaro-kde5_ has quit [Ping timeout: 255 seconds]
SirOliver has quit [Quit: ZZZzzz…]
SirOliver has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xall_ has quit [Ping timeout: 258 seconds]
jose_leeto has joined #ruby
vondruch has quit [Quit: vondruch]
Burgestrand has quit [Quit: Closing time!]
aryaching has joined #ruby
vondruch has joined #ruby
tyang has joined #ruby
Burgestrand has joined #ruby
jameser has joined #ruby
nadir has joined #ruby
nettoweb has joined #ruby
SirOliver has quit [Quit: ZZZzzz…]
jameser has quit [Client Quit]
mlkkk has joined #ruby
despai has quit [Ping timeout: 264 seconds]
UnknownSoldier has joined #ruby
jameser has joined #ruby
ych has quit [Ping timeout: 245 seconds]
al2o3-cr_ has joined #ruby
hotpancakes has joined #ruby
despai has joined #ruby
hutch34 has joined #ruby
hotpancakes has quit [Ping timeout: 240 seconds]
braincrash has joined #ruby
synthroid has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yokel has quit [Ping timeout: 260 seconds]
skweek has quit [Ping timeout: 245 seconds]
malconis has joined #ruby
lxsameer has quit [Ping timeout: 258 seconds]
jameser has joined #ruby
jhack has joined #ruby
yokel has joined #ruby
al2o3-cr_ has quit [Quit: WeeChat 1.7]
Derperperd has joined #ruby
ggaeit has quit [Remote host closed the connection]
malconis has quit [Client Quit]
raul782 has joined #ruby
vondruch has quit [Quit: vondruch]
yokel has quit [Ping timeout: 260 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Derperperd has quit [Ping timeout: 268 seconds]
browndawg has quit [Quit: Leaving]
despai has quit [Ping timeout: 245 seconds]
jcao219 has quit [Ping timeout: 260 seconds]
yokel has joined #ruby
braincrash has quit [Ping timeout: 240 seconds]
vondruch has joined #ruby
govg has joined #ruby
DaveTaboola has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
nankyokusei has joined #ruby
raul782 has quit [Remote host closed the connection]
UnknownSoldier has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 276 seconds]
yokel has quit [Ping timeout: 245 seconds]
bmurt has joined #ruby
Tramy has joined #ruby
yokel has joined #ruby
hotpancakes has joined #ruby
mlkkk has quit []
jcao219 has joined #ruby
despai has joined #ruby
ta__ has joined #ruby
ta has quit [Read error: Connection reset by peer]
nowhere_man has joined #ruby
hotpancakes has quit [Ping timeout: 258 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
anisha has quit [Quit: This computer has gone to sleep]
Mortomes|Work has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
hahuang61 has joined #ruby
ta__ has quit [Read error: Connection reset by peer]
Derperperd has joined #ruby
Tramy has quit [Remote host closed the connection]
DaveTaboola has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
govg has quit [Ping timeout: 268 seconds]
DaveTaboola has joined #ruby
vondruch has quit [Quit: vondruch]
hahuang61 has quit [Ping timeout: 256 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
UnknownSoldier has joined #ruby
ta has joined #ruby
al2o3-cr has joined #ruby
duper has joined #ruby
Derperperd has quit [Ping timeout: 260 seconds]
bkxd has joined #ruby
jaruga_______ has joined #ruby
jgnagy_ has joined #ruby
Immune_ has joined #ruby
thoolihan has quit [Ping timeout: 240 seconds]
enterprisey has joined #ruby
jgnagy has quit [Ping timeout: 240 seconds]
gf3 has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 240 seconds]
matthewd has quit [Ping timeout: 245 seconds]
pandaant has quit [Remote host closed the connection]
sasha_ has joined #ruby
<sasha_> hello, how can I create an IO object that is just a string var and not a real file?
rfoust has joined #ruby
Immune has quit [Ping timeout: 240 seconds]
<apeiros> sasha_: require 'stringio'; io = StringIO.new("somestring")
gf3 has joined #ruby
vondruch has joined #ruby
<sasha_> thanks
bheesham has joined #ruby
thoolihan has joined #ruby
m40can has joined #ruby
padi_ has joined #ruby
__Yiota has joined #ruby
matthewd has joined #ruby
m40can has left #ruby [#ruby]
r4z3r has quit [Quit: Windows isn't a virus, viruses do something.]
braincrash has joined #ruby
newrubycoder has joined #ruby
neuraload has quit [Quit: Leaving]
synthroid has quit [Remote host closed the connection]
renchan has joined #ruby
last_staff has quit [Quit: last_staff]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
swills has joined #ruby
padi_ has quit [Ping timeout: 260 seconds]
Jovial has joined #ruby
bmurt has joined #ruby
vondruch has quit [Quit: vondruch]
<pagios> A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'null' is therefore not allowed access. The credentials mode of an XMLHttpRequest is controlled by the withCredentials attribute. my sinatra is plying wih this how can i sovl tihs?
<apeiros> pagios: that sounds more like javascript than ruby?
milardovich has joined #ruby
<pagios> apeiros, its my havascript as a client
UnknownSoldier has quit [Read error: Connection reset by peer]
jameser_ has joined #ruby
Derperperd has joined #ruby
millerti has joined #ruby
<Burgestrand> Doesn't allowing wildcard as the origin kind of remove the point of CORS-protection in the first place?
_sfiguser has joined #ruby
<apeiros> s/kind of//
<apeiros> afaik yes, it does
<Burgestrand> AH!
vondruch has joined #ruby
jameser has quit [Ping timeout: 240 seconds]
<Burgestrand> I realized it's not that strange to have an API that could safely be called from anywhere
<apeiros> I don't think that's the kind of protection cors provides?
<Burgestrand> However, that only holds true as long as the call is unauthenticated
<Burgestrand> i.e. without credentials, no?
<apeiros> cors is for your browser to know whether code on the current page can make requests to other domains iirc
<dminuoso> <Burgestrand> Doesn't allowing wildcard as the origin kind of remove the point of CORS-protection in the first place?
<dminuoso> This is proof why pagios shouldn't be touching this at all.
vondruch has left #ruby [#ruby]
<apeiros> the server (api) usually doesn't care about the source of request as long as credentials fit
milardovich has quit [Ping timeout: 240 seconds]
<Burgestrand> apeiros isn't the CORS headers returned as a response to the actual API request when calling a domain that is not the origin (current)?
<apeiros> on an API response? don't think so. on html responses.
cibs has quit [Ping timeout: 260 seconds]
synthroid has joined #ruby
<apeiros> i.e. when you render a site which contains code, so that code knows that it can access other domains
<Burgestrand> apeiros e.g. you make an AJAX call to api.com from evil.com, the response from api.com contains CORS headers
<apeiros> or rather, the browser executing said code knows…
vondruch has joined #ruby
<Burgestrand> apeiros I don't think so, the whole point of preflight requests is to avoid doing the call in the first place for non-safe calls (e.g. post)
xen0fon has quit [Quit: xen0fon]
<apeiros> now I'm going to reread that stuff…
<Burgestrand> apeiros :D
Derperperd has quit [Ping timeout: 260 seconds]
XdaddyZX has left #ruby [#ruby]
Luna_Moonfang has quit [Quit: WeeChat 1.7]
cibs has joined #ruby
Luna_Moonfang has joined #ruby
bw__ has quit [Ping timeout: 240 seconds]
_ht_ has quit [Ping timeout: 240 seconds]
yokel has quit [Ping timeout: 260 seconds]
_ht has joined #ruby
bw__ has joined #ruby
<apeiros> eh, seems I had that wrong
yokel has joined #ruby
Qchmqs has quit [Quit: Konversation terminated!]
jameser has joined #ruby
<pagios> cors is on client side?
<apeiros> cors is server+client side
jameser_ has quit [Ping timeout: 252 seconds]
Definity has joined #ruby
<Burgestrand> Yeah, and credentials not only mean HTTP auth (as I originally thought), but also cookies
<apeiros> but reading about how it works it seems to me of questionable/very limited use
advorak has quit [Quit: Leaving]
<apeiros> I mean from the server's point of view all cors does is purely advisory.
<dminuoso> CORS for APIs is silly anyway.
GodFather has joined #ruby
<Burgestrand> Yeah, it's a browser safety mechanism foremost
<dminuoso> CORS is enforced in browsers.
<dminuoso> Yup.
<apeiros> and in the browser I'm having trouble seeing a usecase where it'd be a real help
<Burgestrand> It can be used to e.g. allow direct uploads to an S3 bucket without passing data through the backend first
<toretore> cors is not for restricting, it's for *allowing* x-domain xhr
<toretore> without cors, same-origin applies
freddymungo_ has quit [Ping timeout: 260 seconds]
<apeiros> toretore: I understood that. but it seems to be done the wrong way round.
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jameser has quit [Ping timeout: 240 seconds]
hobodave has joined #ruby
Derperperd has joined #ruby
grh has quit [Ping timeout: 240 seconds]
Qchmqs has joined #ruby
Snickers has quit [Ping timeout: 240 seconds]
troulouliou_div2 has joined #ruby
jameser has joined #ruby
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #ruby
jameser has quit [Client Quit]
DLSteve has joined #ruby
DLSteve has quit [Client Quit]
DLSteve has joined #ruby
despai has quit [Ping timeout: 264 seconds]
hotpancakes has joined #ruby
saneax is now known as saneax-_-|AFK
tvw has quit [Remote host closed the connection]
xen0fon has joined #ruby
fuzzyhorns has joined #ruby
fuzzyhorns has quit [Client Quit]
yokel has quit [Ping timeout: 240 seconds]
fuzzyhorns has joined #ruby
hotpancakes has quit [Ping timeout: 245 seconds]
griffindy has joined #ruby
Beams has quit [Quit: .]
nettoweb has joined #ruby
yokel has joined #ruby
enterprisey has quit [Remote host closed the connection]
Snickers has joined #ruby
ecuanaso has joined #ruby
hutch34 has joined #ruby
Beams has joined #ruby
troulouliou_divn has joined #ruby
troulouliou_div2 has quit [Ping timeout: 240 seconds]
koneko has joined #ruby
Rutix has joined #ruby
Rutix has joined #ruby
Rutix has quit [Changing host]
<al2o3-cr> why aren't anonymous modules included in Module.used_modules
hutch34 has quit [Ping timeout: 240 seconds]
andikr has quit [Remote host closed the connection]
Beams has quit [Client Quit]
bkxd has joined #ruby
stoffus has quit [Ping timeout: 240 seconds]
jzigmund has joined #ruby
despai has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd has quit [Ping timeout: 260 seconds]
ifctj has joined #ruby
troulouliou_divn has quit [Remote host closed the connection]
Beams has joined #ruby
despai has quit [Client Quit]
ramortegui has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
catphish has joined #ruby
<catphish> is it possible to convert an ERRNO to its actual error number?
<catphish> *Errno
despai has joined #ruby
<catphish> centrx: awesome, dunno why i didn't find that, thanks!
millerti has joined #ruby
<catphish> any idea about the other way around?
<catphish> they're OS specific, so actually storing the numbers for anything probably isn't actually a good idea
Beams has quit [Quit: .]
<catphish> thanks anyway :)
milardovich has joined #ruby
harfangk has joined #ruby
Iacobus__ has left #ruby [#ruby]
blackmesa has joined #ruby
<noan> sooo... with rack... can I nest a map call? like map '/private' do ... more maps end map '/public' do ... public maps... end?
hutch34 has joined #ruby
milardovich has quit [Ping timeout: 245 seconds]
<newrubycoder> hey guys when i try to make an alphabet array in ruby A-z, i get "[", "\\", "]", "^", "_", "`" between the Z and a, any way to avoid those symbols?
sepp2k has joined #ruby
<newrubycoder> alp = ('A'..'z').to_a
Beams has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
saneax-_-|AFK is now known as saneax
SirOliver has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
Iacobus has joined #ruby
<al2o3-cr> newrubycoder: alp = [*?A..?Z, *?a..?z]
<newrubycoder> thanks!
marr has quit [Ping timeout: 260 seconds]
<al2o3-cr> _pry_.binding_stack.tap { |stk| stk.clear } << TOPLEVEL_BINDING; using Module.new {}; Module.used_modules #=> [] ??
jhack has quit [Quit: jhack]
hotpancakes has joined #ruby
<al2o3-cr> oh, i see nvm
dionysus69 has quit [Ping timeout: 240 seconds]
polishdub has joined #ruby
naprimer has quit [Ping timeout: 240 seconds]
Qchmqs has quit [Ping timeout: 240 seconds]
yokel has quit [Ping timeout: 240 seconds]
nettoweb has joined #ruby
hotpancakes has quit [Ping timeout: 276 seconds]
ta has quit [Remote host closed the connection]
nettoweb1 has joined #ruby
Beams has quit [Quit: .]
erlend has quit [Ping timeout: 240 seconds]
erlend has joined #ruby
nankyokusei has joined #ruby
dlitvakb has joined #ruby
dlitvakb is now known as dlitvak
truenito has joined #ruby
hobodave has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
nettoweb has quit [Ping timeout: 240 seconds]
Guest69 has joined #ruby
Clarity has quit [Ping timeout: 240 seconds]
koneko has quit [Quit: Textual IRC Client: www.textualapp.com]
nankyokusei has quit [Ping timeout: 240 seconds]
railswebdev has joined #ruby
Beams has joined #ruby
yokel has joined #ruby
hotpancakes has joined #ruby
Silthias1 has joined #ruby
Silthias has quit [Ping timeout: 260 seconds]
truenito has quit [Ping timeout: 260 seconds]
hotpancakes has quit [Ping timeout: 240 seconds]
jsho has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
Derperperd has quit [Max SendQ exceeded]
Derperperd has joined #ruby
troulouliou_div2 has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
hahuang61 has joined #ruby
despai has quit [Ping timeout: 260 seconds]
saneax is now known as saneax-_-|AFK
conta has quit [Ping timeout: 260 seconds]
jsho has quit [Quit: Textual IRC Client: www.textualapp.com]
despai has joined #ruby
jsho has joined #ruby
hahuang61 has quit [Ping timeout: 240 seconds]
despai has quit [Client Quit]
mim1k has quit [Read error: Connection reset by peer]
mim1k has joined #ruby
yokel has quit [Ping timeout: 260 seconds]
centrx has quit []
bkxd has joined #ruby
vondruch has left #ruby [#ruby]
hotpancakes has joined #ruby
hobodave has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
andikr has joined #ruby
hobodave has quit [Client Quit]
agent_white has joined #ruby
cdg has joined #ruby
conta has joined #ruby
lmc has joined #ruby
<agent_white> Good mornin' folks
<dminuoso> morn' agent_white
braincrash has quit [Ping timeout: 252 seconds]
yokel has joined #ruby
raul782 has joined #ruby
cschneid_ has joined #ruby
patarr has joined #ruby
t-recx has joined #ruby
<dlitvak> o/
jpterry has quit [Ping timeout: 268 seconds]
Burgestrand has quit [Quit: Closing time!]
Nilium has quit [Ping timeout: 264 seconds]
csk157 has quit [Ping timeout: 268 seconds]
despai has joined #ruby
tyang_ has joined #ruby
versigtig has joined #ruby
tyang_ has quit [Read error: Connection reset by peer]
tyang_ has joined #ruby
tyang has quit [Ping timeout: 268 seconds]
jcao219 has quit [Ping timeout: 245 seconds]
lenwood has joined #ruby
raul782 has quit [Remote host closed the connection]
jokke has quit [Remote host closed the connection]
aufi has quit [Quit: Leaving]
SirOliver has quit [Quit: ZZZzzz…]
sasha_ has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
jpterry has joined #ruby
mim1k has quit [Ping timeout: 264 seconds]
agent_white has quit [Ping timeout: 240 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shinnya has joined #ruby
xall_ has joined #ruby
rakm has joined #ruby
dagelf has quit [Quit: http://quassel-irc.org - Backlogs! Always! Yay!]
synthroid has quit [Remote host closed the connection]
braincrash has joined #ruby
raul782 has joined #ruby
raspado has joined #ruby
hahuang61 has joined #ruby
marr has joined #ruby
raul782 has quit [Remote host closed the connection]
raul782 has joined #ruby
brent__ has joined #ruby
mark_66 has quit [Remote host closed the connection]
hotpancakes has quit [Remote host closed the connection]
x00r__ has joined #ruby
Kahraman has quit [Ping timeout: 276 seconds]
mim1k has joined #ruby
gregf_ has joined #ruby
GBrawl has joined #ruby
chouhoulis has quit [Remote host closed the connection]
lanc has joined #ruby
chouhoulis has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
UnknownSoldier has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jokke1 has joined #ruby
jokke1 is now known as jokke
cpruitt has joined #ruby
synthroid has joined #ruby
hotpancakes has joined #ruby
xall_ has quit [Ping timeout: 260 seconds]
Nilium has joined #ruby
p1p10l0 has quit [Quit: Page closed]
bkxd has joined #ruby
jeremyhall has joined #ruby
kiltzman has joined #ruby
tlaxkit has joined #ruby
pearlus has quit [Quit: ZZZzzz…]
hotpancakes has quit [Ping timeout: 240 seconds]
yokel has quit [Ping timeout: 260 seconds]
tyang__ has joined #ruby
jsrn has quit [Read error: Connection reset by peer]
bkxd has quit [Ping timeout: 240 seconds]
yokel has joined #ruby
tyang_ has quit [Ping timeout: 268 seconds]
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
jeremyhall has quit [Read error: Connection reset by peer]
amclain has joined #ruby
agent_white has joined #ruby
lanc has joined #ruby
antgel has quit [Ping timeout: 260 seconds]
millerti has joined #ruby
naprimer has joined #ruby
hotpancakes has joined #ruby
Derperperd has quit [Ping timeout: 260 seconds]
x00r__ has quit [Quit: Leaving]
case__ has quit [Ping timeout: 260 seconds]
catphish has quit [Quit: Leaving]
millerti has quit [Client Quit]
_sfiguser has quit [Quit: Leaving]
case____ has joined #ruby
tusharmalik has joined #ruby
djbkd has joined #ruby
montanonic has joined #ruby
lxsameer has joined #ruby
lancetw is now known as [u_u]
maloik has quit [Remote host closed the connection]
mim1k has quit [Ping timeout: 240 seconds]
[u_u] is now known as [0_0]
maloik has joined #ruby
blackmesa has joined #ruby
[0_0] is now known as [r_r]
[r_r] is now known as lancetw
GBrawl has quit [Quit: (null)]
<jgnagy_> could use some help with some metaprogramming if anyone is game
<jgnagy_> trying to make a helpful gem more helpful by including ActiveModel::Model
rikkipitt has joined #ruby
<jgnagy_> but the gem author has overridden `include`
tpendragon_ is now known as tpendragon
<jgnagy_> I'm struggling to figure out how to do `include ActiveModel:Model` when .include() seems to be delegated by the superclass
<jgnagy_> if it is any help, I'm working with Munson
<jgnagy_> class Foo < Munson::Resource
<jgnagy_> include ActiveModel::Model
<jgnagy_> end
<jgnagy_> does nothing... because Munson::Resource.include() doesn't do what Module.include() does
Fernando-Basso has quit [Quit: WeeChat 1.5]
<jgnagy_> any ideas on how I can access / bind the Module.include() method (even to a different name, like `super_include()`)?
jaruga_______ has quit [Quit: jaruga_______]
gusrub has joined #ruby
fuzzyhorns has quit [Quit: Leaving.]
<jgnagy_> if it was an instance method, this would be easy...
<apeiros> jgnagy_: Module.instance_method(:include).bind(self).call(ActiveModel::Model)
fuzzyhorns has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
<apeiros> also spank the author of munson please
<jgnagy_> haha
<apeiros> that statement is in the class body btw.
<dminuoso> Im wondering whether there's actually an easier version to do this.
aryaching has joined #ruby
xall_ has joined #ruby
<dminuoso> apeiros, know what ruby needs?
patarr has quit [Ping timeout: 256 seconds]
<jgnagy_> thank you, apeiros
<apeiros> an Introspection module. or a Ruby module.
<dminuoso> self.Module::include(ActiveModel::Model)
<dminuoso> you know, kind of like c++.
<apeiros> gtg, cya :)
<dminuoso> :p
<dminuoso> cya
<jgnagy_> that said, looks like they've done sone other strange things with Forwardable
<apeiros> jgnagy_: spank. I say.
<dminuoso> jgnagy_, or you could do this.
<jgnagy_> because doing that mostly worked, but then I got `ArgumentError: wrong number of arguments (given 2, expected 1) for forwardable.rb:133
<dminuoso> jgnagy_, class Foo < ActiveModel::Model; prepend Munson::Resource; end
<dminuoso> (:
aupadhye has quit [Ping timeout: 240 seconds]
<dminuoso> Same thing kind of.
nankyokusei has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
<jgnagy_> I'll try it and see if it makes a difference
millerti has joined #ruby
<dminuoso> jgnagy_, you can delay the prepend until you've done everything that Munson::Resource monkey patches.
<jgnagy_> I've considered several times making my own library to do what Munson does
<jgnagy_> with less cruft
pilne has joined #ruby
<dminuoso> oh wait.
<dminuoso> jgnagy_, this wont work because it's not a class.
<jgnagy_> that's probably what I'll need to do, the whole delay thing.. but I didn't know how to delay subclassing
<dminuoso> mmm thats a bummer.
<jgnagy_> indeed it is
<dminuoso> under the hood this would have done the same thing though.
nowhere_man has quit [Ping timeout: 240 seconds]
<dminuoso> BUT!
<dminuoso> jgnagy_, here's where my hack comes into play.
<dminuoso> jgnagy_, did you ever write Ruby code, wanting to cast the type of an object?
<jgnagy_> maybe there is a way to copy a method definition (i.e., include), remove it (so Ruby finds a parent's definition), then put it back when I'm done?
<jgnagy_> yeah, I've done that
<jgnagy_> Integer(string)
<jgnagy_> etc
<dminuoso> No that's not a cast!
<dminuoso> Give me a moment, gotta find it :)
<jgnagy_> well, ok
<jgnagy_> 10.to_s maybe?
despai has joined #ruby
lenwood has quit [Ping timeout: 256 seconds]
Derperperd has joined #ruby
nankyokusei has quit [Ping timeout: 245 seconds]
Silthias has joined #ruby
<dminuoso> jgnagy_, noo you silly. That's not how you cast.
<dminuoso> Real men cast like this:
<dminuoso> (Had to dig out the password on my old github profile)
<jgnagy_> whoa
Silthias2 has joined #ruby
<elomatreb> Do I want to know what that instance_variable_set thing does?
<dminuoso> This will segfault if you try more than read instance variables for various reasons, but you can use this to get around thie "class/module" checks for Module.prepend :p
<dminuoso> elomatreb, no you dont!
mikecmpbll has quit [Ping timeout: 260 seconds]
Silthias1 has quit [Ping timeout: 245 seconds]
<dminuoso> elomatreb, Ive written a small comment explaining it though.
<dminuoso> the iv table gets initialized when the first object of a class is created I think?
marxarelli|afk has quit [Quit: Textual IRC Client: www.textualapp.com]
<elomatreb> Oh, right
govg has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
<jgnagy_> I think I'll leave this as a last resort... messing with FFI and pointers and risking segfaults might do what I want, but...
<dminuoso> jgnagy_, I'd love to see this into production code other than mine!
<elomatreb> Didn't see the comment. Nice hax
<jgnagy_> I just want to use instances of Munson::Resource in rails form_for() helpers
Beams has quit [Quit: .]
marxarelli has joined #ruby
Silthias has quit [Ping timeout: 240 seconds]
<jgnagy_> and most of the things that requires are just making strings from class names messing with pluralization
<dminuoso> elomatreb, mm no. That's not it. I cant remember from the top off my head, but if you tried to read instance variables without the iv table being initialized you would seg fault ruby.
<jgnagy_> ActiveModel::Model or ActiveModel::Naming would have been handy
<dminuoso> no actually that was it.
<dminuoso> I remembered.
rakm has joined #ruby
<dminuoso> jgnagy_, I have another "fix" for you.
<jgnagy_> shoot
aryaching has quit [Ping timeout: 260 seconds]
jeremyhall has joined #ruby
teclator has quit [Ping timeout: 260 seconds]
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
<dminuoso> jgnagy_, what you could do is set up a method_missing on your classes singleton class that forwards everything to Class do your magic, and then undef_method that method_missing
<dminuoso> basically create a temporary shortcut around that toxic class
mikecmpbll has joined #ruby
<jgnagy_> hmmm
loechel has joined #ruby
<dminuoso> that actually is not too horrible
BackEndCoder has quit [Excess Flood]
BackEndCoder has joined #ruby
<dminuoso> if only you could uninclude a method.
<dminuoso> *MODULE
<jgnagy_> yes
<jgnagy_> if only, or just delay subclassing
patarr has joined #ruby
<jgnagy_> mixing _before_ subclassing
<dminuoso> <dminuoso> jgnagy_, what you could do is set up a method_missing on your classes singleton class that forwards everything to Class do your magic, and then undef_method that method_missing
<jgnagy_> and all would be well
<dminuoso> ^- that will delay that subclassing effectively
montanonic has quit [Ping timeout: 240 seconds]
<jgnagy_> ah, so don't subclass, just use method_missing to send what _would_ have gone to Munson::Resource
<jgnagy_> hmmm
<jgnagy_> well, I believe some of Munson's magic relies on class names
shinnya has quit [Ping timeout: 260 seconds]
<jgnagy_> Foo corresponds to /foo, so I wonder what calling methods on Munson::Resource through method_missing would do
Pumukel has quit [Ping timeout: 258 seconds]
<jgnagy_> I suppose some combination of classes and proxy classes with method_missing might work
dn` has quit [Ping timeout: 240 seconds]
loechel has quit [Ping timeout: 245 seconds]
<jgnagy_> basically a wrapper around Foo, where Foo is a subclass of Munson::Resource, and the wrapper (maybe FooProxy) mixes in the ActiveModel::Model module?
<dminuoso> jgnagy_, https://eval.in/738928
andikr has quit [Remote host closed the connection]
dn` has joined #ruby
<dminuoso> oops wow wait.
szulak has joined #ruby
patarr has quit [Ping timeout: 260 seconds]
<dminuoso> that wont actually work and my mistakes were gross.
csk has joined #ruby
<dminuoso> jgnagy_, up until 2.1 there was a rubyland hack to change the superclass of a class
gusrub has quit [Remote host closed the connection]
<dminuoso> but nobu was mean and took it away.
<jgnagy_> haha, ok
gusrub has joined #ruby
<dminuoso> jgnagy_, yeah the only way I could think of would to insert a proxy class that was a toggleable delegator
<dminuoso> by insert I mean into the inheritance chain
<dminuoso> so it would be Foo < ToxicDisabler < Toxic
<dminuoso> jgnagy_, all in all I think actually my FFI hack might suddenly become a realistic option.
aryaching has joined #ruby
nowhere_man has joined #ruby
bkxd has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dminuoso> WOW!
<dminuoso> jgnagy_, https://eval.in/738934
<dminuoso> look at this!
gusrub has quit [Ping timeout: 276 seconds]
<dminuoso> I hate Ruby.
<dminuoso> But I can fix this no problem.
rikkipitt has quit [Remote host closed the connection]
milardov_ has joined #ruby
Synthead has joined #ruby
dn` has quit [Ping timeout: 245 seconds]
<dminuoso> Oh right I need to also monkey patch the flags mm
bkxd has quit [Ping timeout: 252 seconds]
csk has quit [Ping timeout: 276 seconds]
rfoust has quit [Read error: Connection reset by peer]
Cohedrin has joined #ruby
milardovich has quit [Ping timeout: 260 seconds]
dn` has joined #ruby
patarr has joined #ruby
rfoust has joined #ruby
ketan has quit [Remote host closed the connection]
raul782 has quit [Remote host closed the connection]
padi_ has joined #ruby
rakm has joined #ruby
ketan has joined #ruby
<jgnagy_> thanks
ur5us has joined #ruby
<dminuoso> jgnagy_, one moment, almost done!
padi_ has quit [Ping timeout: 268 seconds]
<dminuoso> jgnagy_, https://eval.in/738947
<dminuoso> close.
jzigmund has quit [Quit: leaving]
<dminuoso> oh right.
jenrzzz has quit [Ping timeout: 264 seconds]
jzigmund has joined #ruby
<dminuoso> brrr what is this.
swills has quit [Quit: Leaving]
swills has joined #ruby
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
despai has quit [Ping timeout: 240 seconds]
despai has joined #ruby
A124 has quit [Ping timeout: 240 seconds]
wilbert has joined #ruby
_djbkd has joined #ruby
A124 has joined #ruby
nofxx has joined #ruby
alex`` has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Remote host closed the connection]
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
<dminuoso> jgnagy_, okay there may be more issues than I was considering.
<dminuoso> And somehow I cant pass the type checking against module for some reason.
<dminuoso> (for prepend)
<jgnagy_> sorry, had to take off for a meeting
<jgnagy_> about to leave for another
<jgnagy_> I'll check it out in a bit
<jgnagy_> thanks for the help though
<dminuoso> Oh I wont stop until my fiddle hack is done.
<dminuoso> Because Ive always wanted to inherit from Module.
<dminuoso> There may be a way.
nowhereman has joined #ruby
nowhere_man has quit [Ping timeout: 245 seconds]
hotpanca_ has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nowhereman has quit [Read error: Connection reset by peer]
nowhere_man has joined #ruby
yokel has quit [Ping timeout: 268 seconds]
lanc has joined #ruby
millerti has joined #ruby
ecuanaso has joined #ruby
yokel has joined #ruby
despai has quit [Read error: Connection reset by peer]
fuzzyhorns has quit [Quit: Leaving.]
despai has joined #ruby
enterprisey has joined #ruby
SeepingN has joined #ruby
yokel has quit [Ping timeout: 240 seconds]
gusrub has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> jgnagy_, fixed!
<dminuoso> It works.
tomphp has joined #ruby
tomphp has quit [Client Quit]
renchan has quit [Quit: Leaving...]
guest_operator has joined #ruby
<guest_operator> Hi
<guest_operator> Somebody has used Shoes Framework?
<dminuoso> Or mmm
<guest_operator> Somebody have used Shoes Framework?*
raul782 has joined #ruby
<havenwood> guest_operator: Do you have a shoes-related question?
<guest_operator> Yes
<guest_operator> It's simple
kirun has joined #ruby
<guest_operator> Somebody could help me?
ekinmur has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dminuoso> havenwood!
<dminuoso> Why?
<havenwood> ?anyone guest_operator
<ruby[bot]> guest_operator: Just ask your question, if anyone has, is or can, they will respond.
millerti has joined #ruby
* havenwood plays a tiny fiddle
<guest_operator> How can I add gems to Shoes app?
<dminuoso> This is just regular production ruby code.
<dminuoso> Y u no work.
jsho has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> Im wondering if this is actually cached
<dminuoso> Because Id be screwed if thats the case.
<guest_operator> Shoes it's great but has tiny information
enterprisey has quit [Remote host closed the connection]
TomyWork has quit [Ping timeout: 240 seconds]
<havenwood> guest_operator: Shoes.setup { gem 'rails' }
aswen has joined #ruby
fuzzyhorns has joined #ruby
bkxd has joined #ruby
<guest_operator> I've used that, but the window does not load
enterprisey has joined #ruby
reverberations has joined #ruby
ur5us has quit [Remote host closed the connection]
<guest_operator> The windows says 'preparing program.rb'...
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
<guest_operator> But does not load
jsho has joined #ruby
<havenwood> guest_operator: Are you already using Shoes 4? Or are you using a different color of Shoes?
<havenwood> guest_operator: https://github.com/shoes/shoes4
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Anonymoose2 has quit [Ping timeout: 240 seconds]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
csk has joined #ruby
jidar has quit [Ping timeout: 252 seconds]
bkxd has quit [Ping timeout: 240 seconds]
<guest_operator> Shoes Walkabout
milardov_ has quit [Remote host closed the connection]
<guest_operator> the last version
markholmes has joined #ruby
milardovich has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
rakm has joined #ruby
szulak has joined #ruby
ChiefAlexander has joined #ruby
millerti has joined #ruby
guest_operator has quit [Quit: Leaving]
milardovich has quit [Ping timeout: 260 seconds]
tyang__ has quit [Ping timeout: 268 seconds]
TomyLobo has joined #ruby
renchan has joined #ruby
ecuanaso has joined #ruby
pawnbox has joined #ruby
cdg has quit [Remote host closed the connection]
TheHodge has quit [Quit: Connection closed for inactivity]
cdg has joined #ruby
whathappens has joined #ruby
milardovich has joined #ruby
gnufied has quit [Ping timeout: 240 seconds]
enterprisey has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
milardov_ has joined #ruby
cajone has left #ruby [#ruby]
millerti has joined #ruby
<jamesaxl> hi
<jamesaxl> datamapper still alive?
hotpancakes has joined #ruby
xall_ has quit [Ping timeout: 258 seconds]
rikkipitt has joined #ruby
cdg has quit [Ping timeout: 276 seconds]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpanca_ has quit [Ping timeout: 276 seconds]
whathapp_ has joined #ruby
nowhereman has joined #ruby
<Cyrus> Not really.
<Cyrus> Use Sequel.
milardovich has quit [Ping timeout: 264 seconds]
ecuanaso has joined #ruby
despai has quit [Ping timeout: 256 seconds]
nowhere_man has quit [Ping timeout: 252 seconds]
whathappens has quit [Ping timeout: 255 seconds]
cajone has joined #ruby
fuzzyhorns has quit [Quit: Leaving.]
jidar has joined #ruby
haylon has joined #ruby
<haylon> Hey Everyone. Where does Thor install its .thor files when thor install file.thor is invoked?
gnufied has joined #ruby
antoniobeyah has joined #ruby
mtkd has joined #ruby
hotpanca_ has joined #ruby
nankyokusei has joined #ruby
fuzzyhorns has joined #ruby
hotpancakes has quit [Ping timeout: 240 seconds]
Lord_of_Life has quit [Excess Flood]
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
djellemah_ has joined #ruby
ChiefAlexander has quit [Quit: Leaving...]
hotpancakes has joined #ruby
nankyokusei has quit [Ping timeout: 276 seconds]
lanc has joined #ruby
last_staff has joined #ruby
jsho has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
montanonic has joined #ruby
hotpanca_ has quit [Ping timeout: 240 seconds]
raul782 has quit [Remote host closed the connection]
Lord_of_Life has joined #ruby
csk has quit [Ping timeout: 268 seconds]
marxarelli has quit [Quit: Textual IRC Client: www.textualapp.com]
Derperperd has quit [Ping timeout: 256 seconds]
Fernando-Basso has joined #ruby
<dminuoso> Why is this not working?
csk has joined #ruby
veloutin_ has quit [Ping timeout: 276 seconds]
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
abdulmugni has joined #ruby
GodFather has quit [Read error: Connection reset by peer]
<dminuoso> Oh. Yes. Oh. Oh.
<dminuoso> That's annoying.
tyang has joined #ruby
<dminuoso> Hooray!
<dminuoso> jgnagy_, ^- finally fully working example.
jsho has joined #ruby
<jgnagy_> on a mission
<jgnagy_> :)
<dminuoso> This is actually perfectly safe to use now.
lanc has joined #ruby
raul782 has joined #ruby
<jgnagy_> you should wrap that in some friendlier-named methods and release it as a gem
Xentil has joined #ruby
<jgnagy_> the mind_blown gem name is available
<jgnagy_> ;-)
nettoweb1 has quit [Ping timeout: 260 seconds]
djellemah_ has quit [Quit: Leaving]
nettoweb has joined #ruby
<dminuoso> jgnagy_, There used to be a gem with fancy stuff like this in pre-2.0 times
whathappens has joined #ruby
djellemah_ has joined #ruby
Bigtawn has joined #ruby
<dminuoso> jgnagy_, the less disturbing part is the names, but the fact that you have to respect the method hierarchy. See how you end up setting the superclass of FunStuff to Toxic in the end?
Derperperd has joined #ruby
cd-rum has joined #ruby
Silthias has joined #ruby
raul782 has quit [Ping timeout: 240 seconds]
Silthias2 has quit [Ping timeout: 240 seconds]
whathapp_ has quit [Ping timeout: 240 seconds]
<jgnagy_> yes
<jgnagy_> that is a bit odd, especially since FunStuff is a module, not a class
Silthias1 has joined #ruby
UnknownSoldier has quit [Remote host closed the connection]
<jgnagy_> but I get it
Bigtawn has quit [Client Quit]
haylon has quit [Quit: Leaving]
szulak has joined #ruby
cd-rum has quit [Client Quit]
blackmesa has joined #ruby
Silthias has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
bkxd has joined #ruby
agent_white has quit [Quit: brb]
<dminuoso> jgnagy_, https://eval.in/739089
<jgnagy_> nicely done, that's some impressive work
<jgnagy_> seems like that should be a thing
GodFather has joined #ruby
<dminuoso> Actually.. I think I can replace the method cache by just invoking the GC.
bkxd has quit [Ping timeout: 255 seconds]
agent_white has joined #ruby
ta has joined #ruby
<dminuoso> jgnagy_, https://eval.in/739092 thats a bare minimum with all the unused methods (that were left overs from other experiments) cut away.
<dminuoso> its not too bad actually
<dminuoso> Thinking it should be on class Class even.
<dminuoso> though.. no. it should be module.
safetypin has joined #ruby
SirOliver has joined #ruby
ur5us has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
esObe has joined #ruby
bkxd has joined #ruby
ldnunes has quit [Quit: Leaving]
JeanCarloMachado has quit [Ping timeout: 268 seconds]
bkxd has quit [Ping timeout: 268 seconds]
pawnbox has joined #ruby
bkxd has joined #ruby
m8051 has joined #ruby
johnny56_ has quit [Ping timeout: 264 seconds]
johnny56 has joined #ruby
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
montanonic has quit [Ping timeout: 252 seconds]
jsho has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
whathappens has quit [Ping timeout: 240 seconds]
milardov_ has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
SirOliver has quit [Quit: ZZZzzz…]
despai has joined #ruby
SirOliver has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
tlaxkit has quit [Remote host closed the connection]
m8051 has left #ruby ["Leaving"]
nowhereman has quit [Ping timeout: 240 seconds]
ekinmur has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raul782 has joined #ruby
bigtawm has joined #ruby
<mjuhl> What framework for automated testing do you use?
<bigtawm> Just read beginning ruby by Peter Cooper. I was thinking about reading well grounded rubyist next along with Hartls rails tutorial. Does anyone have any other recomendations?
<bigtawm> recommendations*
nettoweb1 has joined #ruby
enterprisey has joined #ruby
markholmes has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
nettoweb has quit [Ping timeout: 258 seconds]
<synstack> bigtawm: I recommend keeping the Pickaxe handy
<synstack> if you don't read it through, it's very useful as a reference for specific topics you want to know more about
tomphp has joined #ruby
<SirOliver> mjuhl - cucumber & rspec
<bigtawm> Thats programming ruby by dave thomas right? I've seen that its like JavaScript the definitive guide by flanagan in a sense correct?
<synstack> I wouldn't know about that, but yeah that's the one
raul782 has quit [Remote host closed the connection]
tlaxkit has joined #ruby
SirOliver has quit [Quit: ZZZzzz…]
<dminuoso> mjuhl, the community is pretty much split half in half. There's minitest and rspec.
<dminuoso> Both are fine and great, not many argumenst against either. It's mostly a personal preference.
<bigtawm> Awesome Ill pick up a copy to use as a reference. Would well grounded rubyist be the best book to read following beginning ruby?
<dminuoso> minitest is the lighter solution that comes with Ruby out of the box, rspec is heavier but more feature rich.
<dminuoso> bigtawm, it's one of the most recommended books in here.
<dminuoso> bigtawm, also consider Eloquent Ruby
<dminuoso> Those two make up for what feels like 95% of the book recommendations.
zeroDi has joined #ruby
<bigtawm> I heard eloquent ruby is also pretty good. Would I be able to take that on at this point? I heard it is somewhat advanced.
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
<bigtawm> Would a good flow be well grounded rubyist -> eloquent ruby? Or is there a lot of overlap?
lxsameer has quit [Quit: WeeChat 1.6]
<dminuoso> bigtawm, it's hard to say whether you would be able to take that on.
despai has quit [Read error: Connection reset by peer]
psychicist__ has joined #ruby
despai has joined #ruby
brendan- has quit [Quit: Textual IRC Client: www.textualapp.com]
futilegames has joined #ruby
polishdub has quit [Quit: Leaving]
futilegames has left #ruby [#ruby]
cagomez has joined #ruby
<dminuoso> bigtawm, just looking at the TOC I'd say it's probably a sensible path. There's some minor overlap, but Eloquent Ruby is more about patterns really.
lanc has joined #ruby
<dminuoso> So yeah, Id say go for Well Grounded Rubyist first and then maybe eloquent ruby if you're still thisrty for polishing out and writing good code. :)
workmad3 has joined #ruby
brendan- has joined #ruby
<bigtawm> Okay awesome Ill probably start with well grounded rubyist and try to learn rails along the way with hartl. Then I'll go back and try to get a higher understanding of ruby with eloquent ruby. Thanks so much!
browndawg has joined #ruby
raul782 has joined #ruby
<dminuoso> bigtawm, this is just a personal recommendation, but if you can avoid Rails until you've covered your grounds with Ruby.
<dminuoso> So that you can look at Rails as just a bunch of Ruby classes, modules and methods. :)
<synstack> bigtawm: around the same point as Eloquent Ruby, I found POODR to be a big stepping point
csk has quit [Ping timeout: 240 seconds]
<bigtawm> Do these books cover a lot of good programming techniques/practices that a lot of computer science degrees leave out? Okay Ill take your advice on that.
<bigtawm> synstack: Ill look at POODR that is big on object orient design patterns right?
elementaru has quit [Remote host closed the connection]
<dminuoso> bigtawm, yes. eloquent ruby is completely focused on how to utilize the real special parts of ruby and how to do it well.
<synstack> Its about good OOP, things like single responsibility and class independence, but it is invaluable read alongside Design Patterns/Design Patterns in Ruby
<synstack> I wouldnt worry about these books until you're a little more comfortable though
montanonic has joined #ruby
brent__ has quit [Remote host closed the connection]
_chazu is now known as chazu
pawnbox has quit [Remote host closed the connection]
brent__ has joined #ruby
<bigtawm> Awesome Ill keep a note on those and start on well grounded rubyist. Am at the point to where I can start contributing to some open source or should I just keep learning for now?
pawnbox has joined #ruby
tuelz has joined #ruby
<tuelz> anyone familiar enough with factorygirl to know how to set a local variable on each record it creates?
<tuelz> I'm trying to sample an array of addresses and use the address to set each atribute on a user record
<tuelz> problem is they need to be valid addresses so I can't just fake data willy nilly, rather I need to sample from real data and then put those attrs in the right place
<dminuoso> tuelz, normally you would do something like: sequence(:address) { |n| "addr #{n}" }
<dminuoso> mmm
<dminuoso> tuelz, mind my asking, why does it have to be valid addresses?
<tuelz> dminuoso: because I'm testing against a 3rd party api that will only setup all the other stuff I need from them against valid addresses
<dminuoso> tuelz, you can always pass attributes to the factory, e.g. create(user, addr: "foo")
<tuelz> ahh, of course...that's what I need thanks again :)
<tuelz> well maybe that's what I need, we'll see
<dminuoso> tuelz, the correct way would be to use dynamic properties though
jeremyhall has quit [Read error: Connection reset by peer]
brent__ has quit [Ping timeout: 260 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
futilegames has joined #ruby
<dminuoso> tuelz, then you can just do address { your_address_array.pop }
<dminuoso> which is probably a gazillion times simpler.
<tuelz> dude I should learn to browse documentation as quickly as you
<tuelz> life would be so much easier xD
<tuelz> thanks
<tuelz> hmm, actually that isn't going to work as far as I can tell...you've given me some options to explore though
<tuelz> the problem is I need to execute a statement for each record to set an in scope variable for that single record and then pull data from that variable
<dminuoso> why isnt that going to work?
<tuelz> dynamic attrs will just call random on the array each time and likely grab unrelated data
JeanCarloMachado has quit [Ping timeout: 260 seconds]
<tuelz> like zip from one address and street address from another
csk157 has joined #ruby
cdg has joined #ruby
<dminuoso> yeah it makes more sense do control this the other way around in rspec then
futilegames has left #ruby [#ruby]
<dminuoso> something like let(:addr_set) { AddressSet.pop } /*... */ let(:person) { create(:person, address: addr_set[:address], city: addr_set[:city] }
<dminuoso> (or minitest if thats what you are using)
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tyang has quit [Ping timeout: 268 seconds]
csk157 has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg_ has joined #ruby
tvw has joined #ruby
GodFather has quit [Ping timeout: 258 seconds]
Derperperd has quit [Ping timeout: 240 seconds]
ItBurnsWhenIPee has joined #ruby
nettoweb has joined #ruby
<tuelz> hmm, problem is we're using this for seed data....maybe I should just ditch the random aspect all together and hard code some stuff in since it's not really random anyways
futilegames has joined #ruby
<tuelz> or wait, I can just call it with random data from the seeds file....that works
<tuelz> thanks
raul782 has quit [Remote host closed the connection]
renchan has quit [Remote host closed the connection]
<ItBurnsWhenIPee> I'm trying to put each entry of an array into its own line in a textarea. my_array.join('\r\n').html_safe is being output as a single string in Rails. Anyone know what I'm doing wrong?
nettoweb1 has quit [Ping timeout: 256 seconds]
cdg has quit [Ping timeout: 245 seconds]
tyang has joined #ruby
Rodya_ has joined #ruby
bkxd has quit [Ping timeout: 245 seconds]
dc2 has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
futilegames has quit [Quit: futilegames]
milardovich has quit [Read error: Connection reset by peer]
dc4 has joined #ruby
<dminuoso> ItBurnsWhenIPee, ?crosspost
<dminuoso> ?crosspost ItBurnsWhenIPee
<ruby[bot]> ItBurnsWhenIPee: Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
mikecmpbll has quit [Quit: inabit. zz.]
<dminuoso> ?rails ItBurnsWhenIPee
<ruby[bot]> ItBurnsWhenIPee: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
gloscombe_ has joined #ruby
dc2 has quit [Ping timeout: 245 seconds]
milardovich has joined #ruby
<ItBurnsWhenIPee> sorry
csk has joined #ruby
raul782 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
crankhar1er has quit [Ping timeout: 240 seconds]
jcao219 has joined #ruby
khaki has joined #ruby
nankyokusei has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
crankharder has joined #ruby
grh has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
synthroid has quit []
raul782 has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
pawnbox has quit [Ping timeout: 252 seconds]
rikkipitt has quit [Quit: Leaving...]
milardovich has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
nofxx has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
dviola has joined #ruby
enterprisey has quit [Remote host closed the connection]
jamesaxl has quit [Quit: Leaving]
aswen has quit [Quit: WeeChat 1.5]
psychicist__ has quit [Ping timeout: 260 seconds]
despai has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
whathappens has joined #ruby
sorbo has joined #ruby
Xiti` has joined #ruby
despai has joined #ruby
ecuanaso has joined #ruby
padi_ has joined #ruby
cdg has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ifctj has quit [Ping timeout: 240 seconds]
padi_ has quit [Remote host closed the connection]
padi_ has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.7]
croberts is now known as Toledo-afk
Pixi_ has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
madsa is now known as Guest13012
Guest13012 has quit [Killed (weber.freenode.net (Nickname regained by services))]
Xiti has quit [Ping timeout: 240 seconds]
jcao219 has quit [Remote host closed the connection]
cdg_ has quit [Ping timeout: 252 seconds]
marxarelli has joined #ruby
brent__ has joined #ruby
Xiti` has quit [Ping timeout: 258 seconds]
madsa_ has joined #ruby
madsa_ is now known as Guest87296
element_zer0 has joined #ruby
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
tuelz has quit [Quit: WeeChat 1.7]
biberu has quit []
jose_leeto has quit [Quit: Leaving.]
brent__ has quit [Ping timeout: 255 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leah2 has quit [Ping timeout: 276 seconds]
fuzzyhorns has quit [Quit: Leaving.]
blackwind_123 has quit [Ping timeout: 240 seconds]
blackwind_123 has joined #ruby
BackEndCoder has quit [Excess Flood]
toretore has quit [Ping timeout: 252 seconds]
freddymungo_ has joined #ruby
element_zer0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
BackEndCoder has joined #ruby
grh has quit [Ping timeout: 245 seconds]
cpruitt has quit [Read error: Connection reset by peer]
tyang has quit [Read error: Connection reset by peer]
Lukefahr has joined #ruby
despai has quit [Read error: Connection reset by peer]
cpruitt has joined #ruby
mim1k has joined #ruby
despai has joined #ruby
brent__ has joined #ruby
element_zer0 has joined #ruby
boombox_ has joined #ruby
sorbo has quit [Ping timeout: 245 seconds]
Rodya_ has quit [Remote host closed the connection]
element_zer0 has quit [Ping timeout: 240 seconds]
ItBurnsWhenIPee has quit [Quit: Page closed]
mim1k has quit [Ping timeout: 264 seconds]
Rodya_ has joined #ruby
marxarelli has quit [Quit: Textual IRC Client: www.textualapp.com]
freddymungo_ has quit [Ping timeout: 260 seconds]
Xiti has joined #ruby
elifoster has joined #ruby
AustinMatherne has joined #ruby
boombox_ has quit [Remote host closed the connection]
kirun has quit [Quit: Konversation terminated!]
ramortegui has quit [Quit: Ex-Chat]
Pixi_ has quit [Ping timeout: 240 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
skweek has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
raul782 has joined #ruby
Xiti has quit [Read error: Connection reset by peer]
gusrub has quit [Remote host closed the connection]
gusrub has joined #ruby
bheesham has quit [Ping timeout: 260 seconds]
Xiti has joined #ruby
gusrub has quit [Remote host closed the connection]
djellemah_ has quit [Ping timeout: 245 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
raul782 has quit [Remote host closed the connection]
raul782 has joined #ruby
rakm has joined #ruby
wilbert has quit [Ping timeout: 240 seconds]
cdg_ has joined #ruby
UnknownSoldier has joined #ruby
tlaxkit has quit [Remote host closed the connection]
nofxx has joined #ruby
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
cdg has quit [Ping timeout: 255 seconds]
versigtig has quit [Quit: This computer has gone to sleep]
jenrzzz has joined #ruby
csk has quit [Quit: ZZZzzz…]
kht has joined #ruby
bkxd has joined #ruby
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
choke has joined #ruby
raul782 has quit [Remote host closed the connection]
Lukefahr has quit [Ping timeout: 260 seconds]
nictrasavios has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
Snickers has quit [Quit: Snickers]
blackmesa has quit [Ping timeout: 260 seconds]
lanc has joined #ruby
__Yiota has joined #ruby
blackmesa has joined #ruby
cgibsonmm has joined #ruby
saneax-_-|AFK is now known as saneax
saneax is now known as saneax-_-|AFK
jc_io has joined #ruby
Xiti` has joined #ruby
Xiti` has quit [Read error: Connection reset by peer]
raul782 has joined #ruby
Xiti has quit [Ping timeout: 268 seconds]
safetypin has quit [Quit: ZZZzzz…]
<jc_io> anyone worked with remote_syslog and psych? two boxes identical ruby/psych setups, idential ami's, one works one doesn't :sad face:
charliesome has joined #ruby
cdg has joined #ruby
<cschneid_> what the heck is happening. the net/http library is intermittently raising an error around setsockopt deep in its bowels. Both from Restclient & net/http directly. Just connecting to `http://localhost:9292/api`
cdg_ has quit [Ping timeout: 260 seconds]
<cschneid_> => #<Errno::EINVAL: Invalid argument - setsockopt(2)> is the error, and the line that calls it is: s.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
JoshS has quit [Ping timeout: 256 seconds]
cdg has quit [Ping timeout: 240 seconds]
<cschneid_> in net/http.rb pretty deep down. :-/
<dminuoso> http://localhost:9292/api does not work for me.
<dminuoso> Can you give me a juicy stack trace?
tusharmalik has quit [Ping timeout: 258 seconds]
<cschneid_> I mean, I have the call stack to get to that point in the code, one sec and I can paste. It's only failing intermittently, it does work sometimes. I have a local puma on port 9292.
Takumo has quit [Remote host closed the connection]
whathappens has quit [Quit: Leaving...]
blackmesa has quit [Read error: Connection timed out]
raul782 has quit [Remote host closed the connection]
<dminuoso> cschneid_, before I chase the wrong end, is that ruby version mandatory?
<cschneid_> mildly? Is it known buggy?
<dminuoso> I dont know, but its certainly out of date.
raul782 has joined #ruby
<cschneid_> actually , we're deployed on a few points back from it.
<cschneid_> I know 2.4 is out now, it's just what we're using. No strict need
blackmesa has joined #ruby
<dminuoso> Well upgrade to 2.2.6 at least anyway
<dminuoso> While I dig into the source
<cschneid_> it's just such a weirdly deep error.
<cschneid_> osx, fully updated.
<dminuoso> already? that was fast
pawnbox has joined #ruby
<cschneid_> hmm? oh, installing 2.2.6 now - I'm just on OSX
Takumo has joined #ruby
Takumo has joined #ruby
Takumo has quit [Changing host]
<dminuoso> cschneid_, mm actually that seems like a bug
<dminuoso> cschneid_, lets try a monkey patch real fast
<cschneid_> ok - what do you think is wrong?
<cschneid_> and why does socksetopt fail intermitently :)
<dminuoso> cschneid_, can you quickly monkey patch that class/method to use :IPPROTO_TCP and :TCP_NODELAY respectively ?
<dminuoso> and see if it still misbehaves?
<cschneid_> this is the existing code for the line: `s.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)` - you want it to be?
<dminuoso> Yes.
<jc_io> cschneid: might want to check out puma and surrounding rubinius/jruby,etc food4thought
<cschneid_> that is what is there in 2.2.5 version of net/http
<dminuoso> cschneid_, I know, just entertain me.
<cschneid_> dminuoso: ok. And what would you like me to change it to?
<dminuoso> <dminuoso> cschneid_, can you quickly monkey patch that class/method to use :IPPROTO_TCP and :TCP_NODELAY respectively ?
raul782 has quit [Ping timeout: 260 seconds]
<dminuoso> from those constants to symbols
<cschneid_> oh I see
<cschneid_> ` s.setsockopt(:IPPROTO_TCP, :TCP_NODELAY, 1) `
raul782 has joined #ruby
<dminuoso> no wait
<dminuoso> the fix would have been the other way around ;o
<dminuoso> interesting.
<dminuoso> cschneid_, ahhh. got it.
<dminuoso> ipv6
kht has quit [Ping timeout: 260 seconds]
<dminuoso> have had that particular issue before I think
pawnbox has quit [Ping timeout: 260 seconds]
raul782 has quit [Remote host closed the connection]
<cschneid_> hmm, so I should do 0.0.0.0 and/or whatever my local ipv4 ip is, and see what that's doing
<dminuoso> yeah try that and see if it works
<dminuoso> 127.0.0.1 should be fnie
cgibsonmm has quit [Remote host closed the connection]
raul782 has joined #ruby
millerti has joined #ruby
<dminuoso> EINVAL: The dest_len argument is not a valid length for the address family.
patarr has quit [Ping timeout: 240 seconds]
johnny56 has quit [Ping timeout: 264 seconds]
<cschneid_> so odd - why would it intermittently fail
<cschneid_> that does seem to make it work
<cschneid_> after a dozen or so attempts
<dminuoso> cschneid_, what happens if you use ::1 ?
<cschneid_> not real up on ipv6 - how do I do ip+port with it?
<cschneid_> it didn't like "::1:9292" :)
<dminuoso> cschneid_, [::1]:123
<dminuoso> e.g. http://[::1]:9292/foo
tlahtoani has joined #ruby
freddymungo_ has joined #ruby
<cschneid_> yeah, trying it. Had to restart puma on the receiving end to bind to that
<cschneid_> dminuoso: odd - that appears to work consistently too. Something about `localhost` name was causing it
<dminuoso> cschneid_, try putting in localhost again, but run this first: killall -HUP mDNSResponder
<dminuoso> See if your mDNSResponder is just hung up acting crazy
<dminuoso> or what does "host localhost" resolve to?
khaki has quit [Quit: WeeChat 1.7]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cschneid_> added at bottom of previous gist (https://gist.github.com/cschneid/a3c274069befb09ee9cf3ac3d36784d7)
despai has quit [Read error: Connection reset by peer]
<cschneid_> yeah, going back to localhost immediately caused the error again
leah2 has joined #ruby
cagomez has quit [Remote host closed the connection]
despai has joined #ruby
<dminuoso> cschneid_, even with HUP'ing the mDNSResponder?
<cschneid_> yeah, sudo hup'd it
<dminuoso> cschneid_, well Ive found some issues about this. This seems to be an old almost known issue
johnny56 has joined #ruby
nankyokusei has joined #ruby
<cschneid_> I'm happy w/ where I'm at now. If we run into it in a real environment, we can figure it out more. For now, the local workaround is fine
<cschneid_> we need to get up to current rubies too
__Yiota has joined #ruby
<dminuoso> Yeah, Ill look into this further, maybe Ill find the issue.
<cschneid_> plus my day is about over :)
<dminuoso> It almost feels like Ruby is doing a slight mistake in its getaddrinfo logic.
<dminuoso> this issue is over 10 years old..
danielpclark has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
freddymungo_ has quit [Ping timeout: 260 seconds]
skweek has quit [Ping timeout: 268 seconds]
cagomez has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
kht has joined #ruby
xen0fon has quit [Quit: xen0fon]
BabyMario has joined #ruby
lanc has joined #ruby
BabyMario has left #ruby [#ruby]
bkxd has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Derperperd has joined #ruby