apeiros changed the topic of #ruby-lang to: Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste code on https://gist.github.com
Astrologos_ has quit [Ping timeout: 272 seconds]
jgpawletko has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
joaomdmoura has quit [Remote host closed the connection]
joaomdmoura has joined #ruby-lang
alestuber has quit [Ping timeout: 276 seconds]
joaomdmoura has quit [Remote host closed the connection]
alestuber has joined #ruby-lang
michaeld_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lytol has quit [Remote host closed the connection]
havenn has joined #ruby-lang
charliesome has quit [Quit: zzz]
baweaver has joined #ruby-lang
AlexAltea has quit [Ping timeout: 245 seconds]
alestuber has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 255 seconds]
wallerdev has quit [Quit: wallerdev]
AlexAltea has joined #ruby-lang
r0bby_ is now known as robbyoconnor
hal_9000 has quit [Ping timeout: 256 seconds]
fujimura has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
LMity has joined #ruby-lang
hal_9000 has joined #ruby-lang
Guest123456666 has joined #ruby-lang
Shu-ling has joined #ruby-lang
<Shu-ling> has anyone used devise? I need someone to help me figure out how to use the methods for controllers :/
<Guest123456666> yes Shu-ling
<Guest123456666> what's the question
wallerdev has joined #ruby-lang
<Shu-ling> how do I pm
<Shu-ling> I'm trying to use the before_action :user_authenticate!
<Shu-ling> but it's not working
<havenn> Shu-ling: The Rails channel is #RubyOnRails. That's the best place for Rails questions.
<Guest123456666> is there a link to ur code
Guest51681 has quit [Ping timeout: 276 seconds]
<Guest123456666> is it just devise without omniauth or anything?
<Shu-ling> I'm still on the read_me, didn't get to omniauth yet
tcopeland has joined #ruby-lang
tcopeland has quit [Client Quit]
<Shu-ling> on the read me right where it says controller filters and helpers
<Shu-ling> I don't even know what a filter/helper is
gwendall_ has joined #ruby-lang
gwendall has quit [Ping timeout: 272 seconds]
<Shu-ling> :<
<Shu-ling> are you still figuring it out
hahuang65 has quit [Ping timeout: 250 seconds]
LMity has quit [Ping timeout: 256 seconds]
<Shu-ling> has anyone else used devise
Guest123456666 has quit [Quit: Textual IRC Client: www.textualapp.com]
Shu-ling has quit [Quit: Page closed]
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby-lang
Guest123456666 has joined #ruby-lang
Guest123456666 has quit [Client Quit]
sharpmachine has joined #ruby-lang
workmad3 has joined #ruby-lang
Technodrome has joined #ruby-lang
workmad3 has quit [Ping timeout: 244 seconds]
sharpmachine has quit []
Cloudhand has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
hendranata_ has joined #ruby-lang
b_hoffman has joined #ruby-lang
chadrien has quit [Ping timeout: 245 seconds]
chadrien has joined #ruby-lang
bruno- has joined #ruby-lang
bruno- is now known as Guest17779
duderonomy has joined #ruby-lang
Guest17779 has quit [Ping timeout: 252 seconds]
sankaber has joined #ruby-lang
tkuchiki has joined #ruby-lang
hahuang65 has joined #ruby-lang
djbkd has quit [Quit: My people need me...]
wallerdev has quit [Quit: wallerdev]
b_hoffman has quit [Quit: b_hoffman]
RobertBirnie has joined #ruby-lang
woody has joined #ruby-lang
Technodrome has quit [Quit: Technodrome]
woody has quit [Client Quit]
auzty has joined #ruby-lang
Technodrome has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbowlby has quit []
havenn is now known as havenwood
bruno- has joined #ruby-lang
bruno- is now known as Guest8343
Guest8343 has quit [Ping timeout: 265 seconds]
Cloudhand has quit [Ping timeout: 245 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby-lang
workmad3 has quit [Ping timeout: 252 seconds]
gix has quit [Ping timeout: 245 seconds]
gix has joined #ruby-lang
jgpawletko has quit [Quit: jgpawletko]
auzty has quit [Ping timeout: 272 seconds]
woody has joined #ruby-lang
RobertBirnie has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
auzty has joined #ruby-lang
Technodrome has quit [Quit: Technodrome]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
woody has left #ruby-lang ["Textual IRC Client: www.textualapp.com"]
Cloudhand has joined #ruby-lang
Technodrome has joined #ruby-lang
djbkd has joined #ruby-lang
fujimura has quit [Ping timeout: 264 seconds]
b_hoffman has joined #ruby-lang
fujimura has joined #ruby-lang
hotpancakes has quit [Read error: Connection reset by peer]
Contigi777 has joined #ruby-lang
seank___ has joined #ruby-lang
hotpancakes has joined #ruby-lang
znz_jp has quit [Quit: kill -QUIT $$]
Guest62726 has quit [Ping timeout: 252 seconds]
Contigi has quit [Ping timeout: 240 seconds]
seank__ has quit [Ping timeout: 256 seconds]
hotpanca_ has joined #ruby-lang
slumos is now known as slumos[away]
Olipro- has joined #ruby-lang
hotpancakes has quit [Ping timeout: 246 seconds]
hotpancakes has joined #ruby-lang
hotpanca_ has quit [Ping timeout: 245 seconds]
LMity has joined #ruby-lang
znz_jp has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
RickHull has joined #ruby-lang
michael_mbp has quit [Excess Flood]
LMity has quit [Ping timeout: 264 seconds]
michael_mbp has joined #ruby-lang
djbkd has quit [Quit: Leaving...]
djbkd has joined #ruby-lang
<RickHull> hello folks, I'm playing around with oauth (v1) for the first time
<RickHull> i want to poll the bitbucket REST API
<RickHull> i'm having trouble understanding who my "user" is, and what the callback url should be
<RickHull> i don't really have a user, and i just want to authenticate to bitbucket
workmad3 has joined #ruby-lang
skade has joined #ruby-lang
<RickHull> my app has the key and secret. these correspond to my personal bitbucket account
<RickHull> so when my app authenticates using oauth, what is the callback_url?
Technodrome has quit [Quit: Technodrome]
<RickHull> to make an analogy, I have used AWS REST API. I provide the secret and the key, and then I can make authenticated / authorized calls to the REST API
<RickHull> i never had to provide a callback URL
<RickHull> i'm having trouble understanding what is necessary here
workmad3 has quit [Ping timeout: 246 seconds]
RobertBirnie has quit [Ping timeout: 256 seconds]
<RickHull> there is no user, the purpose is for automation
<RickHull> i'm looking at the README here: https://github.com/oauth-xx/oauth-ruby
RobertBirnie has joined #ruby-lang
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby-lang
<RickHull> every doc keeps talking about redirecting the "end user's browser" to the callback URL
<RickHull> i don't have an end user, and there are definitely no browsers involved
<RickHull> oath-ruby says: @callback_url = "http://127.0.0.1:3000/oauth/callback"
b_hoffman has quit [Quit: b_hoffman]
gwendall_ has quit [Remote host closed the connection]
crankharder has quit [Ping timeout: 245 seconds]
<RickHull> i'd just as soon redirect a phantom user to disney.com, is that sensible?
kerunaru has joined #ruby-lang
<RickHull> or is the "callback_url" simply the actual bitbucket url that my app would like to poll?
ledestin has joined #ruby-lang
Contigi has joined #ruby-lang
Olipro- has quit [Ping timeout: 245 seconds]
Cloudhand has quit [Ping timeout: 256 seconds]
vondruch_ is now known as vondruch
Contigi777 has quit [Ping timeout: 255 seconds]
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Contigi has quit [Quit: Leaving]
dhjondoh has quit [Quit: dhjondoh]
djbkd has quit [Quit: My people need me...]
dhjondoh has joined #ruby-lang
djbkd has joined #ruby-lang
OnBrokenWings has joined #ruby-lang
fsvehla has joined #ruby-lang
Olipro- has joined #ruby-lang
<RickHull> anybody ever used oauth before?
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bb010g has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
djbkd has quit [Quit: Leaving...]
iamninja_ has quit [Read error: Connection reset by peer]
fsvehla has quit [Quit: fsvehla]
iamninja_ has joined #ruby-lang
fujimura has quit [Ping timeout: 250 seconds]
djellemah has joined #ruby-lang
fujimura has joined #ruby-lang
fujimura has quit [Remote host closed the connection]
fujimura has joined #ruby-lang
fujimura has quit [Read error: Connection reset by peer]
fujimura has joined #ruby-lang
OnBrokenWings has quit [Ping timeout: 244 seconds]
OnBrokenWings has joined #ruby-lang
crankharder has joined #ruby-lang
brownbathrobe has joined #ruby-lang
oh_hai_mark has joined #ruby-lang
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby-lang
crankharder has quit [Ping timeout: 245 seconds]
brownbathrobe has quit [Ping timeout: 245 seconds]
jas02 has joined #ruby-lang
hahuang65 has quit [Ping timeout: 240 seconds]
elia has joined #ruby-lang
vulix has joined #ruby-lang
bruno- has joined #ruby-lang
bruno- is now known as Guest53574
Mon_Ouie has quit [Ping timeout: 248 seconds]
Guest53574 has quit [Ping timeout: 276 seconds]
SylarRuby has joined #ruby-lang
rippa has joined #ruby-lang
cornerma1 has joined #ruby-lang
elia has quit [Quit: (IRC Client: textualapp.com)]
cornerman has quit [Ping timeout: 248 seconds]
cornerma1 is now known as cornerman
houhoulis has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
workmad3 has quit [Ping timeout: 250 seconds]
postmodern has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
kerunaru has joined #ruby-lang
relix has joined #ruby-lang
arBmind1 has quit [Quit: Leaving.]
djbkd has joined #ruby-lang
oh_hai_mark has quit [Remote host closed the connection]
crankharder has joined #ruby-lang
solars has joined #ruby-lang
crankharder has quit [Ping timeout: 245 seconds]
hahuang65 has joined #ruby-lang
skade has joined #ruby-lang
<maloik> RickHull: if you sign in from your app with bitbucket, you'll be redirected to their app, sign in, then they'll redirect back to that callback url
<maloik> you then check the params to figure out who the user is, if they logged in successfully etc
<maloik> there's really a bunch of great tutorials up about devise and services like twitter, github etc
<RickHull> maloik: thanks, hmm
<RickHull> i'm not sure my use case fits that model, but i'm probably misunderstanding
<maloik> oauth is the same, always
ta has quit [Remote host closed the connection]
<maloik> the only difference, as far as I understood it, is that you don't necessarily want to save the user to your database
<RickHull> ok, then maybe it's just a question of adapting the terminology
<RickHull> i don't have users, i don't have an app with URLs
<RickHull> callbacks or otherwise
<RickHull> i have a daemon, basically
<maloik> then how would someone log in?
<RickHull> that polls bitbucket, and then takes action when bitbucket changes
<RickHull> i have no users, no one logs in
<maloik> ... then why ask about oauth?
<RickHull> i am using oauth so that my app can log in to bitbucket
<RickHull> to access private repos
<RickHull> purely for automation purposes
<maloik> that's not how oauth works
<RickHull> i.e. this repo changed, pull the changes, then take action
<maloik> you'll most likely need to get some sort of api token in bitbucket
<RickHull> hmm
<maloik> maybe a secret key and token pair
<RickHull> i have a secret key and access id
<RickHull> the bitbucket docs pointed me to oauth stuff
<RickHull> maybe i'm barking up the wrong tree?
hahuang65 has quit [Ping timeout: 245 seconds]
<maloik> okay to be clear, "thats not how oauth works" was a bit of a lame comment... what I meant was that the stuff you've been pasting is how oauth in terms of apps works, as in the flow I described earlier with the redirects
<RickHull> i understood that i would use oauth to get a token, and then use the token to do authorized / authenticated stuff
<RickHull> yeah, the stuff i posted is in terms of the docs they gave me
<RickHull> which i posted because, they don't make sense to me
<RickHull> for my use case
<RickHull> maybe i need a different approach?
<maloik> did you look at webhooks and git hooks?
<RickHull> i did
<maloik> okay just checking
<RickHull> problem is, the webhooks need a public IP or DNS
<RickHull> and my automation server has neither
<RickHull> so my automation server will just poll the REST API for changes
<RickHull> i'd much rather go with the webhooks, but it's not an option given the constraints
<RickHull> so, i'm polling the REST API on a private repo for changes
<RickHull> bitbucket says to use oauth
<RickHull> and it talks about callback_urls and users, and i'm not sure what i'm supposed to plug in
<maloik> I'm not sure, briefly looking around doesnt tell me much
<maloik> oh actually
<maloik> stel 1 and 2 are pretty straightforward
<maloik> step 3 you could fake by manually visiting that url, granting the application access, and from then on you should be able to make api calls using the first two steps to get a token
<maloik> (and step 4)
<RickHull> hmm
<RickHull> those are the docs I'm following
<RickHull> jhass, interesting, thanks
marr has joined #ruby-lang
fsvehla has joined #ruby-lang
charliesome has joined #ruby-lang
<RickHull> maloik: regarding step 2, that's where i'm wondering about the (REQUIRED) callback_url
<RickHull> do i have to set up a webserver?
<RickHull> er, oauth_callback
_djbkd has joined #ruby-lang
<RickHull> can i just put http://disney.com/ in there?
<RickHull> I doubt it, but I'm just trying to understand the landscape
Technodrome has joined #ruby-lang
solars has quit [Ping timeout: 245 seconds]
Guest20 has joined #ruby-lang
elia has joined #ruby-lang
<maloik> not sure how they check it or if they check it at all
yfeldblum has joined #ruby-lang
<maloik> cant look into it more right now though, have some actual work to do :(
yfeldblum has quit [Read error: Connection reset by peer]
solars has joined #ruby-lang
OnBrokenWings has quit [Quit: Leaving]
yfeldblum has joined #ruby-lang
<maloik> ssh pair@home.jeroenj.be -p 9022
_djbkd has quit [Read error: Connection reset by peer]
_djbkd has joined #ruby-lang
gwendall has joined #ruby-lang
ta has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
ta_ has joined #ruby-lang
SylarRuby has quit [Remote host closed the connection]
stan has joined #ruby-lang
_djbkd has quit [Ping timeout: 256 seconds]
djbkd_ has joined #ruby-lang
djbkd has quit [Ping timeout: 264 seconds]
piotrj has joined #ruby-lang
intinig has joined #ruby-lang
exons has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: zzz]
exons has joined #ruby-lang
intinig has quit [Ping timeout: 250 seconds]
piotrj has quit [Remote host closed the connection]
ta_ has quit [Remote host closed the connection]
<yorickpeterse> morning
workmad3 has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
stevednd has quit [Ping timeout: 252 seconds]
stevednd has joined #ruby-lang
hotpancakes has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 250 seconds]
Mon_Ouie has quit [Ping timeout: 256 seconds]
fujimura_ has joined #ruby-lang
fujimura has quit [Ping timeout: 265 seconds]
intinig has joined #ruby-lang
skade has joined #ruby-lang
lloyd is now known as Lloyd
piotrj has joined #ruby-lang
crankharder has joined #ruby-lang
crankharder has quit [Ping timeout: 250 seconds]
hahuang65 has joined #ruby-lang
hahuang65 has quit [Ping timeout: 255 seconds]
Guest20 has quit [Read error: Connection reset by peer]
intinig has quit [Read error: Connection reset by peer]
intinig has joined #ruby-lang
stardiviner has joined #ruby-lang
intinig has quit [Read error: Connection reset by peer]
intinig has joined #ruby-lang
postmodern has quit [Quit: Leaving]
jsaak has quit [Ping timeout: 244 seconds]
intinig has quit [Remote host closed the connection]
gwendall has quit []
arBmind has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby-lang
isale-eko has joined #ruby-lang
k3asd` has joined #ruby-lang
hotpancakes has joined #ruby-lang
intinig has joined #ruby-lang
stef204 has joined #ruby-lang
intinig has quit [Remote host closed the connection]
hotpancakes has quit [Ping timeout: 256 seconds]
ta_ has joined #ruby-lang
intinig has joined #ruby-lang
mikecmpbll has joined #ruby-lang
fujimura has joined #ruby-lang
fujimura_ has quit [Read error: Connection reset by peer]
<chris2> what a shitload of shitposts to ruby-talk
bruno- has joined #ruby-lang
riotjones has quit [Ping timeout: 256 seconds]
bruno- is now known as Guest74468
<yorickpeterse> que?
riotjones has joined #ruby-lang
<chris2> some guy spamming
<yorickpeterse> Ah
Guest74468 has quit [Ping timeout: 245 seconds]
auzty has quit [Quit: Leaving]
fujimura has quit [Remote host closed the connection]
hendranata_ has quit [Ping timeout: 264 seconds]
fujimura has joined #ruby-lang
fujimura has quit [Ping timeout: 276 seconds]
<Eising> hey
<Eising> ehm
<Eising> I have this templating system I've made. It sort of converts mustache templates into webforms, which is pretty handy if you're working with router configurations for example
<vulix> converting mustaches into web forms, what in the...
<Eising> :D
<yorickpeterse> bah, fucking cookies and iframes
<yorickpeterse> customer apparently embeds this survey app we have in an iframe
workmad3 has joined #ruby-lang
<yorickpeterse> but said app needs a cookie
<yorickpeterse> which doesn't work from an iframe because yay third-party cookies
<Eising> so, the thing is, I want to be able to make it more flexible, by allowing some ruby code in the templates, or actually, around the templates, but I can't figure out how I can do this securely, or at least in a way, where I can limit what classes/libraries/gems/functions are available
<Eising> sort of like what eval.in does
intinig has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
riotjones has quit [Ping timeout: 245 seconds]
<Eising> there's a lot about this I'm unsure about. Including storing ruby code in my db...
workmad3 has quit [Ping timeout: 256 seconds]
hahuang65 has quit [Ping timeout: 276 seconds]
piotrj has quit [Read error: Connection reset by peer]
piotrj has joined #ruby-lang
jas02 has left #ruby-lang [#ruby-lang]
intinig has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
ta_ has quit [Remote host closed the connection]
<djellemah> Eising: $SAFE may help, a little. But it doesn't really do what one expects, and its not portable to jruby and rbx IIRC: http://ruby-doc.org/core-2.2.1/doc/security_rdoc.html
riotjones has joined #ruby-lang
<yorickpeterse> Eising: the moment you allow any Ruby code you'll end up in sandboxing hell
<yorickpeterse> Have you tried maybe using Liquid?
<Eising> that looks usable
the_real_intinig has joined #ruby-lang
<Eising> yorickpeterse: thanks! That may solve my problem entirely :)
intinig has quit [Ping timeout: 248 seconds]
stardiviner has quit [Ping timeout: 246 seconds]
LMity has joined #ruby-lang
piotrj has quit [Read error: Connection reset by peer]
piotrj_ has joined #ruby-lang
crankharder has joined #ruby-lang
crankharder has quit [Ping timeout: 248 seconds]
thelastinuit has joined #ruby-lang
LMity has quit [Ping timeout: 265 seconds]
isale-eko has quit [Ping timeout: 244 seconds]
bruno- has joined #ruby-lang
piotrj_ has quit [Remote host closed the connection]
bruno- is now known as Guest43111
isale-eko has joined #ruby-lang
piotrj has joined #ruby-lang
isale-eko has quit [Client Quit]
Guest43111 has quit [Ping timeout: 276 seconds]
the_real_intinig has quit [Remote host closed the connection]
stan has quit [Quit: Leaving]
intinig has joined #ruby-lang
piotrj_ has joined #ruby-lang
RobertBirnie has joined #ruby-lang
piotrj has quit [Ping timeout: 256 seconds]
RobertBirnie has quit [Read error: Connection reset by peer]
RobertBirnie has joined #ruby-lang
Lloyd is now known as lloyd
bruno- has joined #ruby-lang
bruno- is now known as Guest35395
Mon_Ouie has joined #ruby-lang
escapement has joined #ruby-lang
piotrj_ has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 255 seconds]
piotrj has joined #ruby-lang
escapement has quit [Client Quit]
stardiviner has joined #ruby-lang
hotpancakes has joined #ruby-lang
stan has joined #ruby-lang
the_real_intinig has joined #ruby-lang
the_real_intinig has quit [Remote host closed the connection]
hotpancakes has quit [Ping timeout: 265 seconds]
ldnunes has joined #ruby-lang
intinig has quit [Ping timeout: 246 seconds]
<yorickpeterse> interesting, a Rails app segfaulting my MRI
<yorickpeterse> consistently even
<yorickpeterse> Ah, it's in therubyracer
<yorickpeterse> fkn C exts
piotrj has quit [Remote host closed the connection]
chussenot has joined #ruby-lang
piotrj has joined #ruby-lang
piotrj has quit [Remote host closed the connection]
<darix> yorickpeterse: remove therubyracer and install nodejs instead?
<yorickpeterse> re-installing it fixed it, probs some changed C lib
workmad3 has joined #ruby-lang
hahuang65 has joined #ruby-lang
<darix> yorickpeterse: libv8 gem updated probably
yfeldblum has quit [Ping timeout: 245 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
hahuang65 has quit [Ping timeout: 256 seconds]
intinig has joined #ruby-lang
crankharder has joined #ruby-lang
<headius> Eising: most of the sandboxed Ruby envs I know use JRuby
<headius> tryruby.org is jruby too, and allows running arbitrary Ruby code on server
dzejrou has joined #ruby-lang
chinmay_dd has joined #ruby-lang
crankharder has quit [Ping timeout: 255 seconds]
piotrj has joined #ruby-lang
intinig has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse> 4
<yorickpeterse> woops
intinig has joined #ruby-lang
piotrj has quit [Read error: Connection reset by peer]
alestuber has joined #ruby-lang
sankaber has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
Guest35395 has quit [Ping timeout: 256 seconds]
alestuber has quit [Remote host closed the connection]
alestuber has joined #ruby-lang
crankharder has joined #ruby-lang
alestube_ has joined #ruby-lang
alestuber has quit [Ping timeout: 264 seconds]
crankharder has quit [Ping timeout: 248 seconds]
sgambino has joined #ruby-lang
Boondox has joined #ruby-lang
Boondox has left #ruby-lang [#ruby-lang]
Boondox has joined #ruby-lang
vondruch has quit [Quit: Ex-Chat]
kerunaru has quit [Quit: Textual IRC Client: www.textualapp.com]
riotjone_ has joined #ruby-lang
<jhass> I've seen better passwords
<surrounder> lol
riotjones has quit [Ping timeout: 256 seconds]
alestube_ has quit [Ping timeout: 246 seconds]
crankharder has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 240 seconds]
<yorickpeterse> now to import 5GB of XML
mlangenberg has joined #ruby-lang
intinig has quit [Remote host closed the connection]
alestuber has joined #ruby-lang
alestuber has quit [Remote host closed the connection]
alestuber has joined #ruby-lang
danzilio has joined #ruby-lang
alestuber has quit [Remote host closed the connection]
bruno-_ has joined #ruby-lang
workmad3 has joined #ruby-lang
hotpancakes has joined #ruby-lang
<maloik> haha jhass nice one
AlxAltea has joined #ruby-lang
intinig has joined #ruby-lang
alestuber has joined #ruby-lang
hotpancakes has quit [Ping timeout: 272 seconds]
AlexAltea has quit [Ping timeout: 256 seconds]
piotrj has joined #ruby-lang
houhoulis has joined #ruby-lang
intinig has quit [Remote host closed the connection]
victortyau has joined #ruby-lang
malconis has joined #ruby-lang
<yorickpeterse> #jhass
<yorickpeterse> that's my new password
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
houhoulis has quit [Remote host closed the connection]
piotrj has quit [Remote host closed the connection]
intinig has joined #ruby-lang
alestuber has quit [Ping timeout: 264 seconds]
dhjondoh has quit [Quit: dhjondoh]
b_hoffman has joined #ruby-lang
marr has quit [Ping timeout: 256 seconds]
danzilio has quit [Quit: My computer has fallen asleep!]
alestuber has joined #ruby-lang
intinig has quit [Remote host closed the connection]
skade has joined #ruby-lang
atomical has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
piotrj has joined #ruby-lang
sankaber has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 250 seconds]
Technodrome has quit [Quit: Technodrome]
piotrj has quit [Remote host closed the connection]
banister has joined #ruby-lang
chinmay_dd has quit [Quit: See ya!]
alestuber has quit [Remote host closed the connection]
nertzy has joined #ruby-lang
hahuang65 has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
hahuang65 has quit [Ping timeout: 248 seconds]
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
<maloik> mine is my birthyear, there's so many of those it's hard to guess
relix has joined #ruby-lang
alestuber has joined #ruby-lang
skade has joined #ruby-lang
dm78_ has joined #ruby-lang
dm78 has quit [Ping timeout: 276 seconds]
alestube_ has joined #ruby-lang
alestuber has quit [Read error: Connection reset by peer]
joaomdmoura has joined #ruby-lang
<DefV> I just type my own name twice and add a 1
<toretore> hey that's stupid
<maloik> my name is 6 chars so I don't have to type it twice
<maloik> easty
<maloik> s/t//
piotrj has joined #ruby-lang
<yorickpeterse> mine is *******
<yorickpeterse> nobody will suspect a thing
piotrj has quit [Remote host closed the connection]
<toretore> hunter2?
riotjones has joined #ruby-lang
riotjones has quit [Read error: Connection reset by peer]
skade has quit [Read error: Connection reset by peer]
riotjone_ has quit [Ping timeout: 265 seconds]
piotrj has joined #ruby-lang
skade has joined #ruby-lang
piotrj has quit [Remote host closed the connection]
mlangenberg has quit [Quit: mlangenberg]
riotjones has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
riotjones has quit [Remote host closed the connection]
nertzy has quit [Quit: This computer has gone to sleep]
riotjones has joined #ruby-lang
<yorickpeterse> No, *******
<jhass> I see that written as hunter2
<jhass> 16:31 <yorickpeterse> No, hunter2
mlangenberg has joined #ruby-lang
hotpancakes has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
riotjone_ has joined #ruby-lang
riotjones has quit [Ping timeout: 256 seconds]
alestube_ has quit [Remote host closed the connection]
alestuber has joined #ruby-lang
hotpancakes has quit [Ping timeout: 244 seconds]
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby-lang
piotrj has joined #ruby-lang
whippythellama has joined #ruby-lang
chadwtaylor has joined #ruby-lang
ta has quit [Read error: Connection reset by peer]
arBmind has quit [Quit: Leaving.]
<yorickpeterse> heh
alestuber has quit [Ping timeout: 252 seconds]
shinnya has joined #ruby-lang
alestuber has joined #ruby-lang
RobertBirnie has joined #ruby-lang
nertzy has joined #ruby-lang
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby-lang
Thylacinelol has joined #ruby-lang
mlangenberg has quit [Quit: mlangenberg]
elia has quit [Ping timeout: 272 seconds]
elia has joined #ruby-lang
banister has joined #ruby-lang
k3asd` has quit [Ping timeout: 245 seconds]
symm- has quit [Ping timeout: 244 seconds]
danzilio has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<maloik> anyone use hipchat? encountering issues atm?
piotrj has quit [Remote host closed the connection]
<tubbo> maloik: seems ok for me
piotrj has joined #ruby-lang
piotrj has quit [Remote host closed the connection]
Technodrome has joined #ruby-lang
nertzy has quit [Quit: This computer has gone to sleep]
chouhoulis has joined #ruby-lang
<maloik> tubbo: I just got disconnected once again and cant get in
<maloik> other people reporting issues too
<tubbo> laaame
<maloik> nothing on their status page lol
<maloik> oh nvm, there is now
<tubbo> maloik: maybe it's unique to your org?
<tubbo> nvm
<tubbo> i was having issues yesterday
chouhoul_ has quit [Ping timeout: 272 seconds]
alestuber has quit [Read error: Connection reset by peer]
|jemc| has joined #ruby-lang
Thylacinelol has quit [Quit: Lost terminal]
skade has quit [Read error: Connection reset by peer]
alestuber has joined #ruby-lang
joaomdmoura has joined #ruby-lang
skade has joined #ruby-lang
marr has joined #ruby-lang
chinmay_dd has joined #ruby-lang
alestuber has quit [Ping timeout: 256 seconds]
mway has joined #ruby-lang
skade has quit [Ping timeout: 255 seconds]
alestuber has joined #ruby-lang
NoNMaDDeN has joined #ruby-lang
NoNMaDDeN has quit [Client Quit]
robbyoconnor has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby-lang
skade has joined #ruby-lang
Asher has quit [Quit: Leaving.]
rcvalle has joined #ruby-lang
workmad3 has quit [Ping timeout: 276 seconds]
stef204 has quit [Ping timeout: 244 seconds]
centrx has joined #ruby-lang
hahuang65 has joined #ruby-lang
chouhoul_ has joined #ruby-lang
momomomomo has joined #ruby-lang
chouhoulis has quit [Ping timeout: 246 seconds]
hahuang65 has quit [Ping timeout: 245 seconds]
alestuber has quit [Read error: Connection reset by peer]
alestuber has joined #ruby-lang
michaeldeol has joined #ruby-lang
stef204 has joined #ruby-lang
elia_ has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alestuber has quit [Ping timeout: 272 seconds]
elia_ has quit [Client Quit]
alestuber has joined #ruby-lang
__butch__ has joined #ruby-lang
elia has quit [Ping timeout: 250 seconds]
danzilio has quit [Quit: My computer has fallen asleep!]
<headius> yorickpeterse: I saw you made that #method fix
<headius> you still believe you shouldn't have had to do it? I'm really curious why
stan has quit [Ping timeout: 256 seconds]
RobertBirnie has joined #ruby-lang
danzilio has joined #ruby-lang
Torrieri has joined #ruby-lang
<yorickpeterse> because we have thousands of other methods where we use code like this where somebody _could_ overwrite the method and break things
<yorickpeterse> In this particular case it was a super easy fix so I don't really mind it
<headius> but this is a method on a user's class
<headius> that's like saying they can't override send or to_s
<yorickpeterse> e.g. for String#* we rely on kind_of? (https://github.com/rubinius/rubinius/blob/master/kernel/common/string.rb#L63), what if somebody overwrites that to raise an error?
nertzy has joined #ruby-lang
<yorickpeterse> Based on common patterns out ther #inspect _is_ a method people usually overwrite, and as long as it just returns a String that's fine
<headius> yes, but you need that for String#*
<yorickpeterse> the particular issue here was that somebody fundamentally broke the contract of what #inspect is supposed to do
<headius> all inspects everywhere have to return string forever?
<yorickpeterse> I changed it because we don't need a hard dependency on #inspect in that method
stef204 has quit [Ping timeout: 240 seconds]
<headius> by your argument, nobody could ever make Email#send either because you might need it
<yorickpeterse> depends on whether we'd rely on Object#send somewhere being the vanilla Object#send
<headius> so only if YOU use the method is it restricted?
<headius> that doesn't make sense to me either
<yorickpeterse> It makes perfect sense
<yorickpeterse> if we use X to write Ruby
<yorickpeterse> and somebody fucks up X
<yorickpeterse> What can we do?
intinig has joined #ruby-lang
<yorickpeterse> The only solution is to not use Ruby
<headius> but you're choosing to use X knowing people can fuck it up
<yorickpeterse> That's because in Ruby everybody can mess up pretty much everything, that's my whole point: there's only so much we can guard against
<headius> obviously I agree it's pretty nuanced and case-by-case, but this case seemed clear
<yorickpeterse> If a method is a fundamental dependency, don't mess it up
<yorickpeterse> #inspect wasn't, hence I fixed it
<headius> ok, that's what I wanted to clarify
<headius> I'm glad you agree this wasn't fundamental enough to take the hard line
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse> Still not sure if Celluloid's #inspect raising an error was an actual feature, or just something they happened to do in the tests
<headius> I think it was just being done for test
<yorickpeterse> Hm, per rdoc:
<yorickpeterse> "When overriding this method, it should return a string whose encoding is compatible with the default external encoding."
<yorickpeterse> though rdocs have lied before
<headius> but raise an error or not, calling inspect for method errors should be banned everywhere
<headius> it always leads to problems when you arbitrarily inspect things
skade has quit [Ping timeout: 245 seconds]
<headius> I should have linked this in the issue, but it's a place where MRI's error-related inspect causes trouble too
skade has joined #ruby-lang
Caius has quit [Quit: ""]
mway has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby-lang
Caius has joined #ruby-lang
intinig has quit [Remote host closed the connection]
<headius> yorickpeterse: you also can't constantly make fun of Ruby's doco and then use it to make a point :-P
<headius> "Ruby's docs suck unless they help me win an argument"
alestuber has quit [Read error: Connection reset by peer]
iamninja_ has quit [Read error: Connection reset by peer]
iamninja_ has joined #ruby-lang
alestuber has joined #ruby-lang
<tubbo> headius: +1
<tubbo> ruby's docs usually make me go "why are there gems for this?"
<yorickpeterse> headius: "constantly"?
<headius> yorickpeterse: at least in #rubinius you talked about how inaccurate they were very frequently
<headius> I'm not in gitter so I don't know if that's still the case
<yorickpeterse> There have been two instances where I specifically complained: String#scrub and Addrinfo
<yorickpeterse> "constantly", or even "very frequently" is bollocks
joaomdmoura has quit [Remote host closed the connection]
<headius> I know you've talked about how bad the docs are more than two times
Technodrome has quit [Quit: Technodrome]
hotpancakes has joined #ruby-lang
<yorickpeterse> oh no, I complained about something more than twice
<yorickpeterse> surely that means I must complain about it constantly
<yorickpeterse> give me a break
<yorickpeterse> also I have a train to catch, bbl
<headius> wow, hostile
<headius> I was just saying that I know you think poorly of the docs, so using them to make your point seems rather duplicitous
sarkyniin has joined #ruby-lang
<yorickpeterse> hostile?
<yorickpeterse> You're the one spreading nonsense here
<headius> nonsense?
<headius> do you think MRI has good docs?
<centrx> yes
<yorickpeterse> Differs from place to place, zzak and friends have certainly done a good job at making it much better
<headius> ok, fair enough...my impression from you was that you had a very low opinion of them
Technodrome has joined #ruby-lang
<headius> I apologize if that's not the case, but I've never seen you say something positive about them until now
<headius> (and that's not to say you haven't said anything positive, but I've not been around to see it)
alestuber has quit [Ping timeout: 252 seconds]
nertzy has quit [Quit: This computer has gone to sleep]
alestuber has joined #ruby-lang
<tbuehlmann> headius, will you attend eurucamp this year again?
<headius> tbuehlmann: well since JRubyConf.EU is happening again, it's pretty much assured :-)
hotpancakes has quit [Ping timeout: 250 seconds]
<tbuehlmann> great
skade has quit [Ping timeout: 244 seconds]
robbyoconnor has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
rejerson69 has joined #ruby-lang
skade has joined #ruby-lang
<tbuehlmann> last year's friday biergarten party was real fun. wondering why I can remember it very well
mikecmpbll has quit [Ping timeout: 248 seconds]
alestuber has quit [Read error: Connection reset by peer]
alestuber has joined #ruby-lang
Torrieri has quit [Quit: Be back later ...]
Technodrome has quit [Quit: Technodrome]
crankharder has quit [Ping timeout: 245 seconds]
<headius> yeah, one of the best parts of coming to Germany for me :-)
hotpancakes has joined #ruby-lang
hahuang65 has joined #ruby-lang
joaomdmoura has joined #ruby-lang
mlangenberg has joined #ruby-lang
alestuber has quit [Read error: Connection reset by peer]
hahuang65 has quit [Ping timeout: 264 seconds]
hotpancakes has quit [Ping timeout: 264 seconds]
skade has quit [Ping timeout: 246 seconds]
mlangenberg has quit [Client Quit]
alestuber has joined #ruby-lang
skade has joined #ruby-lang
constantinexvi has joined #ruby-lang
mlangenberg has joined #ruby-lang
LMity has joined #ruby-lang
fusillicode has quit [Quit: Leaving.]
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
Torrieri has joined #ruby-lang
Contigi has joined #ruby-lang
alestuber has quit [Ping timeout: 272 seconds]
Torrieri has quit [Client Quit]
mikecmpbll has joined #ruby-lang
alestuber has joined #ruby-lang
skade has quit [Ping timeout: 264 seconds]
mlangenberg has quit [Quit: mlangenberg]
PKL has joined #ruby-lang
skade has joined #ruby-lang
Torrieri has joined #ruby-lang
skade has quit [Excess Flood]
<PKL> hey everyone, I'm working through test-first ruby and hoping to get a little help with the Simon Says spec
hotpancakes has joined #ruby-lang
RobertBirnie has joined #ruby-lang
<havenwood> PKL: hi
LMity has quit [Ping timeout: 246 seconds]
danzilio has quit [Quit: My computer has fallen asleep!]
wallerdev has joined #ruby-lang
alestuber has quit [Ping timeout: 248 seconds]
Torrieri has quit [Quit: Be back later ...]
alestuber has joined #ruby-lang
<PKL> I'm receiving "the bridge over the river kwai" as input and I need to return "The Bridge over the River Kwai"
skade has joined #ruby-lang
<PKL> so far I'm splitting the words into an array, mapping capitalize over each one and joining them back up
<PKL> any advice on how I can selectively capitalize words? I feel like regex is beyond the scope of the exercise but could be wrong
<centrx> there's also a gem called 'titleize'
<centrx> PKL, You could have a blacklist of words that don't get capitalized
<PKL> like "if * these words * then don't capitlize kind of deal?
<PKL> the exercise is ruby only so I can't use rails for now...
<centrx> yeah like that
<PKL> sorry this is for the "testfirst.org" exercises
<centrx> ok yeah the Rails titleize function uses heavy magic
<centrx> not clear how it works
<PKL> ha cool
jgpawletko has joined #ruby-lang
alestuber has quit [Ping timeout: 244 seconds]
skade has quit [Ping timeout: 240 seconds]
<PKL> thanks for the help
<havenwood> PKL: Show us a gist of what you have so far?
<PKL> I thought maybe having a blacklist of words was kind of a "brute force" solution but if it makes the test pass it makes the test pass
skade has joined #ruby-lang
alestuber has joined #ruby-lang
<havenwood> PKL: What might the rules be for an elegant solution
<PKL> I'll try to post the code, first time using gist so give me a second...
<havenwood> PKL: If you want a reference here's a guide to using Gist: https://github.com/radar/guides/blob/master/using-gist.markdown
<PKL> errr
<havenwood> PKL: Name the gist filename with a .rb extension for pretty syntax highlighing.
dzejrou has quit [Ping timeout: 245 seconds]
<PKL> thanks for bearing with me
chussenot has quit [Ping timeout: 255 seconds]
rcvalle has quit [Quit: rcvalle]
shazaum has joined #ruby-lang
alestuber has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby-lang
<havenwood> PKL: You don't actually need the if statement there since your lines 5 & 6 handle both cases well for capitalizing all words.
<havenwood> PKL: Taking your code from the else part of the if statement, with just one word:
<havenwood> >> "hi".split.map { |a| a.capitalize }.join(" ")
<eval-in> havenwood => "Hi" (https://eval.in/317819)
alestuber has joined #ruby-lang
<PKL> havenwood: you are correct, haha
workmad3 has quit [Ping timeout: 256 seconds]
<havenwood> PKL: So now, inside the #map block what logic do you want to go with to decide whether to return `a.capitalize` or just `a` for each iteration?
<havenwood> for each word*
shinnya has quit [Ping timeout: 255 seconds]
robbyoconnor has quit [Quit: Konversation terminated!]
voxxit[away] is now known as voxxit
<PKL> in the map block
<PKL> hmmm, I was going to say it needs to check that it's not at the beginning or end but that won't work...
piotrj has joined #ruby-lang
StephenOTT has joined #ruby-lang
<havenwood> does it matter if it's at the end for capitalizing?
<PKL> if I'm using the criteria of 4 characters or less it wouldn't capitalize "Kwai"
<PKL> but that's not a good way of thinking about it
<havenwood> PKL: getting that criteria working might be a good exercise though
hahuang65 has joined #ruby-lang
skade has quit [Ping timeout: 250 seconds]
<PKL> havenwood: I can put a.capitalize if a.length <4?
<havenwood> PKL: That would be capitalizing the short strings, right? It is mapping, so you'll need to return `a` even if you don't `a.capitalize` or you'll map to `nil`s.
<havenwood> >> 1.upto(6).map { |n| n if n.odd? }
<eval-in> havenwood => [1, nil, 3, nil, 5, nil] (https://eval.in/317820)
iamninja_ has quit [Read error: Connection reset by peer]
Technodrome has joined #ruby-lang
<PKL> havenwood: let me run that in irb :)
iamninja_ has joined #ruby-lang
<PKL> havenwood: ah, I see what you mean
Cloudhand has joined #ruby-lang
skade has joined #ruby-lang
<PKL> havenwood: okay this is good
<PKL> havenwood: haha, I'm breaking the earlier specs but this is definitely better code
mway has joined #ruby-lang
mway has quit [Read error: Connection reset by peer]
chussenot has joined #ruby-lang
mway has joined #ruby-lang
mway has quit [Read error: Connection reset by peer]
michael_mbp has quit [Excess Flood]
mway has joined #ruby-lang
mway has quit [Read error: Connection reset by peer]
leesharma has joined #ruby-lang
michael_mbp has joined #ruby-lang
lytol has joined #ruby-lang
mway has joined #ruby-lang
mway has quit [Read error: Connection reset by peer]
mway has joined #ruby-lang
mway has quit [Read error: Connection reset by peer]
sankaber has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
Mon_Ouie has joined #ruby-lang
hotpancakes has quit [Remote host closed the connection]
g0bl1n has joined #ruby-lang
g0bl1n has joined #ruby-lang
thelastinuit has quit [Quit: Textual IRC Client: www.textualapp.com]
joaomdmoura has quit [Remote host closed the connection]
mlangenberg has joined #ruby-lang
Technodrome has quit [Ping timeout: 246 seconds]
leesharma has left #ruby-lang [#ruby-lang]
mlangenberg has quit [Client Quit]
joaomdmoura has joined #ruby-lang
baweaver has joined #ruby-lang
djbkd has joined #ruby-lang
g0bl1n has quit [Quit: Leaving]
mlangenberg has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
nux443 has joined #ruby-lang
crankharder has joined #ruby-lang
relix has joined #ruby-lang
ascarter has joined #ruby-lang
eban has quit [Remote host closed the connection]
solars has quit [Ping timeout: 264 seconds]
StephenOTT has quit [Quit: StephenOTT]
StephenOTT has joined #ruby-lang
ascarter has quit [Client Quit]
ascarter has joined #ruby-lang
yfeldblum has joined #ruby-lang
baweaver has joined #ruby-lang
centrx has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
bungoman has joined #ruby-lang
alestuber has quit [Ping timeout: 250 seconds]
Mark-6ma has joined #ruby-lang
alestuber has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
voxxit is now known as voxxit[away]
PKL has quit [Ping timeout: 246 seconds]
faces has quit [Ping timeout: 276 seconds]
faces has joined #ruby-lang
AlxAlt has joined #ruby-lang
hotpancakes has joined #ruby-lang
solars has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 245 seconds]
rcvalle has joined #ruby-lang
AlxAltea has quit [Ping timeout: 246 seconds]
michaeldeol has joined #ruby-lang
voxxit[away] is now known as voxxit
StephenOTT has quit [Quit: StephenOTT]
StephenOTT has joined #ruby-lang
skade has quit [Ping timeout: 272 seconds]
skade has joined #ruby-lang
piotrj has quit [Remote host closed the connection]
StephenOTT has quit [Quit: StephenOTT]
piotrj has joined #ruby-lang
Mark-6ma has quit [Quit: -]
hotpancakes has quit []
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
stef204 has joined #ruby-lang
alestube_ has joined #ruby-lang
alestuber has quit [Ping timeout: 245 seconds]
Cloudhand has quit [Ping timeout: 272 seconds]
cornerma1 has joined #ruby-lang
apt-get_ has joined #ruby-lang
cornerman has quit [Ping timeout: 256 seconds]
cornerma1 is now known as cornerman
sarkyniin has quit [Ping timeout: 272 seconds]
bruno-_ has quit [Ping timeout: 245 seconds]
skade has quit [Ping timeout: 245 seconds]
alestube_ has quit [Ping timeout: 276 seconds]
skade has joined #ruby-lang
alestuber has joined #ruby-lang
pullphinger has joined #ruby-lang
workmad3 has joined #ruby-lang
mikecmpbll has quit [Quit: ciao.]
ta has joined #ruby-lang
pullphinger has quit [Client Quit]
pullphinger has joined #ruby-lang
atomical_ has joined #ruby-lang
workmad3 has quit [Ping timeout: 256 seconds]
atomical has quit [Ping timeout: 245 seconds]
atomical has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
atomical_ has quit [Ping timeout: 245 seconds]
Brozo has joined #ruby-lang
alestuber has quit [Ping timeout: 245 seconds]
alestuber has joined #ruby-lang
|jemc| has quit [Ping timeout: 256 seconds]
Brozo has left #ruby-lang ["Leaving..."]
baweaver has joined #ruby-lang
ta has quit [Remote host closed the connection]
alestuber has quit [Ping timeout: 265 seconds]
ta has joined #ruby-lang
alestuber has joined #ruby-lang
yfeldblum has joined #ruby-lang
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alestuber has quit [Ping timeout: 252 seconds]
bruno- has joined #ruby-lang
alestuber has joined #ruby-lang
bruno- is now known as Guest91492
pullphinger has quit []
Guest91492 has quit [Ping timeout: 250 seconds]
apt-get__ has joined #ruby-lang
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
apt-get_ has quit [Ping timeout: 276 seconds]
crankharder has quit [Ping timeout: 264 seconds]
brownbathrobe has joined #ruby-lang
piotrj has quit [Remote host closed the connection]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
piotrj has joined #ruby-lang
crankharder has joined #ruby-lang
workmad3 has joined #ruby-lang
atomical has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
skade has joined #ruby-lang
Cloudhand has joined #ruby-lang
sankaber has joined #ruby-lang
SylarRuby has joined #ruby-lang
bruno-_ has joined #ruby-lang
kerunaru has joined #ruby-lang
elia has joined #ruby-lang
alestuber has quit [Read error: Connection reset by peer]
Boondox has quit []
kerunaru has quit [Client Quit]
kerunaru has joined #ruby-lang
kerunaru has quit [Client Quit]
alestuber has joined #ruby-lang
kerunaru has joined #ruby-lang
shazaum has quit [Quit: This computer has gone to sleep]
joaomdmoura has joined #ruby-lang
howdoicomputer has quit [Ping timeout: 256 seconds]
duderonomy has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chussenot has quit [Quit: chussenot]
wallerdev has quit [Quit: wallerdev]
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<RobertBirnie> is there a way to flock a file in ruby, then shell out and still work with the file?
<RobertBirnie> i want to flock a file, then compress it
michaeldeol has joined #ruby-lang
jds has quit [Quit: Connection closed for inactivity]
baweaver has quit [Remote host closed the connection]
<Senjai> RobertBirnie: yes
<Senjai> RobertBirnie: First google result http://ruby-doc.org/core-1.9.3/File.html#method-i-flock
workmad3 has quit [Ping timeout: 240 seconds]
banister has joined #ruby-lang
<Senjai> Please at least try googling before asking :(
banister has quit [Max SendQ exceeded]
<RobertBirnie> well i'm using that already :)
<RobertBirnie> if source_file.flock(File::LOCK_NB|File::LOCK_EX)
<RobertBirnie> `xz #{source_file}`
<RobertBirnie> but xz will sit forever waiting for my ruby script to unlock the file
<Senjai> What is xz?
bungoman_ has joined #ruby-lang
<RobertBirnie> its a compression app, like bzip
<RobertBirnie> much better compression ratio
<Senjai> RobertBirnie: Why are you flocking it, cant it do its own locking if it has to
<RobertBirnie> i'm guessing xz does lock, since it waits on a locked file. I'm also guessing that if the file's already locked that it'll sit around forever
bungoman has quit [Ping timeout: 240 seconds]
Cloudzy has joined #ruby-lang
<RobertBirnie> i want to flock it in ruby so that it'll skip already locked files
<pipework> Why use locks for that?
<pipework> Why not just get a list of files and use that instead?
<RobertBirnie> i guess i could just check for a lock and then continue
<pipework> I don't think locks were meant to be used in this fashion.
<Senjai> pipework: They weren't
<Senjai> RobertBirnie: It would wait on a locked file, because all process have to wait on locked files, regardless if they want a lock or not
<Senjai> Thats the point of.. locking files
<RobertBirnie> yeah, but i don't want to baby sit the script if it hits a locked file. its compressing thousands of files daily via a regular cronjob
<RobertBirnie> "compress, move, delete"
<Senjai> RobertBirnie: So, test if the file is locked
Cloudhand has quit [Ping timeout: 245 seconds]
<Senjai> if it is, move a long
<Senjai> Testing if a file is locked != locking a file
<RobertBirnie> yeah, i guess that'd work as well
<pipework> Still not sure why you can't acquire a list of files and work off that.
<Senjai> pipework: He probably does, but the files are probably shared between processes
<Senjai> which is why hes having issues
<Senjai> He's going about testing files the wrong way though
<RobertBirnie> pipework what do you mean? I am working off a big glob of files
alestuber has quit [Ping timeout: 276 seconds]
<pipework> RobertBirnie: Why do you think you need to lock the files?
<pipework> Are you actually doing operations on them, or are you just using it as a mechanism to mark the file as 'done' for some purpose?
<RobertBirnie> so if script runs twice at once it won't start squashing itself
<pipework> RobertBirnie: Then use a pidfile as a lock.
ascarter has joined #ruby-lang
<pipework> Don't lock files. Have your script check for the pidfile, only continuing if it isn't present. Then have your script clean up that pidfile regardless of how it exited, unless you want to leave it there to signal for investigation.
|jemc| has joined #ruby-lang
baweaver has joined #ruby-lang
<Senjai> pipework: We already establsihed he doesnt need to lock files
<Senjai> You dont need to use pidfiles either
<Senjai> because that would be changing another process
<Senjai> to generate the pidfiles
<Senjai> Just use lsof, fixed forever
<pipework> Senjai: lsof for a whole shitload of files?
<pipework> I don't know, man.
<RobertBirnie> this scripts also threaded. it'd be a lot of lsof
<pipework> Would rather have a pidfile, possibly actually use a lock on it if it were helpful.
banister has joined #ruby-lang
crankharder has quit [Ping timeout: 264 seconds]
<RobertBirnie> i also worry about others using the files. this is a huge shared logging server so who knows what others are doing
<Senjai> RobertBirnie: Returns false if File::LOCK_NB is specified and the operation would otherwise have blocked
<pipework> RobertBirnie: Then consider reading/copying the files contents in and releasing a lock and then using the copies for what you backup.
<Senjai> if File.flock(File::LOCK_NB)
<Senjai> Aksi
<Senjai> Also
<Senjai> each thread should be given a list of files just for that thread
<Senjai> they shouldn't be stepping on eachother
<Senjai> That list should be prepared at startup
<RobertBirnie> yeah, i'm using a Queue so they won't compete
<Senjai> Dont even need a queue man
<Senjai> Dir.glob, seperate it into thread_count even arrays
<Senjai> pass each one to a worker
<Senjai> fixed forever
<pipework> What about when the files are being modified and appended to?
<Senjai> I dont have enough context man
<pipework> Neither do I.
<Senjai> I'd use a makefile, or guard
<pipework> I'd use cocaine.
<Senjai> I'd do cocaine
<RobertBirnie> i'm just compressing a large number of rolling log files :)
<Senjai> because I never find myself in these terrible situations :P
<RobertBirnie> compress all logs older than x
<Senjai> RobertBirnie: Isn't that like.. a solved problem
<pipework> logrotate, amirite
<Senjai> There's an app for that (tm)
<pipework> ™
<Senjai> RobertBirnie: Returns false if File::LOCK_NB is specified and the operation would otherwise have blocked
<Senjai> damnit
<Senjai> clipboard
<Senjai> RobertBirnie: ^
<RobertBirnie> i'm not doing the rotating. i'm just archiving the rotating logs for long term storage :)
alestuber has joined #ruby-lang
<Senjai> RobertBirnie: mv *.zip somewhere else
<pipework> RobertBirnie: Rotated logs shouldn't be written to.
<Senjai> ^
<Senjai> RobertBirnie: The best thing you can do as a programmer, is write no code :P
<pipework> You should be able to just compress them via the command line if xz accepts patterns or a directory.
<Senjai> ^
yfeldblum has quit [Ping timeout: 240 seconds]
yfeldblu_ has joined #ruby-lang
<RobertBirnie> i'm doing it in ruby so i can get the queue
<RobertBirnie> on thread can't keep up with the volume
<RobertBirnie> one*
Cloudzy has quit [Ping timeout: 240 seconds]
<Senjai> We already said you dont need a queue
<Senjai> s/We/i
<Senjai> Unless your actually having a process monitor the directory
shinnya has joined #ruby-lang
<pipework> RobertBirnie: You don't need a queue. Does the compression program you use not use threads?
<Senjai> instead of run at intervals
<Senjai> ^
<pipework> Seems a shitty program if it doesn't.
<Senjai> ^
<Senjai> I dont normally agree with pipework on things, but when I do, its weird.
<RobertBirnie> compression program uses threads, but you can't pass it thousands of files at a time :)
<pipework> RobertBirnie: Can you pass it a directory or pattern?
<RobertBirnie> and doing xz & ; xz & ; sounds like a nightmare :D
jgpawletko has quit [Quit: jgpawletko]
<RobertBirnie> after i compress each file i have to move it out. if i pased it a huge list at once it'd probably also destroy my storage capacity
<pipework> RobertBirnie: xz is just the executable for the lzma compression algorithm, right?
<RobertBirnie> yes
<pipework> Today you will learn about ls, pipes, and xargs.
tcopeland has joined #ruby-lang
<pipework> ls some_dir/*.log | xargs -0 tar -c - | xz --format=lzma $1.tar.xz # That's just a guess, but it'd handle what you need.
<pipework> If you find that the buffer size of your pipes is insufficient, either bump that up, or you can actually split the ls pipe into multiple processes, let me know if you need help with that.
<pipework> All about dat tarpipe.
<Senjai> xargs best command 2015
<Senjai> or like, forever
<RobertBirnie> i wish it was that simple :(
<Senjai> RobertBirnie: Probably is
<Senjai> RobertBirnie: Everything you say screams "overcomplicated"
<Senjai> No offence :P
<Senjai> pipework: Interesting, never used paralell
unreal_ has joined #ruby-lang
<pipework> I call it parallul.
<pipework> Not because it sucks, but because I get massive lulz when I use it in front of people.
<pipework> RobertBirnie: You should probably either declare that you're merely socializing or give us all the information.
<pipework> If you simply just want to write some ruby to do what can be done with a one liner, that's okay. I support the need to flex your ruby muscle.
<RobertBirnie> so we've got two main disks for logs /data/logs/ and /data/log_archives/
<RobertBirnie> under /data/logs/ there are n number of directories
<pipework> If it's going to be long, you might want to write it in one message. IRC can handle long messages.
unreal has quit [Ping timeout: 252 seconds]
<Senjai> Or.. use gist.github.com
<RobertBirnie> so i need to xz all the files in /data/logs and get them over to the archives directory, preserving filesystem hierarchy. and we're talking about roughly 10GB a minute data
piotrj has quit []
<pipework> What should an individual archive contain?
<pipework> Just the single log file(s), do the archives need to be nested under the file hierarchy, or can you merely unpack them in the right place?
<pipework> Cause what I'm hearing is that you don't know that you want to ask for some help using awk.
<RobertBirnie> its not deep nesting but they need to keep place
toretore has quit [Quit: Leaving]
apt-get__ has quit [Remote host closed the connection]
<Senjai> RobertBirnie: rsync?
<Senjai> lolz
<pipework> 'keep place' as in the hierarchy no matter how deep must be reflected within the archive itself?
ldnunes has quit [Quit: Leaving]
<pipework> Is the archive a single log file?
<RobertBirnie> no, rolling 1GB files
<pipework> The size doesn't matter, and since they're logrotated, the rolling isn't applicable.
<pipework> So yeah, that's pretty doable as a one-liner.
<pipework> You can even expand it into a ruby script that just wraps the one-liner with sugars and stuff, but I'd head that way around instead of ruby script first.
<RobertBirnie> how would you handle threading it? parallel is cool, but if it were to thread out based on all the files in the list it'd crush the box
alestuber has quit [Read error: Connection reset by peer]
alestuber has joined #ruby-lang
<pipework> You limit the number of threads based on a default or user input in the command.
<pipework> You'd have to solve that problem with your script just as much as you would a one-liner.
<RobertBirnie> yeah, queue made it easy since i already had the script and was just modifying it
<pipework> Yeah, parallel makes it easier.
<pipework> It already only threads out according to your core count, iirc.
<pipework> There's also --use-cpus-instead-of-cores if you have hyperthreading.
joaomdmoura has quit [Remote host closed the connection]
victortyau has quit [Ping timeout: 276 seconds]
joaomdmoura has joined #ruby-lang
<pipework> There's probably more functionality described in that one man page than you'd ever hope to implement yourself.
baweaver has quit [Remote host closed the connection]
postmodern has joined #ruby-lang
<RobertBirnie> yes, the man is quite extensive
hhatch has quit [Ping timeout: 256 seconds]
joaomdmoura has quit [Ping timeout: 250 seconds]
<Senjai> RobertBirnie: Just use like, 2 or three threads
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Senjai> I'm sure you can specify the number of threads you'd like to use
<Senjai> You can also limit the amount of resources any program or script can use
<RobertBirnie> looks like its --max-procs or -j
wallerdev has joined #ruby-lang
crankharder has joined #ruby-lang
toretore has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
solars has quit [Ping timeout: 244 seconds]
GBrawl has joined #ruby-lang
ItSANgo__ has joined #ruby-lang
bungoman_ has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
ItSANg___ has quit [Ping timeout: 256 seconds]
djbkd has joined #ruby-lang
chadwtaylor has quit [Quit: Leaving...]
Cloudzy has joined #ruby-lang
baweaver has joined #ruby-lang
k3asd` has joined #ruby-lang
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cengizIO has joined #ruby-lang
alestuber has quit [Ping timeout: 245 seconds]
GBrawl has quit [Quit: (null)]
bungoman has joined #ruby-lang
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby-lang
alestuber has joined #ruby-lang
fusillicode has joined #ruby-lang
crankharder has quit [Read error: Connection reset by peer]
crankharder has joined #ruby-lang
whippythellama has quit [Quit: whippythellama]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fsvehla has quit [Quit: fsvehla]
riotjones has joined #ruby-lang
riotjone_ has quit [Ping timeout: 264 seconds]
symm- has joined #ruby-lang
centrx has joined #ruby-lang
brownbathrobe has quit []
workmad3 has joined #ruby-lang
tcopeland has quit [Quit: Leaving.]
__butch__ has quit [Quit: Leaving.]
workmad3 has quit [Ping timeout: 255 seconds]
alestuber has quit [Ping timeout: 272 seconds]
cengizIO has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alestuber has joined #ruby-lang
Cloudzy has quit [Ping timeout: 272 seconds]
robbyoconnor has joined #ruby-lang
alakra has quit [Ping timeout: 264 seconds]
alakra has joined #ruby-lang
setanta_ has quit [Quit: Leaving]
robbyoconnor has quit [Ping timeout: 256 seconds]
mlangenberg has left #ruby-lang [#ruby-lang]
cengizIO has joined #ruby-lang
robbyoconnor has joined #ruby-lang
workmad3 has joined #ruby-lang
ascarter has quit [Ping timeout: 256 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
crankharder has quit [Ping timeout: 276 seconds]
LMity has joined #ruby-lang
alakra has quit [Quit: WeeChat 0.4.2]
alakra has joined #ruby-lang
alakra has quit [Client Quit]
k3asd` has quit [Ping timeout: 248 seconds]
alakra has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
fujimura has joined #ruby-lang
fujimura has quit [Remote host closed the connection]
LMity has quit [Ping timeout: 245 seconds]
alestuber has quit [Ping timeout: 248 seconds]
baweaver has joined #ruby-lang
Kero has quit [Ping timeout: 252 seconds]
alestuber has joined #ruby-lang
Kero has joined #ruby-lang
cytoskeletor has joined #ruby-lang
cytoskeletor has quit [Client Quit]
cengizIO has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
crankharder has joined #ruby-lang
Kero has quit [Ping timeout: 250 seconds]
symm-_ has joined #ruby-lang
alestuber has quit [Ping timeout: 248 seconds]
Kero has joined #ruby-lang
symm- has quit [Read error: Connection reset by peer]
rcvalle has quit [Quit: rcvalle]
alestuber has joined #ruby-lang
stef204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
elia has quit [Quit: Computer has gone to sleep.]
robbyoconnor has quit [Quit: Konversation terminated!]
duderonomy has quit [Ping timeout: 276 seconds]
cengizIO has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
workmad3 has quit [Ping timeout: 264 seconds]
bungoman_ has joined #ruby-lang
slawrence00 has joined #ruby-lang
bungoman has quit [Ping timeout: 256 seconds]
alestuber has quit [Remote host closed the connection]
crankharder has quit [Ping timeout: 276 seconds]
bungoman_ has quit [Ping timeout: 256 seconds]
marr has quit [Read error: Connection reset by peer]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]