Boohbah has quit [Remote host closed the connection]
Boohbah has joined #ruby-lang
Defusal has quit [Quit: cheers]
gix has joined #ruby-lang
mstratman has joined #ruby-lang
spuk has joined #ruby-lang
Guedes0 has quit [Quit: Saindo]
Guedes has joined #ruby-lang
jxie has quit [Ping timeout: 252 seconds]
tomzx has quit [Ping timeout: 272 seconds]
macmartine has joined #ruby-lang
bglusman has joined #ruby-lang
dr0id has left #ruby-lang [#ruby-lang]
rippa has quit [Quit: derp herp]
<andrewvos>
Okay i got it working
<andrewvos>
I was putting a ~ path to the cert in sslcert and it wasn't working. Maybe zsh was autocompleting the command line option or something.
Radium has joined #ruby-lang
gokul has quit [Quit: Leaving]
CTKArcher has joined #ruby-lang
<deryl>
andrewvos, I tell people all the time, never use ~ over $HOME (though they meant he same thing) because ~ is *not* guaranteed to be there as an alias, $HOME always works.
<deryl>
s/ he same/ the same/
hagzag_ has quit [Ping timeout: 245 seconds]
<andrewvos>
thanks
<andrewvos>
deryl:
tRAS has quit [Ping timeout: 260 seconds]
yugui is now known as yugui_zzz
yugui_zzz is now known as yugui
mike has joined #ruby-lang
kitallis has quit [Ping timeout: 265 seconds]
mike is now known as Guest77979
melter has quit [Quit: Client exiting]
tbuehlmann has joined #ruby-lang
<deryl>
andrewvos, np
<macmartine>
Is there a way to make this verify there are 3 or more non-space characters total, while spaces are allowed? http://rubular.com/r/Nu87gXs3Qj
CTKArcher has quit [Quit: Bye !]
kedare has joined #ruby-lang
tRAS has joined #ruby-lang
kitallis has joined #ruby-lang
Guest77979 has left #ruby-lang [#ruby-lang]
<andrewvos>
deryl: Will $HOME be available under a cron?
<deryl>
yes
<deryl>
for that user
<deryl>
err set for that user (sorry
<andrewvos>
oh wait
<andrewvos>
ok so it would be root
<deryl>
yeah if its running as root then yes, root's home will be populated in $HOME
<deryl>
if you run the cronjob with a su -u >user> then it should be populated with that user's HOME
<deryl>
<user> meaning that user's login
* deryl
thinks note to self, you;re in a ruby channel. usean ivar when you're emitting a token
<andrewvos>
Okay well I'll just supply the full path
<andrewvos>
Oh wait
<andrewvos>
Or just not do `sudo crontab -e`
<andrewvos>
:/
<deryl>
sudo su -u @username -c crontab -e iirc
<deryl>
(sudo to get rights to change within the sudo system, su to change to the user themself)
<andrewvos>
deryl: Well I want it to be the user I'm running under
<andrewvos>
So I'm assuming `crontab -e` lets me edit the crontab for my user
<deryl>
yeah the sudo part is so you have the right to run as anyone at all (most systems are using sudo and using su directly requires root's pass),, and the su part is to execute the actual change to that user so you can run the corntab -e command in context of that user
<deryl>
if you have root's pass you can drop the sudo part.
<andrewvos>
Ah ok thanks
apeiros_ has quit [Remote host closed the connection]
<deryl>
just most distributions put people into the sudo or wheel group and then set up visudo with that group. you would need the sudo part in the command i gave you to have the right TO execute the su in the first place
<andrewvos>
I'm on os x
perryh is now known as perryh_away
<deryl>
ahh yeah then its just straight su
carloslopes has joined #ruby-lang
<deryl>
you should add the -l to that as well
<deryl>
su -l -u username so its a login if you need their env for any reason
enebo has joined #ruby-lang
<deryl>
don't have my MBP handy to make sure that's right. but iirc it operates exactly the same as gnu's su
<deryl>
the -l makes it a login shell
<deryl>
rather than just making you that user but keeping your own environment (sorry accidently hit enter before if inished)
<andrewvos>
Wait, so you've lost me here. What's wrong with just plain "crontab -e" under the intended user?
<deryl>
no thats fine. what i'mk referencing is say you do su - -u user you get THEIR env (their configs load ect)
<deryl>
without the -l YOUR ejnv usually stays loaded
<andrewvos>
Oh ok fair enough
<andrewvos>
Thanks deryl
TheHunter_1039 has joined #ruby-lang
<deryl>
np
znake has quit [Quit: znake]
mistym has joined #ruby-lang
outoftime has joined #ruby-lang
mark_locklear has quit [Read error: Connection reset by peer]
b1rkh0ff has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 272 seconds]
gouthamvel has joined #ruby-lang
b1rkh0ff has quit [Client Quit]
b1rkh0ff has joined #ruby-lang
b1rkh0ff has quit [Read error: Connection reset by peer]
b1rkh0ff has joined #ruby-lang
<workmad3>
deryl: why do sudo su? just do sudo -u
cantonic has quit [Remote host closed the connection]
cantonic has joined #ruby-lang
<workmad3>
sudo -u <username> crontab -e
<workmad3>
also useful with -i if you want the equivalent of su - :) sudo -u username -i
savage- has joined #ruby-lang
kitallis has quit [Ping timeout: 244 seconds]
<deryl>
workmad3, ahh, I'm a throwback. i'm used to su directly, so i sudo to enter the priv system, and then su the commands i want.
<workmad3>
deryl: heh :)
<kalleth>
deryl: sudo -i
<kalleth>
to go to root
<kalleth>
:D
<kalleth>
:D :D :D
<workmad3>
deryl: that assumes your user has sudo privileges to run su of course ;)
<kalleth>
dammit, you already bloody told me that
* kalleth
looks dumb now
<deryl>
workmad3, unless there is a custom visudo in place then you do
<deryl>
sudoers file actually
<deryl>
visudo to edit it
cantonic_ has joined #ruby-lang
<workmad3>
deryl: well, 'custom' meaning 'something other than the debian packaged version', sure
thone_ has joined #ruby-lang
<deryl>
workmad3, custom meaning other than any default configured sudoers file.
<deryl>
opensuse, fedora, debian, ubuntu, slack, etc all come with sudoers file set up with a group able to run commands and su not locked out by a custom line
thone has quit [Read error: Operation timed out]
gouthamvel has quit [Ping timeout: 245 seconds]
<workmad3>
fair enough... I've only ever used sudo on deb based systems
<workmad3>
and on an opensolaris where it was customised
<workmad3>
I've also customised it myself to allow a group to run a single command without a password :)
dfr|mac has joined #ruby-lang
yugui is now known as yugui_zzz
cantonic has quit [Ping timeout: 250 seconds]
cantonic_ is now known as cantonic
<deryl>
yep. highly configurable. i just am used to su directly, but because i do occasionally work on systems where i don't know the root pass but am in the sudoers, i do tend to prefix my c ommands with sudo just to enter the system.
<deryl>
like i said, i'm a throwback hands off my su! ;)
<workmad3>
:D
<deryl>
i've a few fellow admin friends that laugh at me for it :)
<workmad3>
su has its place, but sudo is more sensible... rather than having to share one root password amongst lots of people and having to change and share a new one if it's compromised, you instead have an individual one for each user who is allowed access (in essence)
yugui_zzz is now known as yugui
<deryl>
yep. don't get me wrong, i think sudo is an excellent compromise within the scecurity requirements of most systems.
<workmad3>
back in my uni days, I figured out su though... especially useful when remotely helping some others... ssh to their machine, su to their user (get them to put in their pw) and then do some crap for them :)
<workmad3>
everything has its place :)
<deryl>
its just that when i started out there was no sudo, just su. so i use su alm ost exclusively on my own systems, but over the lastr couple years i started using sudo but only insofar as i said, prefix of my su commands *just* to access the security privs system. i guess i should learn to use it fully. i'm just hard headed at time and i fully admit its not an effricient ussage pattern :)
<deryl>
can oyu make any more typos in a paragraph, deryl? come on you know you can!
heftig has quit [Quit: leaving]
<workmad3>
:)
<workmad3>
so... can I beat deryl with the 'no su' stick any more? :)
<deryl>
luckily i don't typo anywhere near this much in code! hehe can you imagine the time needed for cleanup??
<deryl>
hahaha
<deryl>
workmad3++
mssola has joined #ruby-lang
TDJACR has quit [Quit: Restarting client]
TDJACR has joined #ruby-lang
Boohbah has quit [Ping timeout: 276 seconds]
imajes has quit [Excess Flood]
savage- has quit [Remote host closed the connection]
<Frunderground>
I'm running into a problem using threads in ruby...they seem to randomly hang, when I attach gdb it's stuck in in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
<Frunderground>
using ruby 1.9.3*
<Frunderground>
I can paste the entire backtrace if it would help
<Frunderground>
(to gist or some such place, of course)
<Frunderground>
I'm about to fork a process to do the work instead of creating a thread, but I was hoping to avoid reloading the environment
<Frunderground>
I've already eliminated join/other waiting from the problem...In attempting to fix this problem I manually handle timeouts (with a loop and a sleep) I originally used join with a timeout, but that had the same issue
<Frunderground>
it happens after the ruby process has been running/creating threads for a day or two, it's not reproducible
<ged>
Frunderground: that sounds like deadlock.
<Frunderground>
hmm
<ged>
Frunderground: I don't know how much threaded programming you've done before, but that's a common problem.
<Frunderground>
I don't share any state, but maybe a library isn't thread safe
<Frunderground>
any hints for debugging where the deadlock might be occuring?
<ged>
Frunderground: Seems like it. pthread_cond_wait is when a thread is waiting on a condition variable, so the backtrace should show what condition they're deadlocking on.
<ged>
It happens a lot with extensions that aren't written with Ruby threading in mind.
rippa has joined #ruby-lang
<Frunderground>
hmm...this looks a little suspect: 'in setup_exception'
<Frunderground>
I had a problem with getting shoes to handle sprites properly
<Frunderground>
but that shouldn't be an issue with an irc client
<hagabaka>
I think QtRuby is pretty good, although I haven't done much with it yet
<TTilus>
sprites sound more like gosu than shoes =D
sora_h is now known as s0ra_h
Defusal has joined #ruby-lang
chrismcg is now known as zz_chrismcg
Tearan has quit [Quit: Sleepy Badger....]
tomb_ has quit [Quit: Computer has gone to sleep.]
lsegal has joined #ruby-lang
pablo_ has quit [Quit: Ex-Chat]
z33k|Luxx has joined #ruby-lang
z33k|Luxx has quit [Client Quit]
Z33K|Lux has quit []
morozovm has joined #ruby-lang
morozovm has left #ruby-lang [#ruby-lang]
<nazty>
anyone ever use xchat/ruby?
futurechimp has quit [Quit: Leaving]
mrsolo has joined #ruby-lang
mark_locklear has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
RubyRedGirl has joined #ruby-lang
fgomez has joined #ruby-lang
Defusal has quit [Read error: Connection reset by peer]
vesan has quit [Read error: Connection reset by peer]
vesan has joined #ruby-lang
kish has quit [Remote host closed the connection]
wmoxam has joined #ruby-lang
fayimora has joined #ruby-lang
fayimora has quit [Remote host closed the connection]
fayimora has joined #ruby-lang
jmontross has left #ruby-lang [#ruby-lang]
bfreeman has joined #ruby-lang
carloslopes has quit [Ping timeout: 252 seconds]
hynkle has quit [Read error: Connection reset by peer]
<fayimora>
Hey guys, can i make this code(http://pastie.org/3921703) any simpler? I want an array of entries containing one per day
hynkle has joined #ruby-lang
kish has joined #ruby-lang
<fayimora>
The one below is my solution but apparently I can do better
<deryl>
fayimora, dude, you've been told so many times that hitting multiple channels at the same time ir flat out rude and in most cases will stop you from getting th ehel you want
Weems has joined #ruby-lang
Weems has quit [Changing host]
Weems has joined #ruby-lang
Slackwise has joined #ruby-lang
fgomez has quit [Quit: leaving]
robotmay has joined #ruby-lang
fgomez has joined #ruby-lang
toretore has joined #ruby-lang
toertore has quit [Read error: Connection reset by peer]
fayimora has quit [Quit: Busy…..zzzzz]
fayimora has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
voidx has quit [Read error: Connection reset by peer]
Frunderground has quit [Quit: Page closed]
voidx has joined #ruby-lang
Harzilein has quit [Ping timeout: 252 seconds]
mssola has joined #ruby-lang
<hagabaka>
fayimora: those are just two ways to represent the same information, sure there are simpler ways, but what exactly are your requirements?
heftig has joined #ruby-lang
headius has quit [Quit: headius]
carloslopes has joined #ruby-lang
injekt has joined #ruby-lang
Austin__ has joined #ruby-lang
tRAS has quit [Quit: Mother, did it need to be so high?]
injekt has quit [Quit: leaving]
thrcka has quit [Remote host closed the connection]
<voidx>
I need some advices on isolate tests. Could anybody please review these specs
jacobwg has quit [Quit: Computer has gone to sleep.]
vesan has joined #ruby-lang
headius has joined #ruby-lang
petercooper has joined #ruby-lang
<fayimora>
hagabaka: still therE?
gouthamvel has joined #ruby-lang
gouthamvel has left #ruby-lang [#ruby-lang]
brianpWins has joined #ruby-lang
hynkle has quit [Quit: hynkle]
hynkle has joined #ruby-lang
ridders24 has joined #ruby-lang
yxhuvud has quit [Ping timeout: 250 seconds]
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
robotmay has quit [Remote host closed the connection]
publicvoid has quit [Remote host closed the connection]
<slyphon>
wow
<slyphon>
i'm kind of disappointed in MRI
<slyphon>
it does not cope with fork reliably
<carloslopes>
slyphon: what do you consider reliable?
<slyphon>
i'll say this
<slyphon>
i'm not a C programmer and I don't have the chops necessary to go poking around inside the VM implementation and know what the fuck is happening
<slyphon>
i've been working on an extension that needs to make use of threads, and may be used by people using Resque, which is fork-based
<slyphon>
and i have bumped into many things that seem like they should not happen
<slyphon>
like segfaults because of memory corruption in thread pointers
<erikh>
corruption goes well with nutella
<slyphon>
things where i open up gdb and say "I don't see any of my C code here"
IPGlider has quit []
<slyphon>
erikh: maybe in france
<erikh>
is this 1.9.x?
<slyphon>
yep
<erikh>
wow
<slyphon>
granted, i'm pushing the envelope
<erikh>
how so?
<slyphon>
i'm not bragging
<erikh>
not saying you are
<slyphon>
i'm trying to fork while having multiple threads running
<erikh>
oh
<slyphon>
hah, just i mean
rippa has quit [Ping timeout: 240 seconds]
<slyphon>
that sounded like a boast
<apeiros_>
slyphon: um, afaik ruby only forks the main thread
<erikh>
well, ruby 1.9 makes the guarantee you'll only have the current thread running when fork is called
<slyphon>
but, i'm designing with that in mind
<slyphon>
yes
<slyphon>
that's the idea
<slyphon>
that's how posix does it
<slyphon>
and i want that behavior
<erikh>
I haven't seen anything to the contrary to that
<erikh>
but maybe I'm not touching the right naughty bits