<dminuoso>
catphish: So let's start with one thing. That particular loop is normal.
<catphish>
that surprises me, i understood that kernel call was quite expensive
<dminuoso>
catphish: Essentially it's just a spinlock.
<dminuoso>
But it shouldn't spin indefinitely.
<dminuoso>
(It's a spinlock around a semaphore)
ldnunes has quit [Ping timeout: 260 seconds]
<dminuoso>
Kind of I guess.
<catphish>
ok
<dminuoso>
catphish: Does the problem trigger reliably on exit?
agent_white has quit [Quit: bbl]
<catphish>
dminuoso: no, only randomly :(
<dminuoso>
The code comments are mindnumbing..
<dminuoso>
* send a signal to intent that a target thread return from blocking syscall.
<catphish>
i have a job worker that fetches a job to be performed, forks, allows the job (which usually has many threads) to run in the fork, then when the child dies, it moves onto the next job
<catphish>
this bug happens randomly across my whole app, but i usually see it on these worker children because they exit often
gizmore|2 is now known as gizmore
beilabs has joined #ruby
ldnunes has joined #ruby
c_3 has quit [Read error: Connection reset by peer]
c_3 has joined #ruby
<dminuoso>
matthewd: The timer thread is just the thread that preempts non-cooperative thats that don't release/gil and yield right?
<dminuoso>
*non-cooperative threads
<dminuoso>
catphish: I would be very interested in what other threads are still running and where.
<catphish>
i'll see if i can pull any more information
<catphish>
about running threads specifically
synthroid has joined #ruby
ascarter has joined #ruby
<matthewd>
dminuoso: I don't actually know what it does beyond "nothing particularly notable", tbh
BSAlb has joined #ruby
BSAlb has quit [Max SendQ exceeded]
<dminuoso>
matthewd: Mmm. The code is really tough to read and has "japanese" written all over it. :|
BSAlb has joined #ruby
ramfjord has joined #ruby
BSAlb has quit [Max SendQ exceeded]
kev1n has joined #ruby
BSAlb has joined #ruby
<catphish>
i'm just looking at a tangent mystery where one of the hung processes is a child created by open4 that shouldn't have been running ruby at all
BSaboia has quit [Ping timeout: 255 seconds]
BSAlb has quit [Max SendQ exceeded]
BSAlb has joined #ruby
BSAlb has quit [Read error: Connection reset by peer]
<dminuoso>
catphish: This is the only spot those ... wait
<dminuoso>
a moment
<dminuoso>
catphish: Please use gdb to tell me what timer_thread_pipe.writing actually is
<catphish>
nb. your understanding of this far exceeds mine, so apologies if i'm just nodding and hoping you will find something
<catphish>
dminuoso: gladly, how do i ask it?
kev1n has quit [Remote host closed the connection]
<catphish>
(gdb) whatis timer_thread_pipe.writing
<catphish>
type = rb_atomic_t
<catphish>
i assume that's not terribly useful information?
<dminuoso>
catphish: just use print :)
<catphish>
(gdb) print timer_thread_pipe.writing
<catphish>
$1 = 1
<dminuoso>
Yeah and I dont see how that could be with no threads left.
<dminuoso>
Unless the ATOMIC_INC/ATOMIC_DEC was buggy
<dminuoso>
file a bug report.
<dminuoso>
That is unless you have a native extension that fucks around with the timer directly
<catphish>
this is in the process with
<catphish>
oops
<catphish>
Id Target Id Frame
<catphish>
$1 = 1
<catphish>
(gdb) print timer_thread_pipe.writing
<catphish>
* 1 Thread 0x7f79872e8740 (LWP 15176) "ruby" 0x00007f7985f8c1d7 in sched_yield () at ../sysdeps/unix/syscall-template.S:81
<catphish>
so, in the process with only one thread, that still occurs
aufi has joined #ruby
ldnunes has quit [Ping timeout: 255 seconds]
<dminuoso>
catphish: File a bug report.
<catphish>
it certainly could be a native extension making a mess, this app has a lot of dependencies
<dminuoso>
catphish: Essentially there is a counter that is treated like this: atomic_inc_counter; do_stuff; atomic_dec_counter - that is the only place where that counter ever gets modified.
<dminuoso>
catphish: It starts out with 0. If it ends up with anything but 0, there's something strangely fucked up.
<dminuoso>
catphish: valgrind it perhaps
<catphish>
is it possible that a thread increments it, then we fork, leaving it incremented
bronson has joined #ruby
sysvalve has quit [Ping timeout: 240 seconds]
sysvalve has joined #ruby
<catphish>
can i see at a glance which gems i'm running have native code?
<catphish>
i had no idea it was so controversial :)
<ainieco>
catphish: yeah, was confused by other languages
<catphish>
yeah, makes sense, certainly looks like they vary
ldnunes has joined #ruby
<catphish>
dminuoso: do you know off-hand what code is being run inside the block that increments that counter, if i can make it increment, then fork, i might have a chance of making a test case
<dminuoso>
catphish: Yup that's the commit that introduced the code.
<catphish>
oh, my mistake
<catphish>
i was misunderstanding something there
<catphish>
am i right in my interpretation that a fork during that execution would lead to this situation?
marr has quit [Ping timeout: 246 seconds]
belmoussaoui has quit [Ping timeout: 248 seconds]
<dminuoso>
catphish: Explain why
<catphish>
dminuoso: if this code ran in a thread other than the main thread (which i assume is a possibility if someone has written code to spin and wait for it to unlock), then would a fork not cause the thread that incremented the value to be left behind (threads are not copied on fork) but the value would still remain incremented in the child
beilabs has quit [Remote host closed the connection]
hahuang65 has joined #ruby
<dminuoso>
catphish: Agreed. You could trivially provoke this situation in fact.
charliesome has joined #ruby
<dminuoso>
catphish: It does sound like a reasonable hypothesis. Test it. ;p
<dminuoso>
However..
<catphish>
any idea how i might do this?
belmoussaoui has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
uZiel has quit [Ping timeout: 248 seconds]
hahuang65 has quit [Ping timeout: 240 seconds]
ainieco has quit [Quit: leaving]
cpruitt has joined #ruby
belmoussaoui has quit [Client Quit]
belmoussaoui has joined #ruby
<dminuoso>
catphish: Well here's what has to happen:
ascarter has joined #ruby
beilabs has joined #ruby
<dminuoso>
catphish: There's 2 ways this wakeup call is triggered. a) whenever the gvl lock is acquired, and b) whenever a signal handler is called
rgtk has joined #ruby
aufi has quit [Quit: Leaving]
<catphish>
ah i understand the loop now: while (ATOMIC_CAS(timer_thread_pipe.writing, (rb_atomic_t)0, 0)) native_thread_yield();
<catphish>
so it's unquestionable that timer_thread_pipe.writing is being incremented and not decremented
funburn has joined #ruby
funburn has quit [Read error: Connection reset by peer]
ascarter has quit [Ping timeout: 260 seconds]
beilabs has quit [Read error: Connection reset by peer]
beilabs has joined #ruby
funburn has joined #ruby
uncle-bob has joined #ruby
funburn has quit [Read error: Connection reset by peer]
uncle-bob has quit [Remote host closed the connection]
aurelien has joined #ruby
_aeris_ has quit [Remote host closed the connection]
_aeris_ has joined #ruby
funburn has joined #ruby
naprimer2 has quit [Ping timeout: 260 seconds]
funburn has quit [Read error: Connection reset by peer]
DLSteve has joined #ruby
funburn has joined #ruby
funburn has quit [Read error: Connection reset by peer]
_aeris_ has quit [Remote host closed the connection]
bronson has joined #ruby
_aeris_ has joined #ruby
Bhootrk_ has joined #ruby
rgtk has quit [Ping timeout: 255 seconds]
funburn has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
jamesaxl has quit [Read error: Connection reset by peer]
konsolebox has joined #ruby
naprimer2 has joined #ruby
jamesaxl has joined #ruby
tvw has joined #ruby
gr33n7007h has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
Bhootrk_ has quit [Ping timeout: 276 seconds]
Bhootrk_ has joined #ruby
guardianx has joined #ruby
BSaboia has joined #ruby
t-recx has quit [Quit: t-recx]
mim1k has joined #ruby
<TheBrayn>
I have an if call that I want to change: „if foo.bar? && baz = somefunction“ when will the second part fail?
<matthewd>
TheBrayn: When it's false (or nil)?
<TheBrayn>
ok
<TheBrayn>
but this is an anti-pattern, right?
<matthewd>
I'd say it's worth some caution (because people may misread it), but I personally don't avoid it too hard. (Assuming we're talking about the use of an assignment in the conditional.)
dionysus69 has quit [Ping timeout: 260 seconds]
mooser has joined #ruby
Dump_not has joined #ruby
<TheBrayn>
ok I'll just wrap the second statement in parentheses
<catphish>
IMO assigning in an if and ignoring the result is unnecessary and hence a bad idea for readability
<catphish>
in this case, the second condition is *always* true, so there's no point having it in the conditional
<catphish>
if(baz=true) << pointless if(baz=check_something()) << ok (in my opinion)
<dminuoso>
catphish: and that ATOMIC_CAS must have been a brainfart.
<matthewd>
catphish: Do you know something about `somefunction` that I don't?
<TheBrayn>
yeah the result is used
dark_popara has joined #ruby
<catphish>
matthewd: oh, totally misread, i saw the closing quote and thought somefunction was a string
<catphish>
dminuoso: sorry, i don't follow
beilabs has quit [Remote host closed the connection]
mooser has quit [Ping timeout: 276 seconds]
ta_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<catphish>
it does seem like while(!timer_thread_pipe.writing) would achieve the same thing
<dminuoso>
catphish: No.
chouhoulis has joined #ruby
<dminuoso>
catphish: The load could be teared.
<catphish>
i'm afraid once again i don't understand
rgtk has joined #ruby
<dminuoso>
catphish: Though considering what the code does, it probably really doesnt matter anyway. It's quite racey.
<catphish>
oh, compare-and-swap is a safety for pointers
<dminuoso>
catphish: Well while(!timer_thread_pipe.writing) is a load right? It loads some say 32 bit data. It's not guaranteed it does so in a single instruction.
<catphish>
yeah, i think i understand
<catphish>
so, i still need to work out why it's non-zero :(
mikecmpb_ has joined #ruby
truenito has joined #ruby
<catphish>
i must admit i avoid shared memory between threads in c at all cost, so this is all quite new to me
__Yiota has joined #ruby
mikecmpbll has quit [Ping timeout: 258 seconds]
belmoussaoui has quit [Ping timeout: 260 seconds]
<dminuoso>
catphish: the fork theory sounds reasonable.
<dminuoso>
catphish: Well shared mutable state is the bane of all multithreading bugs :-)
beilabs has joined #ruby
Rodya_ has joined #ruby
Rapture has joined #ruby
<dminuoso>
catphish: Turns out Ruby folks knew about this, and ensure the timer thread is stopped before fork...
<catphish>
i was just looking for the before/aster fork code to check
chouhoul_ has joined #ruby
truenito has quit [Remote host closed the connection]
truenito has joined #ruby
<catphish>
does stopping the timer thread actually prevent that code running though?
Rodya_ has quit [Ping timeout: 276 seconds]
<dminuoso>
catphish: Yes.
ascarter has joined #ruby
stan has quit [Ping timeout: 240 seconds]
<dminuoso>
From what I can tell
ResidentBiscuit has joined #ruby
stan has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
snowcrshd has quit []
beilabs has quit [Remote host closed the connection]
<catphish>
sighandler() blindly calls rb_thread_wakeup_timer_thread() which blindly calls ATOMIC_INC(timer_thread_pipe.writing);
<catphish>
i see no code to check if the timer thread exists
<dminuoso>
catphish: In fact the timer stop code is empty for thread_pthread...
inoperable has quit [Quit: user rectified]
<catphish>
i'm still not comprehending how this could be triggered in real life
nOwz has joined #ruby
<thuryn>
dang. i missed the answer to my regexp question yesterday, and my client isn't logging.
<dminuoso>
catphish: Each time the gvl lock is reacquired.
<catphish>
oh, the call from ubf_select()
dark_popara has quit [Quit: WeeChat 1.9]
<dminuoso>
catphish: no that one is irrelevant
GodFather has joined #ruby
<catphish>
oh ok
<dminuoso>
or wait..
<dminuoso>
it calls the same function mmm
<catphish>
i couldn't find any other calls to it
ascarter has quit [Ping timeout: 258 seconds]
<dminuoso>
catphish: there's a call to rb_thread_wakeup_timer_thread_low from gvl_acquire_common
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso>
catphish: And that one in a multi-threaded environment is likely to be called whenever an effective context switch happens
apparition47 has joined #ruby
<catphish>
i didn't believe my application was creating any threads pre-fork, but it's certainly seeming likely this is the cause
antgel has joined #ruby
antgel has quit [Client Quit]
<thuryn>
does (^|\/) mean to match if the value of #{some_var} appears after the last / OR at the beginning of foo?
cam27 has joined #ruby
<thuryn>
foo =~ /(^|\/)#{some_var}$/ <--- regarding this
mikecmpb_ has quit [Quit: inabit. zz.]
jameser has joined #ruby
<catphish>
thuryn: ^ means the beginning of a line, $ means end of a line
<catphish>
thuryn: so, it matches if some_var occurs at the end of a line following / or is both at the beginning and the end of a line
mikecmpbll has joined #ruby
<catphish>
[beginning of line or /]some_var[end of line]
bronson has joined #ruby
<dminuoso>
catphish: Well if there's any signal communication that could be a another
cam27 has left #ruby [#ruby]
hays has joined #ruby
hays has joined #ruby
hays has quit [Changing host]
<dminuoso>
catphish: Im curious what ubf_select is about
<catphish>
dminuoso: i wondered that, but signals don't make a thread do they? so the code would complete before a fork happened
<dminuoso>
ubf means unblocking function supposedly
<hays>
if i want to reuse code (like a class for example) without going all in on a gem is there a way to do this? require_relative maybe?
<dminuoso>
catphish: technically signal handlers run outside normal thread flow but inside its process space
<hays>
usecase: I have a directory of ruby scripts that all work together and share common aspects, and they are in my $PATH
banisterfiend has joined #ruby
<thuryn>
catphish, okay, that's how i was reading it. thanks.
<dminuoso>
catphish: assume a signal handler to behave like an injectd setjmp/longjmp/longjmp
hightower2 has joined #ruby
<hightower2>
Hey, what's some good Ruby library for parsing a directory tree and finding files? (Some Find library/module, but not the one from standard lib)
<catphish>
a line of code in native_reset_timer_thread() would probably fix this, but it might be hacky at best
<dminuoso>
catphish: though. you are right.
<dminuoso>
without creating a thread pre-fork its impossible to race.
<catphish>
dminuoso: that's what i was thinking, however maybe i have a thread i'm not aware of, a stray timeout or similar
bronson has quit [Ping timeout: 240 seconds]
<dminuoso>
because the only thread is blocked from executoin until the signal handler is executed
<catphish>
dminuoso: that was my assessment
<dminuoso>
catphish: well you can check if there's a thread if you just set a breakpoint into the appropriate c function and just run until fork :P
<dminuoso>
catphish: But that thread would have to run basically during forking.
<dminuoso>
catphish: considering it's the main thread that has the signal handlers, I don't think its signals we have to worry about
<dminuoso>
its either the gvl_common_acquire or ubf_select
<hays>
anyone have any insight to my question? really just trying to put together some quick commandline utilities and I hate having to copypaste my classes everywhere
cschneid_ has joined #ruby
bruno- has joined #ruby
<dminuoso>
hays: require_relative is a thing :-)
<catphish>
pthread's native_reset_timer_thread() does nothing right now, but it could tidy up this mess if it wanted to
<Silthias1>
hays: cant comment on if its good practise or not, but i use require_relative for what your decribing
guardianx has quit []
<catphish>
hays: put them in files, require them
<hays>
and the relative part is relative to the script location not the current working directory right
<dminuoso>
Look at that... if only that had an effect. ;-)
<hays>
thanks
hays has quit [Remote host closed the connection]
mim1k has quit [Ping timeout: 255 seconds]
belmoussaoui has quit [Remote host closed the connection]
<catphish>
dminuoso: well it does stop the wakeups :)
<dminuoso>
catphish: Everything here smells that it needs pthread_cond_wait
belmoussaoui has joined #ruby
cadillac_ has joined #ruby
<dminuoso>
catphish: The problem is not the wakeup itself.
<dminuoso>
It's the pieces of execution that trigger it.
gr33n7007h has joined #ruby
<dminuoso>
catphish: fork needs to block rb_thread_wakeup_timer_thread and rb_thread_wakeup_timer_thread_low from having a side-effect
jamesaxl has quit [Ping timeout: 260 seconds]
<catphish>
one option is simply to set writing=0 in native_reset_timer_thread()
<catphish>
since this runs after fork, its purpose is to clean up the timer thread, currently it does nothing
<dminuoso>
catphish: Great idea! While another thread is in the middle of rb_thread_wakeup_timer_thread
<dminuoso>
catphish: then you end up with a non-0 counter again
<catphish>
if that's possible, yes
<dminuoso>
catphish: The thing is, rb_thread_wakeup_timer_thread is a critical section.
polysics has joined #ruby
<dminuoso>
catphish: lack of mutex makes it hard to do anything sensible
polishdub has joined #ruby
<catphish>
rb_thread_reset_timer_thread is only called by after_exec()
<catphish>
so, as a hack, i suspect it's safe, but it's not clear to me what the correct solution is
<dminuoso>
catphish: So you agree that we can't just introduce a mutex into rb_thread_wakeup_timer_thread, because since it's executed from signal handlers. Right?
charliesome has quit [Ping timeout: 240 seconds]
<catphish>
if you put a mutex around it 1) it would potentially deadlock in signal handlers 2) it still wouldn't stop another thread forking
<catphish>
should i go ahead and write this up as a bug somewhere?
<dminuoso>
catphish: What you could do, is put a spinlock in rb_thread_wakeup_timer_thread
<dminuoso>
Though.. no. That thing makes syscalls.
oleo has joined #ruby
rabajaj has quit [Quit: Leaving]
<dminuoso>
catphish: What if fork simply reset the writer count?
<catphish>
dminuoso: see 5 minutes ago ;)
<dminuoso>
catphish: missed it, but had the same thought and reasoning :)
<dminuoso>
catphish: Oh indeed. There's quite a few stubs in there.
<dminuoso>
catphish: Haha, let me blame this
<catphish>
dminuoso: so basically the very first thing that gets run after a fork is rb_thread_reset_timer_thread() - this does nothing but is perfectly poised to reset everything related to the timer thread (ie the writing counter)
<dminuoso>
catphish: Considering the size of that execution path, it should pretty darn hard to trigger this bug. So it's actually surprising that you got this bug repeatedly.
<catphish>
dminuoso: i'd agree, but i'm apparantly not the only one
<catphish>
there must be a particular pattern that makes this likely
<dminuoso>
catphish: Wow, this was not just a second author adding a funny remark.
<dminuoso>
catphish: I wonder... does fork not lock the gvl?
HoloIRCUser has joined #ruby
<dminuoso>
catphish: I mean in my mind, Im trying to sketch a scenario
<matthewd>
s/not lock/release/
ascarter has joined #ruby
<catphish>
dminuoso: i don't think it would matter, because rb_thread_wakeup_timer_thread_fd returns immediately before running any other code
jackjackdripper has joined #ruby
<catphish>
even if it was run immediately before a fork, it would still return and decrement first
HoloIRCUser3 has quit [Ping timeout: 240 seconds]
<catphish>
Eric Wong would be the man to ask about this
synthroid has quit [Remote host closed the connection]
digitalnomad has joined #ruby
cagomez has joined #ruby
cagomez has quit [Remote host closed the connection]
synthroid has joined #ruby
cagomez has joined #ruby
synthroid has quit [Remote host closed the connection]
synthroi_ has joined #ruby
<catphish>
well i hope someone sees my bug :)
jameser has quit [Ping timeout: 240 seconds]
uZiel has joined #ruby
HoloIRCUser has quit [Read error: Connection reset by peer]
HoloIRCUser has joined #ruby
HoloIRCUser is now known as aleph_
bronson has joined #ruby
brw has quit [Read error: Connection reset by peer]
ascarter has quit [Ping timeout: 260 seconds]
wickedbloodfart has joined #ruby
brw has joined #ruby
synthroid has joined #ruby
jameser has joined #ruby
dionysus69 has joined #ruby
synthroi_ has quit [Ping timeout: 260 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
digitalnomad has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 276 seconds]
conta has quit [Ping timeout: 260 seconds]
digitalnomad has joined #ruby
<catphish>
dminuoso: thanks for all the help, time to go now, but i'll keep an eye on my bug report, and try to test my proposed fix, i'm sure someone will come up with a better fix
catphish has quit [Quit: Leaving]
__Yiota has joined #ruby
brent__ has joined #ruby
brent__ has quit [Remote host closed the connection]
brent__ has joined #ruby
rikmen has joined #ruby
rikmen has left #ruby [#ruby]
brent__ has quit [Remote host closed the connection]
ahrs has quit [Remote host closed the connection]
ahrs has joined #ruby
brent__ has joined #ruby
mim1k has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TomyLobo has joined #ruby
jameser has quit [Ping timeout: 240 seconds]
<dminuoso>
matthewd: Mmm at what point though?
jameser has joined #ruby
mim1k has quit [Ping timeout: 248 seconds]
<matthewd>
At all, I guess. My point was just that the lock will be held at the time the function is invoked, and it'd have to go out of its way to release it.
<dminuoso>
matthewd: Well if the gvl was released after the forked process was prepared it wouldn't have an impact
<dminuoso>
Oh well. I guess the critical point is when the actual process is syscall forked
[Butch] has joined #ruby
alnewkirk has joined #ruby
DoubleMalt has joined #ruby
Ishido has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
npgm has joined #ruby
BSAlb has joined #ruby
jackjackdripper has joined #ruby
mim1k has joined #ruby
PaulCapestany has quit [Read error: Connection reset by peer]
cdg has joined #ruby
PaulCape_ has joined #ruby
BSaboia has quit [Ping timeout: 255 seconds]
cdg_ has joined #ruby
__Yiota has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
jphase has quit [Remote host closed the connection]
tvw has quit [Read error: Connection reset by peer]
jphase has joined #ruby
Rodya_ has joined #ruby
cdg has quit [Ping timeout: 260 seconds]
gusrub has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has joined #ruby
Rodya_ has quit [Ping timeout: 258 seconds]
apparition47 has quit [Quit: Bye]
Serpent7776 has quit [Quit: Leaving]
sysvalve has quit [Quit: Leaving]
rgtk has quit [Ping timeout: 240 seconds]
yuciyuar has quit [Quit: Leaving]
sylario has joined #ruby
t-recx has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dennisvennink has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
goyox86 has quit [Read error: Connection reset by peer]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
goyox86 has joined #ruby
jphase has quit [Remote host closed the connection]
mooser has joined #ruby
jphase has joined #ruby
<alfiemax>
@Papierkorb thanks :)
goyox86 has quit [Ping timeout: 240 seconds]
kies has joined #ruby
ascarter has joined #ruby
agent_white has joined #ruby
DoubleMalt has quit [Read error: Connection reset by peer]
bronson has joined #ruby
polysics_ has joined #ruby
mikecmpbll has joined #ruby
ascarter has quit [Client Quit]
DoubleMalt has joined #ruby
polysics has quit [Ping timeout: 248 seconds]
beilabs has quit [Read error: Connection reset by peer]
aupadhye has quit [Ping timeout: 255 seconds]
BSab has quit [Quit: Leaving]
DoubleMalt has quit [Read error: Connection reset by peer]
beilabs has joined #ruby
ascarter has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
polysics_ has quit [Remote host closed the connection]
polysics has joined #ruby
sneakerhax has joined #ruby
polysics has quit [Ping timeout: 240 seconds]
ascarter has quit [Ping timeout: 255 seconds]
ur5us has joined #ruby
mooser has quit [Remote host closed the connection]
Ishido has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 255 seconds]
polysics has joined #ruby
ascarter has joined #ruby
kies has quit [Ping timeout: 240 seconds]
TimAndLyle has joined #ruby
polysics has quit [Client Quit]
TimAndLyle has left #ruby [#ruby]
kies has joined #ruby
ryzokuken has joined #ruby
rgtk has quit [Ping timeout: 240 seconds]
frem has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
cdg_ has quit [Remote host closed the connection]
Guest24408 has joined #ruby
jaruga has quit [Quit: jaruga]
ascarter has quit [Ping timeout: 255 seconds]
cdg has joined #ruby
Guest24408 has quit [Quit: Leaving]
alfiemax has quit []
preyalone has joined #ruby
mooser has joined #ruby
HelloCode has joined #ruby
Rodya_ has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
sumobob has joined #ruby
Rodya_ has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
conta has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
uZiel has joined #ruby
dcluna has quit [Ping timeout: 246 seconds]
anisha has joined #ruby
synthroi_ has joined #ruby
<zmo>
hi!
dcluna has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 260 seconds]
ldnunes has quit [Ping timeout: 255 seconds]
<zmo>
is there a ruby function like python's all() that will return true if all values of the list are true ?
careta has quit [Ping timeout: 255 seconds]
SeepingN has joined #ruby
synthroid has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
<zmo>
or, if not, to avoid the typical X-Y problem question: how, given an array of hashes that have a key => `[{'name':.., ...}, {'name':..,..}...]` how can I check in a one liner that a given name exists?
<zmo>
aaargh
<zmo>
l.all?
rippa has quit [Ping timeout: 276 seconds]
<zmo>
still having a hard time to check the `?`
digitalnomad has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 258 seconds]
Rapture has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<micah>
if I say: unless scope[v].nil? and scope[v].false? -- does that mean "do the following, unless scope[v] is not nil, and scope[v] is not false?
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
MarkBilk has joined #ruby
<havenwood>
micah: Ruby doesn't have a #false? out of the box. You'd have to add one.
<havenwood>
micah: You can do just `if scope[v]` and `unless scope[v]`.
<havenwood>
micah: Only `false` and `nil` are falsey. Everything else is truthy.
<micah>
havenwood: you mean put both 'if scope[v]' along with 'unless scope[v]' or are you saying I can use either one
nacsurte has quit [Ping timeout: 240 seconds]
<havenwood>
micah: Either one, they're inverse of each other.
swills has quit [Ping timeout: 248 seconds]
<havenwood>
alfiemax: Maybe give it a try with Oga.
MarkBilk__ has quit [Ping timeout: 255 seconds]
<micah>
havenwood: well, if the value of scope[v] is false, I dont want to do the following thing
<havenwood>
alfiemax: We could help you debug it better if you can give a working example. I see 10 elements with the code you gave. How many are expected? Which are missing?
ams__ has quit [Quit: Connection closed for inactivity]
<alfiemax>
seems like the other way round, since using XML it ignored those HTML violations
<afisher>
havenwood: no worries
swills has joined #ruby
swills has joined #ruby
swills has quit [Changing host]
jordanm has quit [Quit: Konversation terminated!]
guacamole has joined #ruby
jpterry has joined #ruby
<mnemon>
alfiemax: html parser doesn't like newlines inside the tags? :)
bronson has quit []
cagomez has joined #ruby
jordanm has joined #ruby
nacsurte has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 248 seconds]
eelster has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
joast has quit [Ping timeout: 246 seconds]
nacsurte has joined #ruby
theRoUS` has left #ruby ["Off to another part of the maze of twisty little passages"]
eelster has joined #ruby
Burgestrand has quit [Quit: Closing time!]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has joined #ruby
mostlybadfly has joined #ruby
Burgestrand has joined #ruby
armando has quit [Ping timeout: 240 seconds]
wilbert has joined #ruby
alfiemax has quit [Remote host closed the connection]
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
digitalnomad has joined #ruby
alfiemax has joined #ruby
jphase has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
dennisvennink has joined #ruby
eelster has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
eelster has joined #ruby
FastJack has quit [Read error: Connection reset by peer]
FastJack has joined #ruby
NeverTired has joined #ruby
conta has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
ramfjord has joined #ruby
FastJack has quit [Read error: Connection reset by peer]
ascarter has joined #ruby
Dimik has joined #ruby
vondruch has quit [Quit: vondruch]
FastJack has joined #ruby
vondruch has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 240 seconds]
wickedbloodfart has quit [Quit: wickedbloodfart]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
vondruch has quit [Client Quit]
vondruch has joined #ruby
tomphp has joined #ruby
law has joined #ruby
<law>
hey all, is there a way to tell rest-client to ONLY use ipv4? I'm dealing with a broken IPv6 config, and rest-client is preferring v6 addresses
Rodya_ has joined #ruby
ascarter has quit [Ping timeout: 255 seconds]
tomphp has quit [Client Quit]
<konsolebox>
what does Ruby use to produce its API documentation?
<konsolebox>
rdoc?
tirej has joined #ruby
tirej has joined #ruby
tirej has quit [Changing host]
tirej has quit [Client Quit]
tirej has joined #ruby
tirej has joined #ruby
tirej has quit [Changing host]
<konsolebox>
anyone can tell how to produce the html files with the extracted ruby source?
tomphp has joined #ruby
tomphp has quit [Client Quit]
anisha has quit [Quit: This computer has gone to sleep]
ramfjord has joined #ruby
<konsolebox>
hmm, nvm
sumobob has joined #ruby
<clemens3>
konsolebox: you mean docs for ruby itself, or for your own code? personally i downloaded the ruby docs from the web locally, but rvm can create the docs, just dunno where to find it then..: https://rvm.io/rubies/docs
<konsolebox>
clemens3: i already knew how to produce them. rdoc --op rdoc. i do use a local copy instead if i need a reference, but this is for knowing how ruby does it, because i'll also create a documentation for my own code.
<clemens3>
konsolebox: seems rvm docs open is worth a try after docs creation... personally coming from java with javadoc, i am underwheelmed with ruby doc, thought they have some..
<clemens3>
konsolebox: wait a second then
ramfjord has quit [Ping timeout: 240 seconds]
armando has joined #ruby
<clemens3>
konsolebox: for example: cd myproject; rdoc --output nonexistentdocdir bin/myprog.rb lib/mylib.rb; open nonexistentdocdir/index.html
Rodya_ has quit [Ping timeout: 240 seconds]
swills has quit [Ping timeout: 260 seconds]
<konsolebox>
clemens3: oh, that part is a bit obvious already ,but thanks
<konsolebox>
clemens3: now i'm done generating the files, but i kind of don't like the html's theme
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<konsolebox>
gotta try 0.36.0
<clemens3>
konsolebox: oki, but don't know how to use your own templates..
reber has joined #ruby
jphase has joined #ruby
hahuang65 has joined #ruby
<Mrgoose2>
How can I use a protobuf binary in ruby?
eckhardt has joined #ruby
jokke has quit [Quit: WeeChat 1.7.1]
jphase has quit [Ping timeout: 255 seconds]
ramfjord has joined #ruby
MarkBilk_ has joined #ruby
jokke has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
MarkBilk has quit [Ping timeout: 260 seconds]
ta__ has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
tirej has quit [Quit: leaving]
mjuszczak has joined #ruby
eightlimbed has quit [Ping timeout: 260 seconds]
sepp2k has quit [Quit: Leaving.]
zenspider_ is now known as zenspider
zenspider has quit [Changing host]
zenspider has joined #ruby
<zenspider>
rawr
swills has joined #ruby
mjuszczak has quit []
<zenspider>
clemens3: what part(s) of the doco do you object to?
_sfiguser has joined #ruby
eightlimbed has joined #ruby
Dimik has quit [Ping timeout: 276 seconds]
dennisvennink has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]