ChanServ changed the topic of #ruby-lang to: Ruby 1.9.3-p125: http://ruby-lang.org | Paste >3 lines of text on http://pastie.org or use a gist
vlad_starkov has quit [Ping timeout: 240 seconds]
<zenspider> steveklabnik: oi. here.
ghanima has quit [Quit: Leaving.]
gsav has quit [Read error: Connection reset by peer]
yankov has quit [Quit: yankov]
slyphon has joined #ruby-lang
headius has quit [Quit: headius]
havenn has quit [Remote host closed the connection]
<zenspider> you guys are boring :/
<rhizmoe> it's true
<zenspider> damn gauntlet winds up downloading a ton of files...
<zenspider> you guys also make too many gems
<steveklabnik> zenspider: yo. did you happen to scroll up, or should i re-paste? ;)
<rhizmoe> gemwriter needs food badly
<erikh> haha
<steveklabnik> zenspider: my new favorite: http://rubygems.org/gems/active_support
<zenspider> is that just like nokogirl ?
<drbrain> steveklabnik: shoot, sorry, I am unsure
<erikh> is another
<zenspider> that's a lot of downloads
<erikh> yeah.
<steveklabnik> ahahahaha
<zenspider> nokogirl only has 3k
<steveklabnik> the rails_config gem doesn't even point to it
banisterfiend has quit [Remote host closed the connection]
<zenspider> anyhow... no... I missed your question... jsut saw the mention
WillMarshall has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby-lang
<steveklabnik> that works just fine
<steveklabnik> however
<steveklabnik> it doesn't work with an AS::TestCase
<steveklabnik> i was hoping for some advice on how to properly hook into that
<zenspider> tenderlo_: oi
<steveklabnik> also drbrain, no worries :)
t97782 has quit [Remote host closed the connection]
tenderlo_ is now known as tenderlove
<tenderlove> zenspider: wat
tenderlove is now known as ap433d
t61225 has joined #ruby-lang
<zenspider> ap433d: your attitude sucks
<zenspider> see above... klabnik wants to know how to integrate draper with AS::TestCase properly. that's your domain
<steveklabnik> basically it boils down to 'i need to run a few lines of code before all tests happen'
<steveklabnik> and i want to do it in a nice way, not screw with stuff.
<erikh> BEGIN { }
* erikh hides
<steveklabnik> :p
banisterfiend has quit [Ping timeout: 244 seconds]
wpaulson has joined #ruby-lang
anjen has joined #ruby-lang
<zenspider> steveklabnik: I generally recommend that you add a lazy accessor w/ class level caching.
<steveklabnik> yeah, so, I do that in one part, for sure.
<steveklabnik> unfortunately, the other three parts need to be stubbed out in testing only
<steveklabnik> well, i guess it wouldnt hurt
<steveklabnik> since they're already ||=s
S2kx has quit [Ping timeout: 252 seconds]
<steveklabnik> though i dont control that object
<steveklabnik> it's rails'
<zenspider> *nod*
<steveklabnik> but i guess i am wrapping it with #current
<steveklabnik> since this stuff was mostly Jeff's code before i got there, trying to take it slow. but yeah, that may be the ultimate best solution
<steveklabnik> i dont really like that code in the first place.
saxy has joined #ruby-lang
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
anjen has quit [Quit: anjen]
ttilley has quit [Quit: ttilley]
tgriffin2081 has joined #ruby-lang
Tearan has quit [Quit: Sleepy Badger....]
banisterfiend has joined #ruby-lang
fromhet has quit [Quit: fromhet]
wallerdev has joined #ruby-lang
JoelMcCracken has joined #ruby-lang
wpaulson has joined #ruby-lang
sn0wb1rd has quit [Ping timeout: 256 seconds]
sn0wb1rd has joined #ruby-lang
lsegal has joined #ruby-lang
wpaulson has quit [Client Quit]
havenn has joined #ruby-lang
ap433d has quit [Remote host closed the connection]
gsav has joined #ruby-lang
tgriffin2081 has quit []
tgriffin2081 has joined #ruby-lang
yankov has joined #ruby-lang
guns has joined #ruby-lang
saxy has quit [Remote host closed the connection]
dgs has joined #ruby-lang
<dgs> if you're using sockets in ruby, is it possible to get the source port of a tcp connection. (eg not the port you are listening on, but the port the request left the other machine on)
<JoelMcCracken> what is miniruby?
<JoelMcCracken> nvm, found link on mailing list reference
alvaro_o has quit [Quit: Ex-Chat]
bfreeman has joined #ruby-lang
mrsolo has quit [Quit: Leaving]
<eam> dgs: sure, that's returned by accept
wpaulson has joined #ruby-lang
<eam> oh wow, the ruby socket api is ugly
<eam> it returns a string?
<dgs> hmmm. that returns a Tcpsocket
<eam> dgs: second thing it returns
<eam> client, client_sockaddr = accept
bryancp has joined #ruby-lang
<eam> but, it appears you have to unpack the string yourself. man, this is raw
<dgs> hmm, i'm just getting an empty string
<eam> ruby version
<eam> ?
havenn has quit [Ping timeout: 260 seconds]
WillMarshall has joined #ruby-lang
<eam> over here it looks like I need to: client, client_sockaddr = socket.accept # client is a Socket, client_sockaddr is a String
<eam> and then sin_family, sin_port, sin_addr = client_sockaddr.unpack("sSL")
<eam> wtf isn't there a utility function for this
<lianj> s = socket.accept; s.remote_address
<lianj> s = socket.accept; s.remote_address.ip_port
<eam> that's way nicer
<eam> are the docs for my ruby just lame?
havenn has joined #ruby-lang
<lianj> i just did p s.methods and s.remote_address.methods
<eam> lianj: uh, I don't have a remote_address method for Socket
<eam> 1.9?
<JoelMcCracken> Better question. Every time I find myself writing any kind of bash, I find that I really wish that I was writing ruby. The only way I really could do that though is with the knowledge that I could basically easily download an executable for any platform and have it up and running within a few mins
<lianj> eam: yes
<eam> that's probably why, I have 1.8 here
Axsuul has quit [Read error: Connection reset by peer]
<JoelMcCracken> it cant require sudo, compiling, or anything like that
<JoelMcCracken> does anything like this exist?
<lianj> eam: try .peeraddr
<eam> nope
Axsuul has joined #ruby-lang
<eam> > client.methods.grep /addr/ => []
<eam> I think 1.8's socket class is just hella ghetto
<eam> as long as it's fixed in 1.9 I can't complain I guess
WillMarshall has quit [Client Quit]
<lianj> eam: i guess one will work with 1.8 too https://pastee.org/zc9n7
Criztian has quit []
<steveklabnik> JoelMcCracken: binary distriutions of ruby exist, sure
<steveklabnik> it's about 30mb
<JoelMcCracken> where?
<JoelMcCracken> that's a fine size
<lianj> JoelMcCracken: jruby-complete.jar ?
<steveklabnik> JoelMcCracken: most package managers do it that way, for one
<steveklabnik> and ruby can be compiled statically, so
<steveklabnik> i haven't had to actually GET one in a very long time, but i've made them
anjen has joined #ruby-lang
<JoelMcCracken> ah
savage- has quit [Remote host closed the connection]
<JoelMcCracken> I'm hoping to avoid package managers
anjen has quit [Client Quit]
lcdhoffman_ has quit [Quit: lcdhoffman_]
<JoelMcCracken> Additionally, the whole install to root is a problem
<JoelMcCracken> (which would be the standard way that a package manager works?)
<JoelMcCracken> maybe I'll investigate this more
sn0wb1rd has quit [Quit: sn0wb1rd]
m3nd3s has joined #ruby-lang
jstemmer_ has quit [Ping timeout: 260 seconds]
jstemmer_ has joined #ruby-lang
Quatrerwin has quit [Remote host closed the connection]
seanstickle has quit [Quit: seanstickle]
dous has quit [Remote host closed the connection]
sailias has quit [Read error: Operation timed out]
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
neocoin has joined #ruby-lang
dous has quit [Ping timeout: 248 seconds]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
JoelMcCracken has quit [Ping timeout: 252 seconds]
havenn has quit [Remote host closed the connection]
sn0wb1rd has joined #ruby-lang
t61225 has quit [Remote host closed the connection]
t47471 has joined #ruby-lang
<eam> lianj: a bit better than rolling your own :)
qpingu has quit [Quit: Leaving.]
sailias has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
JoelMcCracken has joined #ruby-lang
gregmore_ has joined #ruby-lang
gregmoreno has quit [Read error: No route to host]
krz has quit [Quit: krz]
<erikh> trolling your own
tomzx_ has joined #ruby-lang
JoelMcCracken has quit [Quit: reconnecting]
JoelMcCracken has joined #ruby-lang
JoelMcCracken has quit [Client Quit]
Quatrerwin has joined #ruby-lang
Quatrerwin has quit [Changing host]
Quatrerwin has joined #ruby-lang
JoelMcCracken has joined #ruby-lang
deryl has quit [Quit: deryl]
<drbrain> surely somebody has parodied Rawhide! with trollin' trollin' trollin'
J_Milo has joined #ruby-lang
<drbrain> steveklabnik: I'm sure someone could to better :/
Cherrum has quit [Read error: Connection reset by peer]
Cherrum has joined #ruby-lang
andoyasushi has joined #ruby-lang
<erikh> trollin trollin trollin, keep that rick a rollin, all of 4chan's lollin, rawhide
tomzx_ has quit [Ping timeout: 264 seconds]
<drbrain> erikh: exactly
<erikh> I have scotch and an empty stomach to thank for that
yankov_ has joined #ruby-lang
yankov has quit [Ping timeout: 244 seconds]
JoelMcCracken has quit [Ping timeout: 244 seconds]
khoa has joined #ruby-lang
dous has joined #ruby-lang
RickHull has quit [Quit: Leaving.]
t47471 has quit [Remote host closed the connection]
t77474 has joined #ruby-lang
starsky_70 has joined #ruby-lang
starsky_70 has left #ruby-lang [#ruby-lang]
dous has quit [Ping timeout: 264 seconds]
J_Milo has quit [Ping timeout: 245 seconds]
bryancp has quit [Remote host closed the connection]
sora_h is now known as s0ra_h
ricardovaleriano has joined #ruby-lang
<drbrain> zzak: please check my comments on Ripper and Pathname documentation
khoa has quit [Read error: Connection timed out]
diegoviola has quit [Ping timeout: 252 seconds]
JoelMcCracken has joined #ruby-lang
t77474 has quit [Remote host closed the connection]
t15633 has joined #ruby-lang
ryanf has joined #ruby-lang
CarlB_the_great has joined #ruby-lang
Migore has joined #ruby-lang
guns has quit [Ping timeout: 248 seconds]
wpaulson has joined #ruby-lang
sailias has quit []
wpaulson has quit [Client Quit]
s0ra_h is now known as sora_h
Migore2 has joined #ruby-lang
sn0wb1rd has quit [Read error: Connection reset by peer]
sn0wb1rd has joined #ruby-lang
Migore has quit [Ping timeout: 240 seconds]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
andoyasushi has quit [Ping timeout: 260 seconds]
areil has joined #ruby-lang
dous has joined #ruby-lang
saxy has joined #ruby-lang
t15633 has quit [Remote host closed the connection]
t10386 has joined #ruby-lang
dous has quit [Ping timeout: 245 seconds]
saxy has quit [Ping timeout: 245 seconds]
sora_h is now known as s0ra_h
totallymike has quit [Ping timeout: 272 seconds]
guns has joined #ruby-lang
guns is now known as Guest44905
Migore2 has quit []
Guest44905 has quit [Client Quit]
savage- has joined #ruby-lang
s0ra_h is now known as sora_h
illingsworth has joined #ruby-lang
codewrangler has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
illingsworth has quit [Quit: Leaving...]
illingsworth has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
kuja has quit [Ping timeout: 252 seconds]
kuja has joined #ruby-lang
ricardovaleriano has quit [Remote host closed the connection]
GeekOnCoffee has joined #ruby-lang
banisterfiend has joined #ruby-lang
nXqd has joined #ruby-lang
ap433d has joined #ruby-lang
CarlB_the_great has quit [Remote host closed the connection]
khoa has joined #ruby-lang
illingsworth has quit [Remote host closed the connection]
ap433d has quit [Ping timeout: 265 seconds]
sailias has joined #ruby-lang
sora_h is now known as s0ra_h
saxy has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
t10386 has quit [Remote host closed the connection]
t27430 has joined #ruby-lang
ivanoats has quit [Read error: Connection reset by peer]
ivanoats has joined #ruby-lang
ghanima has joined #ruby-lang
<ghanima> Hello all question I am trying to create a function that takes an argument that denotes a http rest operation like so
<ghanima> def sample(op)
<ghanima> resp = RestClient::Resource.new(@baseURL)
s0ra_h is now known as sora_h
khoa has quit [Read error: Connection timed out]
<ghanima> reqBody = resp[url].op
<ghanima> This seems to fail because the op can't be interpolating by the function
<ghanima> not sure if what I am trying to do is possible so thought I might ask
<ghanima> any thoughts
JoelMcCracken has quit [Ping timeout: 245 seconds]
<GeekOnCoffee> what are you actually trying to do
<GeekOnCoffee> oh
<GeekOnCoffee> ghanima I believe you want .send(op)
<ghanima> .send ha never heard of that method
ivanoats has quit [Remote host closed the connection]
towski has joined #ruby-lang
<ghanima> GeekOnCoffee: If I am reading the ruby doc I have to set my argument as a symbol
khoa has joined #ruby-lang
<GeekOnCoffee> ghanima:
<GeekOnCoffee> 14.send("to_s")
<GeekOnCoffee> => "14"
<ghanima> GeekOnCoffee: testing that now one sec
gregmoreno has joined #ruby-lang
gregmore_ has quit [Ping timeout: 245 seconds]
sailias has quit []
dous has joined #ruby-lang
<ghanima> GeekOnCofee it doesn't work in my case. I keep getting the following error
<ghanima> ./newscript.rb:58: syntax error, unexpected tIVAR, expecting keyword_end
<ghanima> ... resp[url].send(op) @jsonHeader.merge('Auth-Token' => token)
ryanf has quit [Ping timeout: 268 seconds]
<drbrain> ghanima: if that's all on one line you need a ;
dous has quit [Ping timeout: 244 seconds]
<ghanima> drbrain: at the very end of line?
<ghanima> drbrain: This is the full line
<ghanima> reqBody = resp[url].op sessionData.to_json, @jsonHeader.merge('Auth-Token' => token)
<drbrain> between send(op) and @jsonHeader
<drbrain> that's an entirely different line
d3vic3 has quit [Ping timeout: 244 seconds]
<drbrain> what's with all the camelCase?
<ghanima> sorry your right: reqBody = resp[url].send(:op) @jsonHeader.merge('Auth-Token' => token)
CapnKernul has joined #ruby-lang
setmeaway has quit [Quit: Leaving]
<ghanima> drbrain: That work thanks man
<drbrain> this will probably work: reqBody = resp[url].op sessionData.to_json, @jsonHeader.merge('Auth-Token' => token)
<ghanima> to answer your question... this is my first pass I will be cleaning up the script after I prove function and will be removing the camelcase
d3vic3 has joined #ruby-lang
setmeaway has joined #ruby-lang
<drbrain> you don't *have* to, but rubyists will be confused by it
<drbrain> :D
<Defusal_> camels in rubies?!? no compute
krz has joined #ruby-lang
khoa has quit [Read error: Connection timed out]
<drbrain> Defusal_: it's fine for ClassNames
CapnKernul has quit [Quit: Leaving...]
<Defusal_> ok, i did mean lower camel case of course
khoa has joined #ruby-lang
Dreamer3 has quit [Ping timeout: 256 seconds]
gsav has joined #ruby-lang
Dreamer3 has joined #ruby-lang
S1kx has joined #ruby-lang
S1kx has quit [Changing host]
S1kx has joined #ruby-lang
dgs has quit [Ping timeout: 248 seconds]
EvilJStoker has quit [Excess Flood]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
<ghanima> drbrain: you still around
<ghanima> The option you gave me works but it now seems to break my function
<ghanima> this line reqBody = resp[url].send(op); @jsonHeader.merge('Auth-Token' => token)
<ghanima> everything after ; seems to be excluded from the method
<ghanima> and I need that data passed to that function
rue has quit [Remote host closed the connection]
rue has joined #ruby-lang
rue|w has joined #ruby-lang
ivanoats has quit [Ping timeout: 244 seconds]
rue|w has quit [Remote host closed the connection]
khoa has quit [Read error: Connection timed out]
chimkan has joined #ruby-lang
khoa has joined #ruby-lang
sepp2k has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
dgs has joined #ruby-lang
CapnKernul has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
tonni has quit [Remote host closed the connection]
nazty has quit [Ping timeout: 260 seconds]
tonni has joined #ruby-lang
EvilJStoker has joined #ruby-lang
illingsworth has joined #ruby-lang
illingsworth has quit [Remote host closed the connection]
tonni has quit [Ping timeout: 246 seconds]
khoa has quit [Read error: Connection timed out]
khoa has joined #ruby-lang
ryanf has joined #ruby-lang
yats has joined #ruby-lang
ghanima has quit [Read error: Connection reset by peer]
nXqd has quit [Ping timeout: 246 seconds]
t27430 has quit [Remote host closed the connection]
t27850 has joined #ruby-lang
ghanima has joined #ruby-lang
towski has quit [Remote host closed the connection]
khoa has quit [Read error: Connection timed out]
khoa has joined #ruby-lang
banisterfiend has joined #ruby-lang
nXqd has joined #ruby-lang
burgestrand has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
Cherrum has quit [Ping timeout: 245 seconds]
Cherrum has joined #ruby-lang
ivanoats has quit [Ping timeout: 244 seconds]
Guest65367 has quit [Read error: Operation timed out]
cschneid has quit [Read error: Operation timed out]
rue|w has joined #ruby-lang
khoa has quit [Read error: Connection timed out]
khoa has joined #ruby-lang
nXqd has quit [Ping timeout: 256 seconds]
gsav has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
nXqd has joined #ruby-lang
gsav has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
chimkan has quit [Quit: chimkan]
<yorickpeterse> Morning
vlad_starkov has quit [Ping timeout: 244 seconds]
t27850 has quit [Remote host closed the connection]
t57793 has joined #ruby-lang
<bnagy> mornin
<bnagy> ghanima: they do different things a=1,2 => [1,2] a=1; 2 is two statements
vlad_sta_ has quit [Read error: Connection reset by peer]
Guest98701 has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
khoa has quit [Read error: Connection timed out]
chimkan has joined #ruby-lang
Guest98701 has quit [Quit: Leaving]
khoa has joined #ruby-lang
khoa has quit [Client Quit]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
dhruvasagar has joined #ruby-lang
dhruvasagar has quit [Remote host closed the connection]
cschneid has joined #ruby-lang
chimkan has quit [Quit: chimkan]
tonni has joined #ruby-lang
kitallis has joined #ruby-lang
dhruvasagar has joined #ruby-lang
Musfuut has joined #ruby-lang
headius has joined #ruby-lang
mytrile has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
lele|w has quit [Ping timeout: 272 seconds]
ghanima1 has joined #ruby-lang
s1n4 has joined #ruby-lang
lele|w has joined #ruby-lang
ghanima has quit [Ping timeout: 260 seconds]
zmack has joined #ruby-lang
Theueip has quit [Quit: Bye!]
gsav has quit [Read error: Connection reset by peer]
saxy has quit [Remote host closed the connection]
rue|w has quit [Remote host closed the connection]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
ghanima1 has quit [Ping timeout: 248 seconds]
ivanoats has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
solars has joined #ruby-lang
ghanima has joined #ruby-lang
tbuehlmann has joined #ruby-lang
Quatrerwin has quit [Quit: Leaving]
wallerdev has quit [Quit: wallerdev]
kitallis has quit [Ping timeout: 244 seconds]
thone_ has joined #ruby-lang
krz has quit [Quit: krz]
thone has quit [Ping timeout: 252 seconds]
t57793 has quit [Remote host closed the connection]
t63481 has joined #ruby-lang
Criztian has joined #ruby-lang
jxie_ has joined #ruby-lang
jxie has quit [Read error: Connection reset by peer]
rue|w has joined #ruby-lang
wallerdev has joined #ruby-lang
sn0wb1rd has quit [Quit: I will be right back]
yankov_ has quit [Quit: yankov_]
Musfuut has quit [Read error: Operation timed out]
Criztian has quit [Remote host closed the connection]
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
IPGlider has joined #ruby-lang
cdt has joined #ruby-lang
rue|w has quit [Ping timeout: 260 seconds]
cschneid has quit [Ping timeout: 245 seconds]
kain has quit [Ping timeout: 248 seconds]
dous has quit [Ping timeout: 244 seconds]
Theueip has joined #ruby-lang
cschneid has joined #ruby-lang
Musfuut has joined #ruby-lang
Musfuut is now known as Guest19822
solars has quit [Ping timeout: 245 seconds]
wallerdev has quit [Quit: wallerdev]
charliesome has joined #ruby-lang
major_majors has quit [Ping timeout: 246 seconds]
nick_h has quit [Ping timeout: 246 seconds]
cout has quit [Ping timeout: 252 seconds]
t63481 has quit [Remote host closed the connection]
t51740 has joined #ruby-lang
foca has quit [Ping timeout: 260 seconds]
rking has quit [Ping timeout: 272 seconds]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
foca has joined #ruby-lang
rking has joined #ruby-lang
solars has joined #ruby-lang
cout has joined #ruby-lang
ghanima has quit [Quit: Leaving.]
ivanoats has quit [Ping timeout: 246 seconds]
jlangvand has joined #ruby-lang
foca has quit [Ping timeout: 252 seconds]
rking has quit [Ping timeout: 265 seconds]
cout has quit [Ping timeout: 268 seconds]
jstemmer_ has quit [*.net *.split]
cout has joined #ruby-lang
runeb has joined #ruby-lang
gloomer has joined #ruby-lang
foca has joined #ruby-lang
gnufied has joined #ruby-lang
rking has joined #ruby-lang
major_majors has joined #ruby-lang
nick_h has joined #ruby-lang
|Vargas| has quit [Quit: ...]
qwerxy has joined #ruby-lang
workmad3 has joined #ruby-lang
CapnKernul has quit [Quit: Leaving...]
d3vic3 has quit [Read error: Connection reset by peer]
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
Criztian has joined #ruby-lang
d3vic3 has joined #ruby-lang
cout has quit [Ping timeout: 246 seconds]
jlangvand has quit [Quit: leaving]
cout has joined #ruby-lang
t51740 has quit [Remote host closed the connection]
t30322 has joined #ruby-lang
robotmay has joined #ruby-lang
rue|w has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
rue|w has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
s1n4 has left #ruby-lang ["leaving"]
burgestrand1 has joined #ruby-lang
fromhet has joined #ruby-lang
burgestrand has quit [Ping timeout: 245 seconds]
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
jstemmer has joined #ruby-lang
foca has quit [Ping timeout: 264 seconds]
major_majors has quit [Ping timeout: 260 seconds]
nick_h has quit [Ping timeout: 244 seconds]
cout has quit [Ping timeout: 245 seconds]
rking has quit [Ping timeout: 264 seconds]
cout has joined #ruby-lang
nick_h has joined #ruby-lang
toretore has joined #ruby-lang
rking has joined #ruby-lang
foca has joined #ruby-lang
dgs|2 has joined #ruby-lang
dgs has quit [Ping timeout: 260 seconds]
major_majors has joined #ruby-lang
khoa has joined #ruby-lang
rking has quit [Read error: Operation timed out]
rking has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
foca has quit [Ping timeout: 240 seconds]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
nick_h has quit [Ping timeout: 245 seconds]
dgs|2 has quit [Read error: Connection reset by peer]
cout has quit [Ping timeout: 246 seconds]
major_majors has quit [Ping timeout: 244 seconds]
rking has quit [Ping timeout: 248 seconds]
dgs|2 has joined #ruby-lang
nick_h has joined #ruby-lang
foca has joined #ruby-lang
ivanoats has quit [Ping timeout: 246 seconds]
rking has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Quatrerwin has joined #ruby-lang
Quatrerwin has quit [Changing host]
Quatrerwin has joined #ruby-lang
khoa has quit [Read error: Connection timed out]
chendo_ has quit [Ping timeout: 252 seconds]
Virunga has joined #ruby-lang
cout has joined #ruby-lang
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
major_majors has joined #ruby-lang
khoa has joined #ruby-lang
ryanf has quit [Quit: leaving]
foca has quit [Ping timeout: 264 seconds]
major_majors has quit [Ping timeout: 246 seconds]
nick_h has quit [Ping timeout: 265 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
rking has quit [Ping timeout: 264 seconds]
cout has quit [Ping timeout: 260 seconds]
burgestrand1 has quit [Ping timeout: 244 seconds]
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
jbsan has quit [Quit: jbsan]
ramonmaruko has quit [Remote host closed the connection]
foca has joined #ruby-lang
rking has joined #ruby-lang
rue|w has joined #ruby-lang
workmad3 has joined #ruby-lang
cout has joined #ruby-lang
major_majors has joined #ruby-lang
ramonmaruko has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
nick_h has joined #ruby-lang
t30322 has quit [Remote host closed the connection]
t91170 has joined #ruby-lang
gloomer has quit [Ping timeout: 268 seconds]
judofyr has joined #ruby-lang
khoa has quit [Read error: Connection timed out]
khoa has joined #ruby-lang
gloomer has joined #ruby-lang
celinedior has joined #ruby-lang
iani has joined #ruby-lang
adambeynon has joined #ruby-lang
cantonic has quit [Quit: cantonic]
khoa has quit [Quit: khoa]
<yorickpeterse> whitequark: ping
<whitequark> pong
<yorickpeterse> So I'm dealing with parsing method parameters and bumped into this thing called a "more" parameters (https://gist.github.com/20646fe08510830b6c1c). Any idea what syntax is required for them?
<whitequark> oh
<yorickpeterse> parse.y isn't very helpful :?
<whitequark> the most expanded variant of syntax would be: def F(a=1, b=2, c, *d, e, &f)
<yorickpeterse> * :/
<yorickpeterse> hmm
<whitequark> note that you cannot use both a,b and *d
<whitequark> and e is what was called the "more" parameter there
<whitequark> i.e. a mandatory parameter after the rest argument
<yorickpeterse> Why exactly wouldn't this be stored in the required parameters in this case?
<yorickpeterse> since it is a required parameter
<whitequark> because nodes are placed in lexical order?
Leeky_afk is now known as Leeky
<whitequark> and the handling of it is indeed different from regular required parameters
<whitequark> i.e. c would be spliced from start of argument list, and e from the end
<whitequark> so whatever is receiving the parser state would need to know that too
aki__ has joined #ruby-lang
t91170 has quit [Remote host closed the connection]
t28914 has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
<yorickpeterse> hmm
<yorickpeterse> Thanks, that should get me going
<whitequark> you're welcome
<banisterfiend> whitequark: i wonder how difficult it would be to create a continuation on a parent stack frame, are you familiar with this part of internals?
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
wpaulson has joined #ruby-lang
x0F_ is now known as x0F
dhruvasagar has quit [Ping timeout: 244 seconds]
<whitequark> banisterfiend: I guess it won't be trivial. Continuations capture the entire stack at the point of creation, so you'd need to figure out how to partially unwind the stack
<banisterfiend> whitequark: i was thinking instead of capturing the entire stack, i could capture only from the nth parent
dhruvasagar has joined #ruby-lang
<banisterfiend> clealry i would need to copy/paste the callcc code and modify it
<banisterfiend> clearly*
<banisterfiend> i just wonder if there's any other considerations..
Guest19822 has quit [Read error: Operation timed out]
<whitequark> not call/cc, but this function
<whitequark> and, well, I guess that with some mucking with the internals you could achieve that
<banisterfiend> not necessarily too hard, i just wonder how many static function are involved..
<whitequark> the setjmp might pose a problem, because it captures the current %rsp which won't even nearly match the captured machine stack
<banisterfiend> probabl a lot of copy/pasting of header structs and so on too
<whitequark> but I'm not quite sure how is it restored
<banisterfiend> whitequark: basically i'm trying to recover from C-level exceptions, unfortunately we can only intercept C level exceptions after they've been raised, so i was thinking if we set a continuation on the paretn stack frame prior the raise, then u could fix the issue that caused the exception and then continue
cschneid has quit [Ping timeout: 246 seconds]
<banisterfiend> whitequark: maybe u can think of an easier way to achieve it ;)
<whitequark> well, you would definitely need to adjust the return address in your capture_parent_cont just to make it work
<whitequark> because continuation restoration is done through swapcontext
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<whitequark> and this is pretty evil and absolutely non-portable
<whitequark> i.e. x86-only, unless you're willing to test 10+ platforms, some of which don't even have an emulator
<whitequark> well, if you're _already_ doing that shit, just rewrite the first few bytes of rb_exc_raise with a jmp to your own handler
<whitequark> and then jump back
<whitequark> it's exported, so dlsym would find it
dous has quit [Ping timeout: 244 seconds]
<whitequark> this is WAY easier and is also trivially ported to any platform
<banisterfiend> whitequark: i was actually using LD_PRELOAD to overwrite rb_ex_raise with a shim
aki__ has quit [Ping timeout: 264 seconds]
<banisterfiend> that kind of worked
<whitequark> ah, forgot about LD_PRELOAD
<banisterfiend> but was a bit unreliable for reasons i never understood
<whitequark> multithreading?
<banisterfiend> i never figured it out, i would get a bunch of symbol not found errors, but it would still kind of work
<whitequark> well, what you're going to do with continuations is even less reliable
<whitequark> define "kind of work"
<banisterfiend> it would work on some exceptions but fail on others, and i'd always get a bunch of warnings/errors
<banisterfiend> when it failed it would usually segfault
<banisterfiend> whitequark: how do i do that jmp trick?
<banisterfiend> whitequark: like get a pointer to the functin and then writing a jmp into that address?
<banisterfiend> i've never really done that b4
robotmay has quit [Ping timeout: 264 seconds]
robotmay has joined #ruby-lang
<whitequark> banisterfiend: yes
<banisterfiend> whitequark: wow that sounds like fun :D and how do i save the previous function? memcpy it somehwere how do i know how big it is?
<whitequark> then you'd need to restore the original bytes and jump back
<whitequark> well, not the complete function
dgs|2 has quit [Ping timeout: 265 seconds]
<whitequark> just the 5/9 bytes which jmp occupies
dgs|2 has joined #ruby-lang
dgs|2 has quit [Read error: Operation timed out]
<whitequark> fortunately due to GIL, you don't need to care about multithreading
<whitequark> otherwise it'd be a nightmare
dgs|2 has joined #ruby-lang
<banisterfiend> whitequark: how do i save the previous function before i insert the jmp? is there a way to memcpy it?
<whitequark> you don't need to save the complete function, you only need to save whatever gets overwritten by jmp
<whitequark> and yes, function pointer is just like a regular pointer
<whitequark> memcpy(buf, rb_exc_raise_addr, 9);
<banisterfiend> how do u know it's 9 bytes?
<whitequark> the function isn't 9 bytes long
<whitequark> the jmp opcode is
<whitequark> (on x86_64, that is)
<whitequark> on x86, it's 5 bytes long
<banisterfiend> cool, but just for interest sake, is there a way to find out the size of a function?
<whitequark> depends on what do you call "function"
vlad_starkov has joined #ruby-lang
t28914 has quit [Remote host closed the connection]
<banisterfiend> say i wanted to find the size of rb_raise
<whitequark> generally no, because CPU does not know anything about functions, and they're not distinguished in the instruction set anyhow
t15705 has joined #ruby-lang
<whitequark> and "call" is just a "push %rip; jmp"
<whitequark> just as "ret" is "pop %rip"
<banisterfiend> whitequark: i guess i could iterate through it looking for a RET or something?
<banisterfiend> i mean the function epilogue
m3nd3s has joined #ruby-lang
<banisterfiend> pretty fun stuff
<whitequark> how do you know that if(x) { return }; won't translate to "cmp x, $0; jz next; ret; next: ..." ?
<whitequark> a compiler isn't required to write an epilogue
aki__ has joined #ruby-lang
<whitequark> an optimizing one might well choose to insert a ret inside a function
<banisterfiend> whitequark: do u have any sample code that does this i can take a look at for a start?
<banisterfiend> just something that inserts a jmp
robotmay_ has joined #ruby-lang
<whitequark> looks like no one does that assembler magic on Linux, instead opting for dlsym
<whitequark> you should really fix the LD_PRELOAD way, too
<whitequark> er, s,dlsym,LD_PRELOAD,
<whitequark> it's more sane and portable
robotmay has quit [Ping timeout: 264 seconds]
<banisterfiend> whitequark: well LD_PRELOAD is linux only, it's a bit different on osx for example
<banisterfiend> i was thinking the jmp approach would be easier
<whitequark> it isn't
<whitequark> as you can see, it just works for both PowerPC and X86
<whitequark> that's what is so cool about ld_preload
<banisterfiend> whitequark: hmm in osx i was using something like: INSERT_LIBRARY i think
<whitequark> well, the article states it's DYLD_INSERT_LIBRARIES
ivanoats has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
<banisterfiend> anyway, no big deal..
<banisterfiend> yeah
<whitequark> and you should really build the cext with the gem itself
<whitequark> and not on the first run
<whitequark> it's a bug waiting to happen
<whitequark> ok, bbl
iani has quit [Quit: iani]
havenn has joined #ruby-lang
<banisterfiend> whitequark: it's not a c ext
<banisterfiend> bbl too
ivanoats has quit [Ping timeout: 264 seconds]
burgestrand has joined #ruby-lang
Criztian has joined #ruby-lang
hackeron has quit [Ping timeout: 265 seconds]
celinedior has quit [Quit: celinedior]
stayarrr has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
cschneid has joined #ruby-lang
Jay_Levitt has quit [Quit: Jay_Levitt]
deryl has joined #ruby-lang
zmack has quit [Remote host closed the connection]
deryldoucette has joined #ruby-lang
saxy has joined #ruby-lang
t15705 has quit [Remote host closed the connection]
Musfuut has joined #ruby-lang
t9647 has joined #ruby-lang
justinmcp has joined #ruby-lang
deryl has quit [Ping timeout: 265 seconds]
deryldoucette is now known as deryl
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
saxy has quit [Ping timeout: 264 seconds]
jbsan has joined #ruby-lang
khoa has joined #ruby-lang
dgs has joined #ruby-lang
dgs|2 has quit [Ping timeout: 264 seconds]
runeb has quit [Remote host closed the connection]
runeb has joined #ruby-lang
bytephilia has joined #ruby-lang
jbsan has quit [Quit: jbsan]
m3nd3s has joined #ruby-lang
aki__ has quit [Read error: Connection reset by peer]
m3nd3s has quit [Read error: Connection reset by peer]
m3nd3s has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
dgs has quit [Ping timeout: 252 seconds]
m3nd3s_ has joined #ruby-lang
khoa has quit [Quit: khoa]
m3nd3s has quit [Ping timeout: 246 seconds]
jbsan has joined #ruby-lang
bytephilia has quit [Quit: Computer has gone to sleep.]
jbsan has quit [Client Quit]
m3nd3s_ has quit [Read error: Operation timed out]
bytephilia has joined #ruby-lang
zmack has joined #ruby-lang
dgs has joined #ruby-lang
m3nd3s has joined #ruby-lang
jbsan has joined #ruby-lang
ivanoats has joined #ruby-lang
rohit_rohit has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
bytephilia has quit [Client Quit]
rohit_rohit has quit [Remote host closed the connection]
gnufied has joined #ruby-lang
_rohit__ has joined #ruby-lang
jbsan has quit [Client Quit]
_rohit__ has quit [Client Quit]
d3vic3 has quit [Read error: Connection reset by peer]
jbsan has joined #ruby-lang
ivanoats has quit [Ping timeout: 246 seconds]
_rohit has joined #ruby-lang
ricardovaleriano has joined #ruby-lang
Guedes_out is now known as Guedes
rue_XIW has joined #ruby-lang
hemangpatel has joined #ruby-lang
<hemangpatel> Hello
<zzak> good morning!
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
<judofyr> morning zzak :)
rue|w has quit [Ping timeout: 264 seconds]
<judofyr> I feel like 20% if my contributions these days is saying good morning to zzak
m3nd3s has quit [Remote host closed the connection]
<matti> Hi judofyr
<bnagy> normal person: that means you should contribute more; me: you could improve your ratio by being ruder
<matti> Hi hi zzak
<judofyr> bnagy: fuck you
<matti> ;d
<matti> Hahah
<bnagy> lol
<judofyr> hey Mr. Matti
<matti> Teh love ;]
<matti> Hello there Sir
<injekt> :|
<matti> Oh dear.
<matti> Hi injekt
<matti> :)
<injekt> hi matti
<injekt> zzak, judofry, bnagy
<matti> Ruby community is a polite one. People greet each-other.
<bnagy> \o
<injekt> MINASWAN
<hemangpatel> is there any similarities between ruby & c ?
<judofyr> Minnesota is nice and so we are nice?
<hemangpatel> new in ruby
<injekt> judofyr: mom is nice and so we are nice
<injekt> close
<judofyr> ah
<injekt> hemangpatel: sure, there are lots of similarities between most programming languages. What are you looking for specifically?
<matti> hemangpatel: Ruby also uses memory and requires CPU time ;]
_rohit has quit [Quit: Leaving]
<matti> hemangpatel: There!
<matti> ;]
<hemangpatel> is ruby a general purpose lang ?
<matti> hemangpatel: Sure :)
<injekt> corundum: books?
<judofyr> hemangpatel: yes, but it's more high-level than C; you don't have much control over memory layout etc.
<corundum> books is "The Ruby Programming Language", "Eloquent Ruby", "Programming Ruby 1.9” (‘Pickaxe’) or see http://ruby-doc.org/bookstore/
<injekt> read the first few pages of any of them
<zzak> judofyr and an honorable contribution it is
<hemangpatel> So means its better than c ?
<judofyr> hemangpatel: it's different
<zzak> inkjet matti hi!
<judofyr> you wouldn't use Ruby to write hardware drivers
<injekt> lol better
<judofyr> you wouldn't use Ruby to write performance-critical code
<judofyr> I wouldn't use C to write web applications :)
<judofyr> I wouldn't use C for simple scripts
<injekt> pull up a chair
<hemangpatel> ok
m3nd3s has joined #ruby-lang
<judofyr> injekt: me too?
<injekt> judofyr: sure your legs might hurt after a while otherwise
* zzak pretends to sit, then just stands
* judofyr pulls up a chair
jbsan has quit [Quit: jbsan]
<gnufied> *sitting on bean bag here*
<injekt> hipster
<gnufied> a dot com office and writing rails and going to le mans next year
jbsan has joined #ruby-lang
<bnagy> was that supposed to evoke sympathy or jealousy? I'm honestly not sure...
dgs has quit [Ping timeout: 252 seconds]
<injekt> rails, must be the former
<judofyr> #lolrails
<matti> Hi gnufied
t9647 has quit [Remote host closed the connection]
<matti> gnufied: I think mailing John was a bad idea (TM) :)
<gnufied> hello matti.
t38861 has joined #ruby-lang
m3nd3s has quit []
<gnufied> no, I spoke with john so all is good. it is just that, things move slowly here
hemangpatel has left #ruby-lang ["Leaving"]
IPGlider has quit []
carloslopes has joined #ruby-lang
jbsan has quit [Quit: jbsan]
<whitequark> banisterfiend: it's a C extension, just not an MRI C extension
<whitequark> you aren't required to use extconf.rb just for building MRI exts
ricardovaleriano has quit [Remote host closed the connection]
jxie_ has quit [Quit: leaving]
jbsan has joined #ruby-lang
* zzak still waiting for inkjet to begin his talk
hackeron has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
<andrewvos> injekt is doing a talk?
<banisterfiend> whitequark: it'll have all teh build settings for an MRI C ext though
<banisterfiend> linking to libruby and so on, which i just dont need
<banisterfiend> unless i mess with the exconf.rb to spit out my own makefile
t38861 has quit [Remote host closed the connection]
laszlokorte_ has joined #ruby-lang
t79799 has joined #ruby-lang
<rking> andrewvos: Not IRL. A user said, "is X better than Y?" and injekt said, "Pull up a chair", as if to say such questions are nonsense to the point that it would require a lengthy explanation to get someone to stop asking them.
olivererxleben has joined #ruby-lang
stayarrr has quit [Ping timeout: 268 seconds]
<Defusal_> heftig, please let me know when you're around
<injekt> tehe rking
<injekt> i like you
laszlokorte has quit [Ping timeout: 268 seconds]
<andrewvos> rking: Ummm thanks :)
<heftig> Defusal_: hm?
sailias has joined #ruby-lang
Axsuul has quit [Ping timeout: 268 seconds]
<Defusal_> heftig, using SCHED_FIFO OR SCHED_RR with priority 90 or 99 is still allowing these processing to miss a small crucial time slice once in a while (very rarely, but it is noticable), any ideas why?
wyhaines has joined #ruby-lang
Jay_Levitt has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Jay_Levitt has quit [Client Quit]
judofyr has quit [Read error: Connection reset by peer]
<heftig> Defusal_: how are you measuring that?
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
judofyr has joined #ruby-lang
wyhaines has quit [Remote host closed the connection]
jbwiv has joined #ruby-lang
<Defusal_> heftig, i was up all night testing different configuration while creating load on the other services but cannot really reproduce the rare spikes that happen multiple times a day (on probably all the services) with SCHED_FIFO or SCHED_RR
<Defusal_> i personally have already noticed the spikes many times
<heftig> all spike at the same time?
<Defusal_> but i have also gotten complaints from many users
<Defusal_> no
<Defusal_> i don't think so
wyhaines has joined #ruby-lang
<Defusal_> i think they happen to different services at different times
<whitequark> banisterfiend: exactly like that
<heftig> are you sure the bottleneck isn't somewhere else?
<heftig> network, for example
<Defusal_> heftig, definitely not
mistym has quit [Remote host closed the connection]
<whitequark> File.open("Makefile", 'r') and so on
<Defusal_> heftig, the only thing i can think of is one of the other SCHED_FIFO/SCHED_RR services is using the timeslice and not giving it up to the services when they need it very rarely
<Defusal_> which is why i now tried changing it to SCHED_RR
<Defusal_> heftig, i see very short FPS drops on the services but it's when those drops become longer that they are noticable
dous has quit [Ping timeout: 245 seconds]
<Defusal_> i'm really not sure what to do about this
<heftig> SCHED_FIFO does not use timeslices
<Defusal_> but it is a major issuew
<Defusal_> issue*
<Defusal_> yeah, which is why i thought maybe at some point a number of services were using all available cores and not giving one up fast enough
totallymike has joined #ruby-lang
<Defusal_> which is why i changed it to SCHED_RR for today
hackeron has quit [Ping timeout: 240 seconds]
<Defusal_> otherwise i really can't understand what could cause this issue
<heftig> the problems disappear when you reduce the load?
<Defusal_> heftig, im pretty sure i've noticed it when load was minimal
beiter has joined #ruby-lang
<Defusal_> it just happens very rarely
ricardovaleriano has joined #ruby-lang
<heftig> my guess is it's not a scheduling issue
<heftig> otherwise it would get worse with higher load
<Defusal_> heftig, what could it be then?
<heftig> too many variables
<Defusal_> im can't be totally sure that it doesn't get worse at a higher load
<Defusal_> im just saying it still happens at a reasonably low load
<heftig> servers are badly programmed?
lcdhoffman has joined #ruby-lang
<Defusal_> possible, but doubtful, i don't think anyone has experienced any such issue on any other providers servers
<Defusal_> i will confirm shortly
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
t79799 has quit [Remote host closed the connection]
t49014 has joined #ruby-lang
bytephilia has joined #ruby-lang
dejongge has joined #ruby-lang
burgestrand1 has joined #ruby-lang
solars has quit [Ping timeout: 246 seconds]
Virunga has quit [Read error: Connection reset by peer]
Kero has quit [Ping timeout: 246 seconds]
Kero has joined #ruby-lang
burgestrand has quit [Ping timeout: 268 seconds]
ivanoats has quit [Ping timeout: 246 seconds]
havenn has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
havenn has joined #ruby-lang
sandbags has quit [Remote host closed the connection]
lcdhoffman has quit [Quit: lcdhoffman]
totallymike has quit [Quit: WeeChat 0.3.7]
m3nd3s has joined #ruby-lang
yats has quit [Read error: Connection reset by peer]
yats has joined #ruby-lang
voker57 has quit [Read error: Connection reset by peer]
havenn has quit [Ping timeout: 244 seconds]
sailias has quit [Ping timeout: 244 seconds]
t49014 has quit [Remote host closed the connection]
t40437 has joined #ruby-lang
solars has joined #ruby-lang
My_Hearing has joined #ruby-lang
burgestrand1 is now known as burgestrand
ricardovaleriano has quit [Remote host closed the connection]
Jay_Levitt has joined #ruby-lang
stardiviner has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 264 seconds]
rue_XIW has quit [Remote host closed the connection]
enroxorz-work has joined #ruby-lang
enroxorz-work has quit [Changing host]
enroxorz-work has joined #ruby-lang
My_Hearing is now known as Mon_Ouie
rue|w has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 245 seconds]
<Defusal_> heftig, yeah theres definitely still small spikes when at minimal load
<mfn> I just fired up "binding.pry" in the middle of my problem app, I see the nicely colored source. How do I proceed, i.e. "execute next command" or line or whatever? Looked at the output of "help" and it didn't came to me ...
<judofyr> mfn: ^D
<judofyr> Ctrl-D
<mfn> then I leasve the session and it continues; but I only want it to executed the next command/function/step/method ...
<banisterfiend> mfn: you want to move to the next line ?
<mfn> banisterfiend: using it for debugging; I put bindung.pry where I want to jump in and then step through my app, inspecting objects, etc.
<banisterfiend> mfn: you need the pry-debugger plugin
<mfn> ops
<judofyr> mfn: there's a plugin for that! :)
<banisterfiend> then you get break/next/step/continue/
rue|w has quit [Remote host closed the connection]
<mfn> thanks, installing right now. weird, I thought this was always part of pry; were there earlier version already including the debugger stuff? because I could swear I've used pry a long time ago with this out of the box. but maybe I just get old
rue|w has joined #ruby-lang
<judofyr> mfn: I have that feeling all the time
t40437 has quit [Remote host closed the connection]
t48295 has joined #ruby-lang
<banisterfiend> mfn: naw, we dont include that by default because we wanted the core of pry to work on all implementations, but debugging stuff (next/step/up/down) is kind of implementation dependent
<banisterfiend> hopefully we'll bake it in after we write versions of pry-debugger for each of the major implementations
<banisterfiend> but t's a lot of work
<mfn> I see. time to donate :) I love pry
<banisterfiend> mfn: if u want to have some fun, check out https://github.com/conradirwin/pry-rescue
<banisterfiend> it's a pretty nifty wee plugin that can get to the heart of a number of debugging issues
<mfn> Is this legit: http://pledgie.com/campaigns/15899/pledge/confirm ? So I don't pledge to some imposter
<banisterfiend> yep!
<banisterfiend> thanks :)
mistym has quit [Remote host closed the connection]
beiter has quit [Quit: beiter]
s1n4 has joined #ruby-lang
vig has joined #ruby-lang
s1n4 has quit [Client Quit]
codewrangler has joined #ruby-lang
<banisterfiend> mfn: i hope u're no on 1.8, if u r, u'll need to install ruby18_source_location too
<banisterfiend> not*
vig has left #ruby-lang [#ruby-lang]
Leeky is now known as Leeky_afk
fgomez has quit [Ping timeout: 244 seconds]
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
<mfn> 1.9.3 all the latest, no problem here
Leeky_afk is now known as Leeky
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
m3nd3s has quit [Ping timeout: 264 seconds]
ivanoats has quit [Ping timeout: 260 seconds]
Paul-Atreides has joined #ruby-lang
Paul-Atreides has quit [Changing host]
Paul-Atreides has joined #ruby-lang
rwilcox has joined #ruby-lang
saxy has joined #ruby-lang
enroxorz-work has quit [Read error: Connection reset by peer]
saxy has quit [Remote host closed the connection]
burgestrand1 has joined #ruby-lang
rippa has joined #ruby-lang
t48295 has quit [Remote host closed the connection]
t99256 has joined #ruby-lang
burgestrand has quit [Ping timeout: 265 seconds]
m3nd3s has joined #ruby-lang
m3nd3s_ has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
bytephilia has quit [Quit: Computer has gone to sleep.]
Hakon has quit [Read error: Connection reset by peer]
fgomez has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
workmad3_ has joined #ruby-lang
m3nd3s has quit [Ping timeout: 264 seconds]
workmad3 has quit [Disconnected by services]
workmad3_ is now known as workmad3
burgestrand1 has quit [Quit: Leaving.]
fgomez has quit [Ping timeout: 245 seconds]
tjadc has joined #ruby-lang
saxy has joined #ruby-lang
yats has quit [Read error: Connection reset by peer]
saxy has quit [Remote host closed the connection]
yats has joined #ruby-lang
t99256 has quit [Remote host closed the connection]
t44786 has joined #ruby-lang
rins has quit [Quit: leaving]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
sailias has joined #ruby-lang
yxhuvud has joined #ruby-lang
kvirani has joined #ruby-lang
burgestrand has joined #ruby-lang
olivererxleben has quit [Quit: Linkinus - http://linkinus.com]
foucist has left #ruby-lang [#ruby-lang]
bryancp has joined #ruby-lang
fgomez has joined #ruby-lang
Catnaroek has joined #ruby-lang
t44786 has quit [Remote host closed the connection]
t93536 has joined #ruby-lang
ricardovaleriano has joined #ruby-lang
fgomez has quit [Ping timeout: 264 seconds]
neocoin has joined #ruby-lang
hackeron has joined #ruby-lang
Catnaroek has quit [Ping timeout: 245 seconds]
Catnaroek has joined #ruby-lang
goshakkk has joined #ruby-lang
sailias has quit [Ping timeout: 245 seconds]
burgestrand has quit [Read error: Connection reset by peer]
burgestrand1 has joined #ruby-lang
Catnaroek has quit [Ping timeout: 245 seconds]
m3nd3s_ has quit [Remote host closed the connection]
yankov has joined #ruby-lang
tjadc has quit [Ping timeout: 245 seconds]
rue|w has quit [Remote host closed the connection]
rins has joined #ruby-lang
lcdhoffman has joined #ruby-lang
burgestrand1 has quit [Quit: Leaving.]
Criztian has quit [Remote host closed the connection]
burgestrand has joined #ruby-lang
dous has quit [Ping timeout: 264 seconds]
sailias has joined #ruby-lang
s1n4 has joined #ruby-lang
Weems has quit [Ping timeout: 245 seconds]
jbsan has quit [Quit: jbsan]
t93536 has quit [Remote host closed the connection]
naz has joined #ruby-lang
t4743 has joined #ruby-lang
savage- has quit [Remote host closed the connection]
diegoviola has joined #ruby-lang
goshakkk has quit [Quit: Computer has gone to sleep.]
goshakkk has joined #ruby-lang
Weems has joined #ruby-lang
Weems has joined #ruby-lang
Weems has quit [Changing host]
Leeky has quit [Quit: ZNC - http://znc.in]
Hivan has joined #ruby-lang
Hivan has left #ruby-lang [#ruby-lang]
<steveklabnik> zenspider: I ended up making the lazy stuff work. it was annoying because of over-mocking, so I moved to integration... but it works now.
<steveklabnik> zenspider: thanks
qwerxy has quit [Ping timeout: 244 seconds]
qwerxy has joined #ruby-lang
<judofyr> I always mock my mocks, y'know, just to be sure
|Vargas| has quit [Quit: ...]
<steveklabnik> :p
runeb has quit [Remote host closed the connection]
gloomer has quit [Ping timeout: 245 seconds]
<judofyr> steveklabnik: how's life these day? when did you start joining IRC again btw?
<steveklabnik> writing your own fake actionpack: i dont agree with it
<steveklabnik> life's good!
<steveklabnik> about two weeks ago ish
<steveklabnik> still going to waay too many conferences
burgestrand has quit [Quit: Leaving.]
s1n4 has quit [Quit: leaving]
<steveklabnik> still teaching with jumpstart
<steveklabnik> i moved to hollywood
<steveklabnik> that's new.
<judofyr> oo
<judofyr> nice
<judofyr> steveklabnik: care to comment why?
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<judofyr> also, what do you think about http://erector.rubyforge.org/ ?
carloslopes has quit [Quit: Leaving.]
<steveklabnik> why what?
<judofyr> 17:08 steveklabnik: writing your own fake actionpack: i dont agree with it
<steveklabnik> ah
<steveklabnik> because then you write code that should work, but doesn't. because you're lying.
<steveklabnik> as for erector
<steveklabnik> i dunno
<steveklabnik> it seems okay i guess, if you want ruby views
<judofyr> wat? lying? :S
<judofyr> oh, I think I see your point
<judofyr> well, you just have to stop thinking about the view as something that belongs to the request/response
<judofyr> makes it easier for scaling too (e.g. Reddit always precomputes views outside the req/res-cycle)
solars has quit [Ping timeout: 244 seconds]
<judofyr> but anyway, I don't really care about this idea; it's working for me :)
<zzak> steveklabnik: hollywood eh? another east-coaster gone :(
fgomez has joined #ruby-lang
<steveklabnik> it's more that i think that dumb templates + view model matches how i think about the point better
<steveklabnik> s/point/problem
rolfb has joined #ruby-lang
<steveklabnik> zzak: hey! just treat it like when you dissapeared for a year :p
<mfn> I use Nokogiri and find three methods for Nodes which, in one case for me, seem to do the same: #content, #text, #inner_text . All of them return me plain text (no HTML) of the node; is there supposed to be a difference?
nXqd has quit [Ping timeout: 244 seconds]
L0rdShrek has joined #ruby-lang
<zzak> ouch
wmoxam has joined #ruby-lang
wmoxam has quit [Changing host]
wmoxam has joined #ruby-lang
<zzak> steveklabnik: its good to be back, glad youre on irc again too
bfreeman has quit [Quit: bfreeman]
m3nd3s has joined #ruby-lang
king_warr has joined #ruby-lang
t4743 has quit [Remote host closed the connection]
lsegal has joined #ruby-lang
t54881 has joined #ruby-lang
savage- has joined #ruby-lang
goshakkk has quit [Ping timeout: 244 seconds]
king_warr has left #ruby-lang [#ruby-lang]
kain has joined #ruby-lang
jxie has joined #ruby-lang
ap433d has joined #ruby-lang
goshakkk has joined #ruby-lang
kain has quit [Client Quit]
kain has joined #ruby-lang
<steveklabnik> <3
kain has quit [Remote host closed the connection]
g0bl1n has joined #ruby-lang
saxy has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
kain has joined #ruby-lang
kain has quit [Remote host closed the connection]
kain has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
fgomez has quit [Quit: Lost terminal]
zmack has quit [Remote host closed the connection]
gnufied has quit [Quit: Leaving.]
gsav has joined #ruby-lang
<rolfb> any recommendations on a well executed code blog?
ap433d has quit [Remote host closed the connection]
erichmenge has joined #ruby-lang
alvaro_o has joined #ruby-lang
gnufied has joined #ruby-lang
justinmcp has quit [Remote host closed the connection]
<ivanoats> anyone know what format of file this is and how to parse it? https://gist.github.com/3514681
<steveklabnik> ivanoats: yaml
<ivanoats> It's from a Rails app called Instructure Canvas - a learning management system
<steveklabnik> i think
<ivanoats> i thought so too but YAML.parse didn't seem to get it, I can post output of that too
<steveklabnik> yeah, one or two bits look slightly strange
CarlB_the_great has joined #ruby-lang
<judofyr> seems pretty YAML to me
<judofyr> no problems parsing it here
Leeky_afk has joined #ruby-lang
Paul-Atreides is now known as enroxorz
<judofyr> 1.9.3 + Psych
fgomez has joined #ruby-lang
<judofyr> ivanoats: are you on 1.8.7?
<manveru> encoding issue?
<ivanoats> this app, yes. generally no. I'm trying to recover some data right from the DB
<ivanoats> can't get the old version of the app to run. and my rails course quizzes are stuck in it :( I had a backup but should have done a course export
<ivanoats> oh, there's an #canvas-lms channel. I should just ask there
<ivanoats> thanks all
<manveru> oO
<manveru> i'm sure this is making some sense to somebody, but ivanoats sounds like a markov chain to me :(
tonni has quit [Remote host closed the connection]
* ivanoats changes state
<steveklabnik> ...makes sense to me.
<manveru> see :)
elux has joined #ruby-lang
<judofyr> ...makes state to me.
* ivanoats processes my Bernoullis
Leeky_afk is now known as Leeky
totallymike has joined #ruby-lang
fgomez has quit [Ping timeout: 256 seconds]
NemesisD has joined #ruby-lang
robotmay_ has quit [Remote host closed the connection]
qwerxy has quit [Ping timeout: 244 seconds]
fgomez has joined #ruby-lang
<NemesisD> hi all. i noticed when running bundle install that a native library fails to compile. it can't find libmpc.so.2, it turns out i have libmpc.so.3. is there something to be done to make it use the correct library? i'm guessing symlinking is a bad idea
qwerxy has joined #ruby-lang
<darix> NemesisD: check where the symlink for libmpc.so points
<darix> normally linking is done via the unversioned symlink
<NemesisD> darix: it was pointing to libmpc.3.0.0
t54881 has quit [Remote host closed the connection]
<darix> can you copy paste the exact error message to paste site?
t13853 has joined #ruby-lang
<NemesisD> darix: http://pastie.org/4611071
<NemesisD> it would seem like it went directly for libmpc.so.2, i made a symlink libmpc.so.2 <- libmpc.so.3 and i was able to install the gem successfully, though it makes me uneasy for obvious reasons
<darix> ldd /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/cc1
lsegal has quit [Ping timeout: 240 seconds]
<darix> the error message seems to come from your cc1 binary
lcdhoffman has quit [Quit: lcdhoffman]
<darix> if that is true you updated the library without rebuilding/upgrade your compiler too
<NemesisD> darix: updated http://pastie.org/4611071
<darix> so yeah
<darix> your cc1 binary from gcc doesnt match the libmpc you got installed
<darix> what distro/os are you on?
CarlB_the_great has quit [Remote host closed the connection]
saxy has quit [Remote host closed the connection]
<NemesisD> darix: archlinux. and it looks like i might have a version of gcc that i have to manually update
<darix> there you go
<NemesisD> which i now can't find in the package repos -_-
<NemesisD> i think ree was unable to compile on gcc 4.7 or something
<judofyr> ah, the pleasures of arch
<judofyr> it's a beautify distro
<judofyr> wtf? "beautify"?
<judofyr> beautiful*
<NemesisD> it usually is until they bone you on some libc version or insist to use python3 by default
<darix> NemesisD: normal ruby 1.8.7 works fine with gcc 4.7
ivanoats has quit [Remote host closed the connection]
gloomer has joined #ruby-lang
gloomer has quit [Client Quit]
ap433d has joined #ruby-lang
<NemesisD> darix: unfortunately our app is targeted at ree
mrsolo has joined #ruby-lang
<NemesisD> didn't look to much into what the problem was tbh
erichmenge has quit [Quit: Be back later]
s1n4 has joined #ruby-lang
fgomez has quit [Ping timeout: 268 seconds]
ivanoats has joined #ruby-lang
kvirani has quit [Remote host closed the connection]
bfreeman has joined #ruby-lang
jstemmer has quit [Quit: leaving]
macmartine has joined #ruby-lang
cdt has quit [Quit: Ex-Chat]
sepp2k1 has joined #ruby-lang
sepp2k has quit [Ping timeout: 264 seconds]
chimkan_ has joined #ruby-lang
judofyr has quit [Remote host closed the connection]
alex_kira has quit [Remote host closed the connection]
alex_kira has joined #ruby-lang
fgomez has joined #ruby-lang
alex_kir_ has joined #ruby-lang
alex_kir_ has quit [Remote host closed the connection]
alex_kir_ has joined #ruby-lang
yankov has quit [Quit: yankov]
lightcap has quit [Quit: Computer has gone to sleep.]
Leeky has quit [Quit: ZNC - http://znc.in]
alex_kira has quit [Ping timeout: 265 seconds]
gnufied has quit [Quit: Leaving.]
Leeky has joined #ruby-lang
gnufied has joined #ruby-lang
Leeky is now known as Leeky_afk
Leeky_afk is now known as Leeky
fgomez has quit [Ping timeout: 240 seconds]
lcdhoffman has joined #ruby-lang
fgomez has joined #ruby-lang
saxy has joined #ruby-lang
Criztian has joined #ruby-lang
mksm has quit [Read error: Operation timed out]
mksm has joined #ruby-lang
mksm is now known as Guest41231
towski has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
ghanima has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
Austin__ has joined #ruby-lang
yankov has joined #ruby-lang
runeb has joined #ruby-lang
Carnage\ has joined #ruby-lang
Leeky is now known as Leeky_afk
Leeky_afk is now known as Leeky
laszlokorte_ has quit [Ping timeout: 244 seconds]
s1n4 has quit [Quit: leaving]
Leeky is now known as Leeky_afk
carloslopes has joined #ruby-lang
runeb has quit [Ping timeout: 264 seconds]
areil has quit [Remote host closed the connection]
CapnKernul has joined #ruby-lang
jbsan has joined #ruby-lang
havenn has joined #ruby-lang
Austin__ has quit [Quit: Leaving.]
t13853 has quit [Remote host closed the connection]
t27415 has joined #ruby-lang
rolfb has quit [Quit: Linkinus - http://linkinus.com]
saxy has quit [Remote host closed the connection]
saxy has joined #ruby-lang
nXqd has joined #ruby-lang
jbsan has quit [Quit: jbsan]
jbsan has joined #ruby-lang
yats has quit [Ping timeout: 246 seconds]
RegEchse has joined #ruby-lang
brianpWins has joined #ruby-lang
qpingu has joined #ruby-lang
xr1rr has joined #ruby-lang
erichmenge has joined #ruby-lang
xr1rr has left #ruby-lang [#ruby-lang]
alex_kir_ has quit [Ping timeout: 240 seconds]
CapnKernul has quit [Quit: Leaving...]
<zzak> people who use 4 space tabs
* erikh does
<zzak> in C or Ruby, or both?
macmartine has quit [Quit: Computer has gone to sleep.]
dejongge has quit [Read error: Connection timed out]
<zzak> its only annoying when whitespace is significant, like haml
kvirani has joined #ruby-lang
<matti> erikh: 4?
<matti> ;<
goshakkk has quit [Quit: Computer has gone to sleep.]
<eam> I use 4 as well
<matti> Bad, bad 4 spaces people.
<matti> ;]
<eam> you're lucky I don't use 8 >:)
<matti> Haha
<eam> except for the tabs part (unless it's actually for the kernel, in which case, sigh)
<matti> +1
workmad3_ has joined #ruby-lang
macmartine has joined #ruby-lang
alex_kira has joined #ruby-lang
chimkan_ has quit [Ping timeout: 256 seconds]
runeb has joined #ruby-lang
workmad3 has quit [Ping timeout: 240 seconds]
CapnKernul has joined #ruby-lang
laszlokorte has joined #ruby-lang
runeb has quit [Ping timeout: 245 seconds]
toretore has quit [Quit: This computer has gone to sleep]
<yorickpeterse> Everybody knows the real deal is 1 tab + 2 spaces
<erikh> f that, 3 spaces
<matti> 2.5
<matti> Lets settle
<matti> ;d
chimkan_ has joined #ruby-lang
* zzak starts a riot
t27415 has quit [Remote host closed the connection]
t28068 has joined #ruby-lang
<matti> Haha
<matti> zzak: "Occupy #ruby-lang"? ;]
goshakkk has joined #ruby-lang
CapnKernul has quit [Quit: Linkinus - http://linkinus.com]
workmad3_ has quit [Ping timeout: 260 seconds]
<zzak> si
<matti> I see a space for a tent just ... there ->
<matti> ;]
RickHull has joined #ruby-lang
<zzak> drbrain: need to get racc added to ext/.document whenever you merge those changes over
havenn has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 244 seconds]
adambeynon has quit [Quit: Computer has gone to sleep.]
havenn has joined #ruby-lang
ar__ has joined #ruby-lang
wallerdev has joined #ruby-lang
dejongge has joined #ruby-lang
havenn has quit [Ping timeout: 244 seconds]
rippa has joined #ruby-lang
goshakkk has quit [Quit: Computer has gone to sleep.]
krz has joined #ruby-lang
qwerxy has quit [Ping timeout: 244 seconds]
bfreeman has quit [Read error: Connection reset by peer]
bfreeman has joined #ruby-lang
burgestrand has joined #ruby-lang
AlHafoudh has joined #ruby-lang
jaylevitt has joined #ruby-lang
Jay_Levitt has quit [Ping timeout: 245 seconds]
yxhuvud has quit [Ping timeout: 245 seconds]
lightcap has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
Leeky_afk is now known as Leeky
lightcap has quit [Quit: Computer has gone to sleep.]
deryl has quit [Quit: deryl]
hhatch has joined #ruby-lang
butchanton has joined #ruby-lang
havenn has joined #ruby-lang
Leeky is now known as Leeky_afk
ivanoats has quit [Remote host closed the connection]
jaylevitt has quit [Quit: jaylevitt]
Jay_Levitt has joined #ruby-lang
Jay_Levitt has quit [Remote host closed the connection]
ap433d has quit [Remote host closed the connection]
ar__ has quit [Quit: Leaving]
totallymike has quit [Quit: WeeChat 0.3.7]
lcdhoffman has quit [Quit: lcdhoffman]
Jay_Levitt has joined #ruby-lang
butchanton has quit [Quit: Leaving.]
macmartine has quit [Quit: Computer has gone to sleep.]
hkhalid has joined #ruby-lang
m3nd3s has joined #ruby-lang
machuga has joined #ruby-lang
<hkhalid> hello
burgestrand has quit [Quit: Leaving.]
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
macmartine has joined #ruby-lang
havenn has quit [Remote host closed the connection]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
t28068 has quit [Remote host closed the connection]
t75323 has joined #ruby-lang
<matti> Hi hkhalid
sailias has quit [Ping timeout: 244 seconds]
malev has joined #ruby-lang
postmodern has joined #ruby-lang
kvirani has quit [Remote host closed the connection]
goshakkk has joined #ruby-lang
havenn has joined #ruby-lang
Axsuul has joined #ruby-lang
ddfreyne has quit [Excess Flood]
ddfreyne has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
sailias has joined #ruby-lang
erichmenge has quit [Quit: Be back later]
tbuehlmann has quit [Remote host closed the connection]
tjadc has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
ddfreyne has quit [Excess Flood]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
workmad3 has joined #ruby-lang
t75323 has quit [Remote host closed the connection]
deryl has joined #ruby-lang
t39517 has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
ddfreyne has joined #ruby-lang
gsav has joined #ruby-lang
nXqd has quit [Ping timeout: 268 seconds]
ivanoats has quit [Ping timeout: 265 seconds]
titaniumNoob has joined #ruby-lang
esad has joined #ruby-lang
ap433d has joined #ruby-lang
chendo_ is now known as chendo
qwerxy has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
lightcap has joined #ruby-lang
havenn has quit [Remote host closed the connection]
Austin__ has joined #ruby-lang
rippa has quit [Ping timeout: 268 seconds]
ap433d is now known as tenderlove
krz has quit [Quit: krz]
krz has joined #ruby-lang
dejongge has quit [Read error: Connection timed out]
malev has quit [Ping timeout: 264 seconds]
erichmenge has joined #ruby-lang
sailias has quit []
lightcap has quit [Quit: Computer has gone to sleep.]
ivanoats has quit [Remote host closed the connection]
t39517 has quit [Remote host closed the connection]
t39201 has joined #ruby-lang
ivanoats has joined #ruby-lang
mojo_pojo has joined #ruby-lang
enroxorz has quit [Quit: Leaving]
bytephilia has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
tonni has joined #ruby-lang
PythonGirl has joined #ruby-lang
ivanoats has quit [Ping timeout: 244 seconds]
neocoin has quit [Remote host closed the connection]
Leeky_afk is now known as Leeky
wallerdev has joined #ruby-lang
burgestrand has joined #ruby-lang
hhatch has quit [Quit: leaving]
titaniumNoob has quit [Remote host closed the connection]
havenn has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
benanne has joined #ruby-lang
t39201 has quit [Remote host closed the connection]
cantonic has joined #ruby-lang
Leeky is now known as Leeky_afk
t94607 has joined #ruby-lang
sepp2k1 has quit [Remote host closed the connection]
PythonGirl has quit [Quit: PythonGirl]
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
Virunga has joined #ruby-lang
banaan has joined #ruby-lang
loincloth has joined #ruby-lang
<loincloth> hey all
<loincloth> anyone using mocha in rails 3?
<matti> Hey. For Rails go to #rubyonrails ;]
<loincloth> no thanks
<loincloth> how about for mocha?
<loincloth> room for that?
benanne has quit [Ping timeout: 272 seconds]
<loincloth> or maybe it's all ruby and you can chill
<loincloth> cheers
Criztian has quit [Remote host closed the connection]
<steveklabnik> loincloth: i dont, but i know there has been an issue or two
<matti> loincloth: I am OK with you asking about anything :)
<loincloth> steveklabnik: hey sir, always a pleasure.. yeah.. issues i gots.. boourns
<matti> loincloth: But we've had isses with hard-core Rails guys ;]
<steveklabnik> loincloth: anything specific?
<loincloth> i am just a guy saddled with a rails app that has a need to stubbb
<matti> :)
<loincloth> i have a simple test with two cases.. i want to stub a class method in one.. it exhibits the stubbed behavior in both cases
<steveklabnik> (i personally use rspec-mocks, even when i dont use rspec.)
<loincloth> well, i am perusing alternatives.. i like mochas concise syntax, but i like things that work more
m3nd3s has quit [Remote host closed the connection]
tjadc has quit [Ping timeout: 256 seconds]
<steveklabnik> :)
<loincloth> maybe what i need to do is use expectations.. and specify any number of calls being ok
toretore has joined #ruby-lang
<steveklabnik> i can confirm that rspec-mocks works exceedingly well with rails :)
<steveklabnik> sure.
RickHull has left #ruby-lang [#ruby-lang]
<steveklabnik> for future refernece, when you dont have an app that's already using mocha
s0ber has quit [Read error: Connection reset by peer]
dejongge has joined #ruby-lang
s0ber has joined #ruby-lang
erichmenge has quit [Quit: Be back later]
<loincloth> steveklabnik: werd, thx
<loincloth> well boo.. expects().at_least_once behaving the same as stubs() it seems
<loincloth> lame town
qwerxy has quit [Quit: offski]
<loincloth> i have never used mocha's unstub() but apparently it's a thing.. and it does the trick
mojo_pojo has quit [Ping timeout: 264 seconds]
<loincloth> Klass.stubs(:foo); ...do stuff...; Klass.unstub(:foo)
Guedes is now known as Guest26352
hkhalidh has joined #ruby-lang
hkhalid has quit [Read error: Connection reset by peer]
alex_kira has quit [Remote host closed the connection]
ivanoats has quit [Ping timeout: 246 seconds]
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<steveklabnik> huh
<steveklabnik> odd
* steveklabnik shrugs
<steveklabnik> at least it works
carloslopes has quit [Quit: Leaving.]
Austin__ has left #ruby-lang [#ruby-lang]
sailias has joined #ruby-lang
elux has quit [Quit: Bye!]
bytephilia has quit [Quit: Computer has gone to sleep.]
alex_kira has joined #ruby-lang
qwerxy has joined #ruby-lang
kith has quit [Ping timeout: 252 seconds]
MrPunkin has joined #ruby-lang
<MrPunkin> is there a way to execute a shell command from ruby using the current shell that the ruby script is running within?
<MrPunkin> or is it all within subshells?
qwerxy has quit [Client Quit]
sailias has quit [Ping timeout: 264 seconds]
t94607 has quit [Remote host closed the connection]
t18818 has joined #ruby-lang
<andrewvos> MrPunkin: ^^
ricardovaleriano has quit [Remote host closed the connection]
ricardovaleriano has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
qwerxy has joined #ruby-lang
lcdhoffman has joined #ruby-lang
banisterfiend has quit [Ping timeout: 246 seconds]
banisterfiend has joined #ruby-lang
ricardovaleriano has quit [Ping timeout: 245 seconds]
<MrPunkin> andrewvos: right, but do any of those run as bash, vs just sh?
hkhalidh has quit []
naz has quit [Ping timeout: 252 seconds]
rue_XIV has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
saxy has quit [Remote host closed the connection]
malev has joined #ruby-lang
rue has quit [Ping timeout: 256 seconds]
<eam> MrPunkin: you can chose your shell by saying system "/bin/sh", "-c", yourcmd
<eam> there is no "current shell" though
<eam> ruby doesn't run within a shell
<eam> MrPunkin: can you describe your end goal in a bit more detail?
<MrPunkin> eam: trying to get STDOUT from passenger-status within a ruby script to send data to collectd
<MrPunkin> but have RVM installed, and passenger-status needs to run within the bash environment and using rvmsudo apparently
AlHafoudh has quit [Quit: Computer has gone to sleep.]
<eam> ok. It sounds like you want to invoke the standard shell of the user who ran the script, and you want to invoke a login shell (parsing the dotfiles where RVM environment is set)
<eam> is that accurate?
wmoxam has quit [Ping timeout: 268 seconds]
CoverSlide has quit [Ping timeout: 252 seconds]
<eam> MrPunkin: in this case ENV["SHELL"] most likely has the shell you want
<eam> and if not, Etc.getpwnam(ENV["USER"]).shell
qwerxy has quit [Quit: offski]
<MrPunkin> eam: yes, needs to be a bash shell
mistym has quit [Remote host closed the connection]
<eam> MrPunkin: then, you probably want to run something like: system user_shell, "-i", "-c", command_string
<eam> you can just run the shell you want
<MrPunkin> yeah. I need to capture STDOUT so I've been using the back tick method, but it isn't working properly.
<MrPunkin> `bash -c 'source /usr/local/rvm/scripts/rvm ; rvmsudo passenger-status'`
<eam> yeah, so this is a shortcoming of ruby's backtick operator. You need to use the popen calls instead, which andrewvos linked above
<MrPunkin> ah okay
<MrPunkin> I'll try it with popen
<eam> `` is guaranteed to use /bin/sh btw
<MrPunkin> aha
<eam> on linux that's bash, but when run as /bin/sh it runs in sh compat mode
kith has joined #ruby-lang
havenn has quit [Remote host closed the connection]
tenderlove has quit [Remote host closed the connection]
lightcap has joined #ruby-lang
t18818 has quit [Remote host closed the connection]
t48487 has joined #ruby-lang
Jay_Levitt has quit [Ping timeout: 245 seconds]
banisterfiend has quit [Remote host closed the connection]
dejongge has quit [Ping timeout: 256 seconds]
voker57 has quit [Read error: Connection reset by peer]
PythonGirl has joined #ruby-lang
PythonGirl has quit [Client Quit]
RomyRomy has joined #ruby-lang
tenderlove has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
countdigi has quit [Quit: Lost terminal]
countdigi has joined #ruby-lang
havenn has joined #ruby-lang
banaan has quit [Quit: kbai]
toretore has quit [Ping timeout: 260 seconds]
stardiviner has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
seanstickle has joined #ruby-lang
macmartine has joined #ruby-lang
<MrPunkin> whats the most efficient way to access the last line of a multiline string?
saxy has joined #ruby-lang
<bougyman> what is a line?
<countdigi> do you mean a string w/ \n characters?
<bougyman> irb(main):007:0> text = File.read("/etc/rc.sysinit");text.lines.entries.last
<bougyman> => "# vim: set ts=2 sw=2 noet:\n"
<bougyman> i don't think that's very efficient.
<bougyman> but it processes what you'd normally think of as 'lines' in a file fairly well.
<drbrain> what's .lines.entries about?
<bougyman> text.lines is an enumerator
<havenn> MrPunkin: Regex?: http://rubular.com/r/ucDxLtm6CE
<drbrain> File.readlines(name).last
<bougyman> drbrain: yes, but if it's already text you can't File.readlines it
<bougyman> more like: irb(main):008:0> "aoiudfudasf\nasoidufasjdfads\n".lines.entries.last
<bougyman> => "asoidufasjdfads\n"
<drbrain> [/(.*)\Z/, 1]
t48487 has quit [Remote host closed the connection]
<drbrain> rather, string[/(.*)\Z/, 1]
t81309 has joined #ruby-lang
Leeky_afk is now known as Leeky
qpingu has quit [Quit: Leaving.]
<drbrain> lines.entries.last creates too much garbage
<eam> worth pointing out that optimizing for speed is different than optimizing for readability
qpingu has joined #ruby-lang
<eam> do the latter until the former is shown to matter
BigFatFatty has joined #ruby-lang
<bougyman> i mentioned the inefficiency. regex is a fairly heavy thing, too.
<bougyman> of coure #lines may be using regex, too.
Carnage\ has quit []
goshakkk has quit [Quit: Computer has gone to sleep.]
qwerxy has joined #ruby-lang
<drbrain> using lines.entries.last is reaching through too many objects, a Demeter violation
RomyRomy has quit [Quit: RomyRomy]
<MrPunkin> I ended up simply using regex
<MrPunkin> thanks though
<MrPunkin> still can't seem to get what I need even with IO.popen… can't initialize my RVM shell within my bash -c call… something is happening
Leeky is now known as Leeky_afk
loincloth has quit [Remote host closed the connection]
<havenn> MrPunkin: I'm benchmarking #split("\n").reverse_each.first as faster than regex. >.> https://gist.github.com/3519999
<eam> drbrain: not sure that's applicable to primitives (or what qualifies as them in ruby)
<eam> hard to say any object shouldn't access Array
bfreeman has quit [Quit: bfreeman]
<drbrain> eam: I didn't say that
<eam> am I misunderstanding the meaning of Demeter violation?
<drbrain> getting the last line by asking for the string's line enumerator's array's last element is definitely a violation
<MrPunkin> havenn: thanks. This is on an interval run to simply read output of a shell script so I'm not THAT into how long it takes but may switch it up anyways.
<eam> yeah, I don't think that applies to fundamental classes
<drbrain> that's too many collaborators in your method that does other stuff
<drbrain> it's fine to put that somewhere else and say invoke last_line(string)
vlad_starkov has joined #ruby-lang
<drbrain> … and bougyman's first example, starting from File.read, takes a rather circuitous route to get the last line
dju has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Ping timeout: 248 seconds]
khoa has joined #ruby-lang
dju has joined #ruby-lang
<MrPunkin> anyone care to explain this to me? https://gist.github.com/3520097
<MrPunkin> It matches locally in console, matches when running ruby -e '…' in my real environment, but fails to match when the script actually runs
cored has quit [Ping timeout: 246 seconds]
<MrPunkin> outputting line.inspect gives me the same string as seen in the example
<MrPunkin> so the string format isn't different
<eam> you don't need the surrounding .*
manuw has quit [Read error: Operation timed out]
manuw has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
Skif has joined #ruby-lang
deryldoucette has joined #ruby-lang
<whitequark> MrPunkin: Ruby does have some global variables affecting how matching works
<whitequark> what is the environment of the script?
deryl has quit [Ping timeout: 245 seconds]
deryldoucette is now known as deryl
<MrPunkin> whitequark: #! /usr/bin/env ruby, runs ruby 1.8.7 apparently
<whitequark> uh, 1.8...
<whitequark> do you run that line in 1.8 too?
NemesisD has quit [Ping timeout: 264 seconds]
<MrPunkin> yeah. What do I need to change to make it compatible in 1.8x
<MrPunkin> ?
<eam> it's compatible with 1.8
<whitequark> MrPunkin: this is a list of predefined globals: http://www.zenspider.com/Languages/Ruby/QuickRef.html#pre-defined-variables
<eam> MrPunkin: re-check your assumptions. Either you're giving it different data, or you've set some global regex parameter to change behavior
<whitequark> I'd look for $= or $/
<whitequark> others shouldn't be able to affect this
<whitequark> and yeah, you don't need .*'s
workmad3 has quit [Ping timeout: 252 seconds]
<MrPunkin> hmm. here's my whole script: https://gist.github.com/c11a0f3760a002c88276
<MrPunkin> I don't think I'm setting that anywhere, but could use a second pair of eyes for sure
<whitequark> you don't
<whitequark> well, in case it won't work on 1.9 I could help
<whitequark> I literally didn't touch 1.8 for years
<whitequark> I doubt it would even compile on my system.
<MrPunkin> the only prob is my 1.9 install requires my RVM stuff which is just too hard to get working in this environment. I'll try go go back to it though I guess.
ootoovak has joined #ruby-lang
<eam> MrPunkin: does your regex not match at *all*? or does it match the wrong thing?
<eam> pastebin the output, if you can
<MrPunkin> it isn't returning any match data in this script
<MrPunkin> the second half for the memory stats works fine
<eam> what's the full line.inspect output?
<MrPunkin> but the first half isn't working
qpingu has quit [Quit: Leaving.]
<MrPunkin> of all lines from the loop, or a single line?
<eam> all
<MrPunkin> one sec
<MrPunkin> reload gist eam
fgomez has quit [Ping timeout: 244 seconds]
<MrPunkin> so those first set of lines are what I'm trying to capture, which works fine in 1.9.3
macmartine has quit [Ping timeout: 264 seconds]
khoa has quit [Read error: Connection timed out]
ootoovak has quit [Quit: ootoovak]
<eam> MrPunkin: I think your problem is that String.match doesn't take a block in 1.8
<MrPunkin> how come the second half works then?
Brainix has joined #ruby-lang
<MrPunkin> the memory one
<eam> collect the return value instead
<MrPunkin> oh wait, it's not,
<MrPunkin> okay… gotcha
<eam> bam
<MrPunkin> let me try
wmoxam has joined #ruby-lang
<MrPunkin> eam: now it's saying my variable I'm storing the return val in is nil
<MrPunkin> so no match
Virunga has quit [Quit: Sto andando via]
t81309 has quit [Remote host closed the connection]
t95341 has joined #ruby-lang
<eam> MrPunkin: every time? Most of your lines don't match
<eam> some of them ought to
<MrPunkin> it should match lines 2-6
<MrPunkin> which is all I need
<MrPunkin> and pull out the relevant name and value from each line
<MrPunkin> I get no matches, however.
<MrPunkin> well wait, ugh
<MrPunkin> never mind, I'm being dumb again
titaniumNoob has joined #ruby-lang
nXqd has joined #ruby-lang
qwerxy has quit [Quit: offski]
JoshWines has joined #ruby-lang
havenn has quit [Remote host closed the connection]
wyhaines has quit [Remote host closed the connection]
m3nd3s has joined #ruby-lang
qpingu has joined #ruby-lang
S1kx has quit [Ping timeout: 260 seconds]
wpaulson has joined #ruby-lang
wpaulson has quit [Read error: Connection reset by peer]
wpaulson has joined #ruby-lang
wmoxam has quit [Ping timeout: 244 seconds]
wpaulson_ has joined #ruby-lang
wpaulson has quit [Ping timeout: 252 seconds]
wpaulson_ is now known as wpaulson