robotmay has quit [Remote host closed the connection]
chessguy has joined #ruby-lang
mrsolo has quit [Quit: Leaving]
zrail has joined #ruby-lang
s0ra_h is now known as sora_h
<jtoy>
are class variables safe across threads?
<jtoy>
unique across threads?
sailias has quit [Quit: Leaving.]
<lianj>
uniq yes
slyphon has quit [Quit: WeeChat 0.3.7]
savage- has quit [Remote host closed the connection]
null- has joined #ruby-lang
banisterfiend has quit [Ping timeout: 246 seconds]
QaDeS_ has joined #ruby-lang
QaDeS has quit [Ping timeout: 246 seconds]
banisterfiend has joined #ruby-lang
mistym has quit [Remote host closed the connection]
pbjorklund has quit [Ping timeout: 240 seconds]
pbjorklund has joined #ruby-lang
lele|w has quit [Ping timeout: 272 seconds]
rhalff has quit [Ping timeout: 265 seconds]
outsmartin1 has quit [Quit: Leaving.]
yugui_zzz is now known as yugui
gix has quit [Ping timeout: 244 seconds]
<jtoy>
lianj: great
wallerdev has joined #ruby-lang
yugui is now known as yugui_zzz
gix has joined #ruby-lang
HassanS has joined #ruby-lang
htroyack has joined #ruby-lang
lele|w has joined #ruby-lang
JustinCampbell has quit [Remote host closed the connection]
RORgasm has joined #ruby-lang
postmodern has joined #ruby-lang
towski has quit [Remote host closed the connection]
RORgasm has quit [Ping timeout: 246 seconds]
drollwit has joined #ruby-lang
jperry2 has quit [Quit: jperry2]
drollwit has quit [Read error: Operation timed out]
sailias has joined #ruby-lang
<drbrain>
?? no, class variables aren't unique or safe across threads
<jtoy>
drbrain: per out talk yesterday, i tested , they do seem to be unique, but i did change it to use your style
<jtoy>
the code does become more messy though
<jtoy>
hence my confusion on if its unique or not
<drbrain>
if you have two threads accessing the same class variable you will have trouble
<volty>
so, if they aren't unique and aren't safe, how they are? :)
<volty>
undefined?
<jtoy>
drbrain: my test was to have each thread use a class variable to make a connection to twitter, there were as many open connections to twitter as there were threads/class variables, not sure if i should do a more thorough test, but if they were not unique, then i expect only 1 persistent connection
<jtoy>
drbrain: i tested open connections with lsof
<drbrain>
jtoy: by class variable you mean @@connection, right?
<jtoy>
drbrain: yes
<drbrain>
jtoy: you should probably use an instance variable if each thread is going to have its own instance
<drbrain>
class TwitterConnectionThing; def initialize() @connection = Excon.whatever; end; end
<drbrain>
then, Thread.new do t = TwitterConnectionThing.new; t.whatever; end
<jtoy>
drbrain: yeah, that is much easier, i implemented it a crappier way
jperry2 has joined #ruby-lang
<drbrain>
this way each twitter connection thing is separate and you don't have to worry about locking
<jtoy>
drbrain: I did : Thread.new do connection = Excon.new ; TwitterApi.get url, connection; end
<drbrain>
that would be great
<jtoy>
drbrain: my way is bad though, because it can't handle connections being lost cleanly, yours can though
peterc has joined #ruby-lang
<drbrain>
jtoy: I find it's easier to test if you can make it as simple as Thread.new do Thing.new.run end
<rfx>
Is there a standard way for gems for providing a changelog which can be queried by the user (similar to e.g. Debians changelog)? Can't find anyting on rubygems.org or in the docs. Checking a few gems shows differently named files with different changelog files ...
<jtoy>
drbrain: yeah, i didnt need state before, typically if i don't need state i try to just use a class method
<drbrain>
rfx: not yet, but the next release will have metadata
<rfx>
drbrain: thx
jperry2 has quit [Quit: jperry2]
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
Natch has quit [Ping timeout: 248 seconds]
jtoy has quit [Quit: jtoy]
volty has quit [Remote host closed the connection]
Aurica has joined #ruby-lang
seanstickle has quit [Quit: Nihil sub sole novum]
Silowyi has quit [Ping timeout: 244 seconds]
Aurica has quit [Read error: Connection reset by peer]
Silowyi has joined #ruby-lang
HassanS has quit [Quit: Lost terminal]
ryanf has quit [Quit: leaving]
wmoxam has joined #ruby-lang
WillMarshall has joined #ruby-lang
Aurica has joined #ruby-lang
qpingu has left #ruby-lang [#ruby-lang]
Silowyi has quit [Ping timeout: 246 seconds]
null- has left #ruby-lang [#ruby-lang]
Aurica has quit [Ping timeout: 246 seconds]
robotmay has joined #ruby-lang
byronb has joined #ruby-lang
pajamapajama has joined #ruby-lang
pajamapajama has quit [Remote host closed the connection]
GeekOnCoffee_ has left #ruby-lang [#ruby-lang]
robotmay has quit [Ping timeout: 246 seconds]
headius has quit [Quit: headius]
agile has quit [Ping timeout: 245 seconds]
QaDeS_ has quit [Quit: Ex-Chat]
Sambalero has joined #ruby-lang
tomb has quit [Quit: Computer has gone to sleep.]
drollwit has joined #ruby-lang
gregf has joined #ruby-lang
wmoxam has quit [Ping timeout: 265 seconds]
pajama has joined #ruby-lang
jxie_ has joined #ruby-lang
jxie has quit [Ping timeout: 248 seconds]
banisterfiend has quit [Remote host closed the connection]
jfelchner has quit [Ping timeout: 246 seconds]
bfreeman has quit [Quit: bfreeman]
RORgasm has joined #ruby-lang
sailias has quit [Ping timeout: 246 seconds]
RORgasm has quit [Ping timeout: 246 seconds]
televisor has joined #ruby-lang
mikeric has quit [Quit: mikeric]
televisor has quit [Client Quit]
televisor has joined #ruby-lang
Sambaler_ has joined #ruby-lang
Sambalero has quit [Read error: Connection reset by peer]
televisor has quit [Quit: televisor]
Sambaler_ has quit [Read error: Connection reset by peer]
Sambalero has joined #ruby-lang
Sambalero has quit [Read error: Connection reset by peer]
Sambalero has joined #ruby-lang
Sambalero has quit [Read error: Connection reset by peer]
Sambalero has joined #ruby-lang
towski has joined #ruby-lang
Sambalero has quit [Read error: Connection reset by peer]
Sambalero has joined #ruby-lang
Sambalero has quit [Read error: Connection reset by peer]
Sambalero has joined #ruby-lang
Sambalero has quit [Read error: Connection reset by peer]
Sambalero has joined #ruby-lang
Sambalero has quit [Read error: Connection reset by peer]
Sambalero has joined #ruby-lang
igotnolegs has joined #ruby-lang
Sambalero has quit [Read error: Connection reset by peer]
Sambalero has joined #ruby-lang
dhruvasagar has joined #ruby-lang
Sambaler_ has joined #ruby-lang
Sambalero has quit [Read error: Connection reset by peer]
Sambalero has joined #ruby-lang
Sambaler_ has quit [Read error: Connection reset by peer]
Sambaler_ has joined #ruby-lang
Sambaler_ has quit [Read error: Connection reset by peer]
Sambalero has quit [Read error: Connection reset by peer]
jtoy has joined #ruby-lang
Sambalero has joined #ruby-lang
Sambaler_ has joined #ruby-lang
Sambalero has quit [Read error: Connection reset by peer]
Sambaler_ has quit [Read error: Connection reset by peer]
Sambalero has joined #ruby-lang
Sambalero has quit [Read error: Connection reset by peer]
Sambalero has joined #ruby-lang
Sambaler_ has joined #ruby-lang
Sambalero has quit [Read error: Connection reset by peer]
bfreeman has joined #ruby-lang
sora_h is now known as s0ra_h
savage- has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 246 seconds]
perryh_away is now known as perryh
WillMarshall has quit [Quit: Computer has gone to sleep.]
perryh is now known as perry
WillMarshall has joined #ruby-lang
s0ra_h is now known as sora_h
<postmodern>
how do you stream a file from a CDN to disk with Mechanize
<postmodern>
where the URI has no file extension
<postmodern>
is mechanize mime-type aware?
igotnolegs has quit [Quit: Computer has gone to sleep.]
Sambaler_ has quit [Remote host closed the connection]
Sambalero has joined #ruby-lang
Axsuul has quit [Ping timeout: 246 seconds]
savage- has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
htroyack has quit []
cantonic_ has joined #ruby-lang
andrewhl has joined #ruby-lang
clam has joined #ruby-lang
cantonic has quit [Ping timeout: 248 seconds]
cantonic_ is now known as cantonic
Sambalero has quit [Remote host closed the connection]
sora_h is now known as s0ra_h
WillMarshall has quit [Quit: Computer has gone to sleep.]
peterc has quit [Remote host closed the connection]
drollwit has quit [Remote host closed the connection]
banisterfiend has quit [Remote host closed the connection]
burgestrand has quit [Quit: Leaving.]
tesseract has joined #ruby-lang
towski has quit [Ping timeout: 250 seconds]
wallerdev has quit [Quit: wallerdev]
Axsuul has joined #ruby-lang
mistym has quit [Remote host closed the connection]
tesseract has quit [Quit: tesseract]
Silowyi has joined #ruby-lang
Silowyi has quit [Ping timeout: 252 seconds]
dc5ala has joined #ruby-lang
s0ra_h is now known as sora_h
pajama has quit [Remote host closed the connection]
singpolyma has quit [Ping timeout: 272 seconds]
ryanf has joined #ruby-lang
hakunin has quit [Read error: Connection reset by peer]
j342 has joined #ruby-lang
toretore has joined #ruby-lang
hakunin has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
mikeric has joined #ruby-lang
singpolyma has joined #ruby-lang
andrewhl has quit [Remote host closed the connection]
perry is now known as perryh_away
banisterfiend has joined #ruby-lang
banisterfiend` has joined #ruby-lang
banisterfiend` has quit [Remote host closed the connection]
banisterfiend has quit [Ping timeout: 265 seconds]
banisterfiend has joined #ruby-lang
mikeric has quit [Quit: mikeric]
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
singpolyma has quit [Ping timeout: 244 seconds]
banisterfiend has quit [Ping timeout: 240 seconds]
dfr|mac has quit [Remote host closed the connection]
outoftime has quit [Read error: Operation timed out]
lsegal has joined #ruby-lang
grj has quit [Read error: Connection timed out]
grj has joined #ruby-lang
mollerhoj3_ has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
workmad3 has joined #ruby-lang
dfr|mac has joined #ruby-lang
ruurd has joined #ruby-lang
mollerhoj3_ has left #ruby-lang [#ruby-lang]
dfr|mac has quit [Remote host closed the connection]
tonni_ has joined #ruby-lang
Natch has left #ruby-lang [#ruby-lang]
skynet1024 has quit [Ping timeout: 245 seconds]
outoftime has joined #ruby-lang
tonni has quit [Ping timeout: 246 seconds]
jperry2 has quit [Quit: jperry2]
ruurd has quit [Quit: Leaving...]
sepp2k has joined #ruby-lang
mollerhoj3_ has joined #ruby-lang
mollerhoj3_ has left #ruby-lang [#ruby-lang]
ryanf has joined #ruby-lang
jtoy has joined #ruby-lang
sailias has joined #ruby-lang
dfr|mac has joined #ruby-lang
bglusman has joined #ruby-lang
bryancp has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 255 seconds]
Asher has joined #ruby-lang
dfr|mac has quit [Remote host closed the connection]
bryancp has quit [Remote host closed the connection]
Fretta has joined #ruby-lang
kain has quit [Quit: quit]
dhruvasagar has joined #ruby-lang
amalrik_maia has left #ruby-lang [#ruby-lang]
brunocoelho has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
icooba has quit [Quit: Computer has gone to sleep.]
gregmore_ has quit [Read error: Operation timed out]
tonni has joined #ruby-lang
gregmoreno has joined #ruby-lang
kyrylo has quit [Quit: WeeChat 0.3.8]
coryf has joined #ruby-lang
tonni_ has quit [Ping timeout: 246 seconds]
enebo has quit [Quit: enebo]
dfr|mac has joined #ruby-lang
workmad3 has quit [Ping timeout: 240 seconds]
j3424 has quit [Quit: Leaving]
sora_h is now known as s0ra_h
jfelchner has joined #ruby-lang
umttumt has joined #ruby-lang
tonni_ has joined #ruby-lang
Administrator_ has joined #ruby-lang
cha1tanya has joined #ruby-lang
dfr|mac has quit [Remote host closed the connection]
grj has quit [Ping timeout: 240 seconds]
tonni has quit [Ping timeout: 246 seconds]
savage- has joined #ruby-lang
workmad3 has joined #ruby-lang
tr-808 has quit [Quit: leaving]
tr-808 has joined #ruby-lang
publicvoid__ has joined #ruby-lang
coryf has quit [Remote host closed the connection]
publicvoid_ has quit [Ping timeout: 248 seconds]
brianpWins has joined #ruby-lang
pabloh has quit [Quit: Ex-Chat]
outsmartin has joined #ruby-lang
nertzy has joined #ruby-lang
outsmartin1 has quit [Ping timeout: 250 seconds]
outsmartin1 has joined #ruby-lang
workmad3 has quit [Ping timeout: 265 seconds]
neocoin has quit [Remote host closed the connection]
outsmartin has quit [Ping timeout: 246 seconds]
jscherff has joined #ruby-lang
ryanf_ has joined #ruby-lang
jxie has joined #ruby-lang
naz has joined #ruby-lang
savage- has quit [Remote host closed the connection]
jscherff_ has joined #ruby-lang
outsmartin has joined #ruby-lang
outsmartin1 has quit [Ping timeout: 244 seconds]
dfr|mac has joined #ruby-lang
dfr|mac has quit [Remote host closed the connection]
jscherff_ is now known as jmscherff
saLOUt has quit [Quit: Konversation terminated!]
jmscherff is now known as jscherff_
iamlacroix has joined #ruby-lang
jscherff has quit [Quit: Leaving]
jscherff has joined #ruby-lang
jscherff has quit [Client Quit]
ryanf_ has quit [Quit: leaving]
brunocoelho has joined #ruby-lang
jmscherff has joined #ruby-lang
jscherff_ is now known as jmscherff_
jmscherff_ is now known as jscherff_
jscherff_ is now known as jmscherff_
jmscherff has quit [Client Quit]
<jtoy>
if in a thread I call Queue#pop and the queue is empty, but i have another thread still doing calculations, why would I get a deadlock exception?
febuiles has joined #ruby-lang
<jtoy>
should I be checking the queue size before popping every time??
<seanstickle>
febuiles: that's ALL you typed in irb?
<febuiles>
seanstickle: yup
<febuiles>
the irb case makes sense to me, it defs the method inside Object so it's available for Array and other classes, not sure why its defined as private when I run the interpreter
<seanstickle>
weird
<seanstickle>
{}.my_method does the same thing in irb
<seanstickle>
I dunno, some namespace thing I suppose
<seanstickle>
Smarter mind than me will have to answer
<seanstickle>
Ah
jmscherff_ has quit [Remote host closed the connection]
andrewhl has quit [Remote host closed the connection]
mollerhoj3_ has joined #ruby-lang
mollerhoj3_ has left #ruby-lang [#ruby-lang]
jscherff_ has joined #ruby-lang
jscherff_ has quit [Remote host closed the connection]
<countdigi>
lil off topic but anyone using chef-solo?
<whitequark>
febuiles: irb resets the default method visibility on toplevel context
<whitequark>
I'm not exactly sure where it happens, you'll need to grep whole irb source to determine that
<whitequark>
try putting "public" at the top of the script
<whitequark>
it'll make it work exactly the same in irb/interp
<lianj>
or do it the right way
<febuiles>
whitequark: by reset you mean it sets it to public then?