michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michaeldeol has joined #ruby-lang
Cakey has quit [Ping timeout: 260 seconds]
weems|mac has quit [Quit: weems|mac]
mkaesz has joined #ruby-lang
weems|mac has joined #ruby-lang
gix has quit [Ping timeout: 246 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tkuchiki has joined #ruby-lang
mkaesz has quit [Ping timeout: 255 seconds]
gix has joined #ruby-lang
charliesome has joined #ruby-lang
Cakey has joined #ruby-lang
dm78 has quit [Remote host closed the connection]
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
cap has joined #ruby-lang
diegovio1 has joined #ruby-lang
gjaldon has joined #ruby-lang
diegoviola has quit [Ping timeout: 240 seconds]
weems|mac has quit [Quit: weems|mac]
johnpclaus has joined #ruby-lang
cap has quit [Remote host closed the connection]
cap has joined #ruby-lang
diegoviola has joined #ruby-lang
diegovio1 has quit [Read error: Connection reset by peer]
nathanstitt has quit [Quit: I growing sleepy]
nathanstitt has joined #ruby-lang
nathanstitt has quit [Client Quit]
shinnya has quit [Ping timeout: 244 seconds]
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
cap has quit [Ping timeout: 264 seconds]
yatish27 has quit [Ping timeout: 244 seconds]
gjaldon has quit [Remote host closed the connection]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
weems|mac has joined #ruby-lang
gjaldon has joined #ruby-lang
dm78 has joined #ruby-lang
dm78 has quit [Ping timeout: 255 seconds]
zz_anildigital is now known as anildigital
cap has joined #ruby-lang
LBo has joined #ruby-lang
mkaesz has joined #ruby-lang
mkaesz has quit [Ping timeout: 260 seconds]
pr0ton has joined #ruby-lang
Tab_ has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pipework>
jhass|off: We have some polyglots there.
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
Tab_ has quit [Quit: This computer has gone to sleep]
matti has quit [Ping timeout: 240 seconds]
matti has joined #ruby-lang
matti has quit [Changing host]
matti has joined #ruby-lang
Tab_ has joined #ruby-lang
pr0ton has quit [Quit: pr0ton]
pr0ton has joined #ruby-lang
havenwood has joined #ruby-lang
dm78 has joined #ruby-lang
yatish27 has joined #ruby-lang
dm78 has quit [Ping timeout: 240 seconds]
cap has quit [Remote host closed the connection]
cap has joined #ruby-lang
cap has quit [Ping timeout: 240 seconds]
mkaesz has joined #ruby-lang
gjaldon has quit [Remote host closed the connection]
gjaldon has joined #ruby-lang
gjaldon has quit [Remote host closed the connection]
gjaldon has joined #ruby-lang
Asher has quit [Ping timeout: 250 seconds]
Asher has joined #ruby-lang
abhi_rsd has joined #ruby-lang
mkaesz has quit [Ping timeout: 272 seconds]
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
anildigital is now known as zz_anildigital
yatish27 has quit [Ping timeout: 240 seconds]
AKASkip has joined #ruby-lang
Cakey has quit [Ping timeout: 240 seconds]
rippa has joined #ruby-lang
Cakey has joined #ruby-lang
abhi_rsd has quit [Ping timeout: 240 seconds]
AKASkip has quit [Ping timeout: 272 seconds]
havenwood has quit [Remote host closed the connection]
rsl has quit [Ping timeout: 244 seconds]
Cakey has quit [Ping timeout: 240 seconds]
Cakey has joined #ruby-lang
rsl has joined #ruby-lang
Cakey has quit [Ping timeout: 246 seconds]
dm78 has joined #ruby-lang
Cakey has joined #ruby-lang
relix has joined #ruby-lang
dm78 has quit [Ping timeout: 240 seconds]
nofxx has quit [Remote host closed the connection]
qiukun has joined #ruby-lang
Cakey has quit [Ping timeout: 250 seconds]
qiukun__ has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
mkaesz has joined #ruby-lang
qiukun has quit [Ping timeout: 250 seconds]
Cakey has joined #ruby-lang
qiukun__ has quit [Ping timeout: 260 seconds]
mkaesz has quit [Ping timeout: 255 seconds]
pr0ton has quit [Quit: pr0ton]
Cakey has quit [Ping timeout: 246 seconds]
pr0ton has joined #ruby-lang
Cakey has joined #ruby-lang
ranchodev has joined #ruby-lang
gjaldon_ has joined #ruby-lang
weems|mac has quit [Quit: weems|mac]
gjaldon has quit [Ping timeout: 272 seconds]
Cakey has quit [Ping timeout: 250 seconds]
Cakey has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
hellangel7 has joined #ruby-lang
hellangel7 has quit [Max SendQ exceeded]
hellangel7 has joined #ruby-lang
Cakey has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby-lang
zz_anildigital is now known as anildigital
cap has joined #ruby-lang
Cakey has joined #ruby-lang
pr0ton has quit [Quit: pr0ton]
chris2 has quit [Ping timeout: 240 seconds]
chris2 has joined #ruby-lang
dm78 has joined #ruby-lang
pr0ton has joined #ruby-lang
chris2 has quit [Ping timeout: 250 seconds]
chris2 has joined #ruby-lang
dm78 has quit [Ping timeout: 240 seconds]
Cakey has quit [Ping timeout: 255 seconds]
Cakey has joined #ruby-lang
chris2 has quit [Ping timeout: 240 seconds]
chris2 has joined #ruby-lang
_ht has joined #ruby-lang
futilegames has joined #ruby-lang
pr0ton has quit [Quit: pr0ton]
mkaesz has joined #ruby-lang
Cakey has quit [Ping timeout: 240 seconds]
jammanbo has joined #ruby-lang
diegoviola has quit [Quit: WeeChat 0.4.3]
Cakey has joined #ruby-lang
diegoviola has joined #ruby-lang
mkaesz has quit [Ping timeout: 272 seconds]
<jammanbo>
I've a gem called validations. It comes with binstubs. In another gem my Gemfile and gemspec use the validations gem. When I generate its binstubs, the ones from validations seem to interfere. E.g. the rake shim looks like `load Gem.bin_path('validations', 'rake')` rather than `load Gem.bin_path('rake', 'rake')`. This seems wrong. What to do about this?
Cakey has quit [Ping timeout: 245 seconds]
fusillicode has joined #ruby-lang
Tab_ has quit [Quit: This computer has gone to sleep]
mistym has quit [Remote host closed the connection]
shinnya has joined #ruby-lang
Cakey has joined #ruby-lang
fusillicode has quit [Ping timeout: 260 seconds]
jsaak has quit [Ping timeout: 260 seconds]
Cakey has quit [Ping timeout: 255 seconds]
Cakey has joined #ruby-lang
frank_o has quit [Ping timeout: 250 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jsaak has joined #ruby-lang
Cakey has quit [Ping timeout: 255 seconds]
Cakey has joined #ruby-lang
fusillicode has joined #ruby-lang
mkaesz has joined #ruby-lang
fusillicode has quit [Read error: Connection reset by peer]
Cakey has quit [Ping timeout: 260 seconds]
LBo has quit [Ping timeout: 246 seconds]
Cakey has joined #ruby-lang
LBo has joined #ruby-lang
Tab_ has joined #ruby-lang
AKASkip has joined #ruby-lang
futilegames has quit [Quit: futilegames]
anildigital is now known as zz_anildigital
Cakey has quit [Ping timeout: 255 seconds]
dm78 has joined #ruby-lang
Cakey has joined #ruby-lang
snoopybbt has joined #ruby-lang
sMecKs has quit [Read error: Connection reset by peer]
havenwood has joined #ruby-lang
fusillicode has joined #ruby-lang
dm78 has quit [Ping timeout: 260 seconds]
hellangel7 has quit [Max SendQ exceeded]
shinnya has quit [Ping timeout: 250 seconds]
<whitequark>
why do your gems even use binstubs?
koderok has joined #ruby-lang
koderok has quit [Client Quit]
fusillicode has quit [Ping timeout: 240 seconds]
Cakey has quit [Ping timeout: 240 seconds]
vintik has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
Cakey has joined #ruby-lang
Miphix has joined #ruby-lang
relix has joined #ruby-lang
jsaak has quit [Ping timeout: 240 seconds]
Cakey has quit [Ping timeout: 246 seconds]
jsaak has joined #ruby-lang
havenwood has joined #ruby-lang
Cakey has joined #ruby-lang
fusillicode has joined #ruby-lang
kyb3r_ has quit [Read error: Connection reset by peer]
adphillips has joined #ruby-lang
adphillips has quit [Client Quit]
Cakey has quit [Ping timeout: 250 seconds]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
bffff_ has quit [Quit: Connection closed for inactivity]
tkuchiki has quit [Ping timeout: 264 seconds]
havenwood has quit [Remote host closed the connection]
cap has quit [Remote host closed the connection]
Cakey has joined #ruby-lang
cap has joined #ruby-lang
Tab_ has quit [Quit: This computer has gone to sleep]
Cakey has quit [Ping timeout: 244 seconds]
Cakey has joined #ruby-lang
stamina has joined #ruby-lang
Cakey has quit [Ping timeout: 240 seconds]
cap has quit [Remote host closed the connection]
cap has joined #ruby-lang
Tab_ has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 246 seconds]
emmesswhy has quit [Quit: This computer has gone to sleep]
cap has quit [Ping timeout: 245 seconds]
Cakey has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 260 seconds]
alexju has joined #ruby-lang
robbyoconnor has joined #ruby-lang
alexju has quit [Remote host closed the connection]
alexju has joined #ruby-lang
Tab_ has quit [Quit: This computer has gone to sleep]
dm78 has joined #ruby-lang
alexju has quit [Ping timeout: 244 seconds]
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby-lang
alexju has joined #ruby-lang
dm78 has quit [Ping timeout: 255 seconds]
postmodern has quit [Quit: Leaving]
Tab_ has joined #ruby-lang
alexju has quit [Remote host closed the connection]
alexju has joined #ruby-lang
robbyoconnor has quit [Excess Flood]
michd is now known as MichD
alexju has quit [Ping timeout: 264 seconds]
jhass|off is now known as jhass
frank_o has joined #ruby-lang
rippa has quit [Ping timeout: 255 seconds]
Cakey has quit [Ping timeout: 244 seconds]
davispuh has joined #ruby-lang
dorei has joined #ruby-lang
Tab_ has quit [Quit: This computer has gone to sleep]
marr has joined #ruby-lang
emmesswhy has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
relix has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
mikecmpbll has joined #ruby-lang
Tab_ has joined #ruby-lang
Tab_ has quit [Client Quit]
Tab_ has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hellangel7 has joined #ruby-lang
hellangel7 has quit [Max SendQ exceeded]
hellangel7 has joined #ruby-lang
Cakey has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
diegoviola has quit [Ping timeout: 245 seconds]
darkness has joined #ruby-lang
darkness is now known as Guest64767
diegoviola has joined #ruby-lang
dm78 has joined #ruby-lang
marr has quit [Ping timeout: 245 seconds]
dm78 has quit [Ping timeout: 264 seconds]
emmesswhy has quit [Quit: This computer has gone to sleep]
amclain has quit [Quit: Leaving]
Boohbah has quit [Write error: Broken pipe]
Boohbah has joined #ruby-lang
vintik has quit [Remote host closed the connection]
<yorickpeterse>
jammanbo: don't use binstubs in Gems
<jammanbo>
I think I read advice to the contrary … ?
<jammanbo>
In any event, I figured out what the problem was.
<yorickpeterse>
Why do you need binstubs in your Gem? Your Gem should only ship executables for your own code
frank_o has quit [Ping timeout: 260 seconds]
<yorickpeterse>
e.g. Rails only comes with a "rails" executable, it doesn't come with binstubs for "rake", "bundle", etc
havenwood has joined #ruby-lang
sarkyniin has joined #ruby-lang
diegoviola has quit [Ping timeout: 255 seconds]
marr has joined #ruby-lang
<jhass>
ls
<jhass>
meh, sorry
sarkyniin has quit [Ping timeout: 264 seconds]
havenwood has quit [Remote host closed the connection]
sarkyniin has joined #ruby-lang
Miphix has quit [Read error: Connection reset by peer]
havenwood has joined #ruby-lang
torrieri_ has joined #ruby-lang
Miphix has joined #ruby-lang
torrieri has quit [Ping timeout: 250 seconds]
havenwood has quit [Remote host closed the connection]
nertzy has quit [Quit: This computer has gone to sleep]
vintik has joined #ruby-lang
brothmars has quit [Ping timeout: 264 seconds]
jsodini has quit [Read error: Connection reset by peer]
Atlas159 has joined #ruby-lang
weems|mac has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
Lewix has joined #ruby-lang
hellangel7 has quit [Remote host closed the connection]
gjaldon has quit [Remote host closed the connection]
gjaldon has joined #ruby-lang
lun_ has joined #ruby-lang
alexju has quit [Remote host closed the connection]
alexju has joined #ruby-lang
vintik has quit [Remote host closed the connection]
emmesswhy has joined #ruby-lang
alexju has quit [Ping timeout: 260 seconds]
brothmars has joined #ruby-lang
Squarepy has joined #ruby-lang
vintik has joined #ruby-lang
mistym has joined #ruby-lang
gianlucadv has quit [Ping timeout: 250 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister is now known as banisterfiend
emmesswhy has quit [Quit: This computer has gone to sleep]
<banisterfiend>
anyone here have much experience with multi threaded programming in ruby?
vintik has quit [Ping timeout: 255 seconds]
<yxhuvud>
not all that much but some.
<yxhuvud>
what is your issue?
torrieri has quit [Quit: Leaving...]
momomomomo has joined #ruby-lang
amclain has joined #ruby-lang
momomomomo has quit [Client Quit]
<banisterfiend>
yxhuvud when waiting on a condition variable you can pass an optional time out, my question is when the wait times out, does the thread reacquire a mutex or does it carry on without a mutex?
<yxhuvud>
I'd assume the latter. can you check some return value?
johnpclaus has quit []
ironhide_604 has quit [Quit: ironhide_604]
<yxhuvud>
or if you have the mutex?
momomomomo has joined #ruby-lang
relix has joined #ruby-lang
<whitequark>
banisterfiend: it doesn't acquire mutex at all
lsegal has joined #ruby-lang
<whitequark>
banisterfiend: forget what I said
cap has joined #ruby-lang
<banisterfiend>
whitequark no problem, i hate this confusing shit :) Trying to debug a multi producer/multi consumer app
<whitequark>
banisterfiend: after checking it properly I believe it reacquires the mutex
<banisterfiend>
whitequark thanks, do u have the code you used to check it?
redgetan has quit [Quit: This computer has gone to sleep]
<banisterfiend>
whitequark do you know much about "spurious wakeups" ?
<banisterfiend>
I think that's the cause of teh bug i'm looking at now
gianlucadv has joined #ruby-lang
Cakey has quit [Ping timeout: 240 seconds]
<whitequark>
banisterfiend: it uses Mutex#sleep
<whitequark>
>When the thread is next woken up, it will attempt to reacquire the lock.
<whitequark>
>Note that this method can wakeup without explicit Thread#wakeup call. For example, receiving signal and so on.
<banisterfiend>
avdi i also think spurios wakeups are teh reason for your fixed.rb (in your threading tapas) failing, rather than the super-complicated explanation given in fixed2
cap has quit [Remote host closed the connection]
futilegames has joined #ruby-lang
cap has joined #ruby-lang
futilegames has quit [Client Quit]
gjaldon has quit []
cap has quit [Ping timeout: 240 seconds]
<banisterfiend>
avdi replacing your line: "@item_available.wait(@lock, cv_timeout) if @items.empty?" with "@item_available.wait(@lock, cv_timeout) while @items.empty?" appears to fix the bug (wrapping it in a loop appears to be the canonical way to deal with spurious wakeups).
cap has joined #ruby-lang
arBmind has joined #ruby-lang
torrieri has joined #ruby-lang
weems|mac has quit [Quit: weems|mac]
stamina has quit [Ping timeout: 255 seconds]
torrieri_ has joined #ruby-lang
torrieri has quit [Read error: Connection reset by peer]
emmesswhy has joined #ruby-lang
torrieri_ has quit [Ping timeout: 272 seconds]
momomomomo has quit [Quit: momomomomo]
Rylee has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
vondruch has quit [Ping timeout: 250 seconds]
MikaAK has quit [Remote host closed the connection]
KillerFox has quit [Ping timeout: 250 seconds]
dynamism1 has joined #ruby-lang
relix has quit [Ping timeout: 240 seconds]
frank_o has joined #ruby-lang
KillerFox has joined #ruby-lang
torrieri has quit [Ping timeout: 250 seconds]
futilegames has quit [Quit: futilegames]
relix has joined #ruby-lang
MikaAK has joined #ruby-lang
charliesome has quit [Quit: zzz]
_ht has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
Squarepy has quit [Remote host closed the connection]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
torrieri has joined #ruby-lang
michaeldeol has joined #ruby-lang
<avdi>
banisterfiend: interesting!
yfeldblum has joined #ruby-lang
<banisterfiend>
avdi i'm not 100% sure on it btw, i find this stuff pretty confusing. But replacing the if with a while does stop fixed.rb from crashing -- though that's only because you don't actually provide a timeout (timeout is set to nil). In the case you do actually pass a timeout value, then obvs the while loop isn't appropriate anymore
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
|jemc| has joined #ruby-lang
brothmars has quit [Ping timeout: 264 seconds]
mello has joined #ruby-lang
pr0ton has joined #ruby-lang
mello has quit [Ping timeout: 240 seconds]
shinnya has joined #ruby-lang
mello has joined #ruby-lang
karamazov has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
<avdi>
banisterfiend: I'm wondering now what's the easiest way to trace wakeups
saltsa has quit [Ping timeout: 255 seconds]
mello has quit [Ping timeout: 272 seconds]
mello has joined #ruby-lang
saltsa has joined #ruby-lang
AKASkip has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby-lang
fusillicode has quit [Quit: Leaving.]
fusillicode has joined #ruby-lang
saltsa has quit [Ping timeout: 250 seconds]
fusillicode has quit [Client Quit]
<banisterfiend>
avdi actually i don't think it's spurious wakeups in this case -- it's just that in between thread1 being signalled and waking up + acquiring the mutex, thread 2 comes along and grabs the mutex and steals the item. As a result the item that thread 1 was signalled about no longer exists. The way that people seem to get around this is by putting the wait in a loop with a condition, so that it rechecks the condition (i.e is there a
<banisterfiend>
item for me?) after it wakes up. I guess this would also protect against spurious wakeups too though
charliesome has quit [Ping timeout: 240 seconds]
<avdi>
hmmm
<avdi>
I almost certainly tried that first
mello has quit [Ping timeout: 240 seconds]
michaeldeol has joined #ruby-lang
pr0ton has quit [Quit: pr0ton]
charliesome has joined #ruby-lang
shinnya has quit [Ping timeout: 260 seconds]
<banisterfiend>
avdi but the fact you're supporting timeouts makes the whole thing a lot more complicated ;) So a lot of your machinery in fixed2 is probably required, but it's a bit much for me to grok right now
<avdi>
yeah, timeouts are an... interesting problem
saltsa has joined #ruby-lang
<avdi>
but I hate the solution of using the Timeout module. It's messy even if they DID finally fix the outright bugs in it.
<avdi>
actually I shouldn't say they fixed them
<avdi>
they just made Queue specially timeout safe
yatish27 has quit [Remote host closed the connection]
<avdi>
in any case, I don't like relying on exceptions for timeouts
mkaesz has quit [Remote host closed the connection]
dm78 has joined #ruby-lang
MichD is now known as michd
<banisterfiend>
avdi this is probably a dumb question - but when a condvar.wait times out, the thread reacquires the mutex right?
<avdi>
I've paged all of this stuff out of main memory, but iirc that sounds right
<banisterfiend>
yeah, sounds right to me too, internally it's just doing a mutex.sleep
shinnya has joined #ruby-lang
closer has quit [Ping timeout: 252 seconds]
sharpmachine has quit [Remote host closed the connection]
closer has joined #ruby-lang
dynamism1 has quit [Ping timeout: 245 seconds]
dm78 has quit [Remote host closed the connection]
dm78 has joined #ruby-lang
Mon_Ouie has quit [Quit: WeeChat 0.4.3]
lun_ has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
dm78 has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bin7me has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
jarto has joined #ruby-lang
cap_ has joined #ruby-lang
bin7me has quit [Client Quit]
cap has quit [Ping timeout: 240 seconds]
bin7me has joined #ruby-lang
jhass is now known as jhass|off
MikaAK has quit [Remote host closed the connection]
x0f has quit [Ping timeout: 264 seconds]
mkaesz has joined #ruby-lang
x0f has joined #ruby-lang
sepp2k has quit [Read error: Connection reset by peer]
mkaesz has quit [Ping timeout: 260 seconds]
weems|mac has joined #ruby-lang
MikaAK has joined #ruby-lang
dynamism1 has joined #ruby-lang
cap_ has quit [Remote host closed the connection]
cap has joined #ruby-lang
vintik has quit [Remote host closed the connection]
Xzyx987X has quit [Ping timeout: 250 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sharpmachine has joined #ruby-lang
rh1n0 has joined #ruby-lang
mkaesz has joined #ruby-lang
dm78 has joined #ruby-lang
dm78 has quit [Remote host closed the connection]
mkaesz has quit [Ping timeout: 250 seconds]
sharpmachine has quit [Remote host closed the connection]
<banisterfiend>
avdi afaict there is no pthread equivalent of ConditionVariable#wait() with a timeout arg -- pthread does have 'pthread_cond_timedwait' but it doesn't wakeup the thread after the timeout has elapsed, it instead returns an error. Probably because otherwise it's very tricky to know whether the thread was awoken cos of a timeout, or spurious wakeup (or a signal). My feeling is that Ruby's timeout arg to ConditionVariable#wait
<banisterfiend>
doesn't make a lot of sense...
mistym has joined #ruby-lang
charliesome has joined #ruby-lang
<sarkyniin>
hey
<sarkyniin>
you can access a function situated in a module outside of the current file
<sarkyniin>
right?
<sarkyniin>
if you require that file
<nofxx>
sarkyniin, more or less, you may need to include/extend
<sarkyniin>
nofxx: I used "require_relative" on the file with the module
<sarkyniin>
but when I try to access a function situated inside that module
<nofxx>
sarkyniin, there's no "self" around that method? do you understand object vs class methods?
<banisterfiend>
avdi java also has methods for a timed wait on a condition variable, but they return a value that tells you whether the thread was woken up as a result of a timeout or a signal, ruby's one doesn't give you that info so it's pretty useless IMO
<sarkyniin>
uh, nope no "self" around that method
<nofxx>
sarkyniin, well, the asnswer you want is: class A; include ThatModule; end A.new.bar
<nofxx>
or class A; extend ThatModule; A.bar
<nofxx>
sarkyniin, check out object / class methods or'll be lost in ruby's OO
<sarkyniin>
k
<sarkyniin>
thanks!
red_menace has quit [Quit: peer reset by connection]