<simi>
I'm using rb_eval_string, but I'm getting only object id.
<simi>
And I want to inspect string value.
<simi>
badeball, ^
<lianj>
"These ruby_eval commands will output into the tempfile that redirect_stdout created, so you'll need to tail -f that file in a different console. "
<lianj>
badeball: thats the problem
<badeball>
lianj: uhm, I think you need to take a closer look at that. it will only do that if you follow those exact steps. however, if you don't use the defined redirect_stdout and only ruby_eval, you can easily access variables with only gdb.
deens has joined #ruby-lang
<badeball>
given the following test.rb: https://gist.github.com/badeball/8468469, I got gdb to output "123 test" by just executing ruby_eval "a", which seems to me to be what simi is asking for
tuttinator has quit [Quit: Leaving...]
rahul_j has joined #ruby-lang
<badeball>
simi: rb_eval_string returns a VALUE (object) and I guess what you're seeing is the actual reference
<simi>
badeball, yup
<simi>
ruby_eval macro solved it
<simi>
thanks a lot
deens has quit [Ping timeout: 272 seconds]
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
JohnBat26 has joined #ruby-lang
<simi>
I just wonder if I can get string value from VALUE. Probably with something like printf("%s", RSTRING(value)->ptr).
<simi>
But how can I get that VALUE?
<simi>
in gdb
vlad_starkov has joined #ruby-lang
r0bgleeson has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
deens has joined #ruby-lang
huma has joined #ruby-lang
deens has quit [Ping timeout: 265 seconds]
robbyoconnor has joined #ruby-lang
Lewix has joined #ruby-lang
Paradox has quit [Ping timeout: 276 seconds]
Paradox has joined #ruby-lang
Cakey has quit [Ping timeout: 248 seconds]
mogox has joined #ruby-lang
<badeball>
well, RSTRING is a macro and is not available as a function in the compiled ruby-binary
<yorickpeterse>
I'd prefer to keep things close to $PROD to rule out whatever crap they might introduce
daikan has quit [Remote host closed the connection]
<yorickpeterse>
gdb tiem
francisfish has joined #ruby-lang
robbyoconnor has quit [Read error: Connection reset by peer]
huma has quit [Ping timeout: 252 seconds]
Voker57 has quit []
chouhoulis has quit [Remote host closed the connection]
ender has joined #ruby-lang
caral has quit [Quit: caral]
robbyoconnor has joined #ruby-lang
caral has joined #ruby-lang
<yorickpeterse>
HAHA, I can segfault this app
<yorickpeterse>
start 4 threads, let them do stuff, attach gdb, GC.start
<yorickpeterse>
segfault
<yorickpeterse>
yay
quizzicol has joined #ruby-lang
<yorickpeterse>
great, and it seems to be in Nokogiri
marr has joined #ruby-lang
<_rgn>
what's the best doc to find out all the ways you can use str[/regex/] w/ back references and capture groups and all that stuff
daikan has joined #ruby-lang
<yorickpeterse>
well, off to the IRC channel we go
<apeiros>
_rgn: ri String#[]
ender has quit [Ping timeout: 272 seconds]
stonerfish has quit [Quit: Leaving.]
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
h_kon has quit [Remote host closed the connection]
kitak has quit [Remote host closed the connection]
marcofernandez has joined #ruby-lang
marcofernandez_ has joined #ruby-lang
marcofernandez has quit [Client Quit]
Johz has joined #ruby-lang
Thanatermesis has joined #ruby-lang
Thanatermesis has left #ruby-lang [#ruby-lang]
tkuchiki has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Asher1 has joined #ruby-lang
danijoo_ has joined #ruby-lang
Asher has quit [Read error: Connection reset by peer]
ivanskie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Elico has quit [Ping timeout: 272 seconds]
danijoo has quit [Ping timeout: 246 seconds]
Elico has joined #ruby-lang
daikan has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
daikan has joined #ruby-lang
skade has quit [Ping timeout: 272 seconds]
skade has joined #ruby-lang
h_kon has joined #ruby-lang
Voker57 has joined #ruby-lang
mbr has quit [Quit: leaving]
mechanicles_ has quit [Quit: Computer has gone to sleep.]
mechanicles has quit [Remote host closed the connection]
diegoviola has joined #ruby-lang
cyndis has quit [Ping timeout: 245 seconds]
Jamo has quit [Ping timeout: 246 seconds]
shaman42 has quit [Ping timeout: 276 seconds]
MrZYX|off is now known as MrZYX
mechanicles has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
mechanicles_ has joined #ruby-lang
<yorickpeterse>
so to confirm, does anybody know if ObjectSpace.each_object only includes objects that are still being used?
<yorickpeterse>
or does it simply iterate over everything ever created?
mechanicles_ has quit [Remote host closed the connection]
<yorickpeterse>
I'm assuming the former, but that makes this memory issue even weirder as it would mean Nokogiri somewhere (or something else) holds on to all parsed documents
mbr has joined #ruby-lang
cyndis has joined #ruby-lang
mannyt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby-lang
shaman42 has joined #ruby-lang
Jamo has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
chouhoulis has quit [Ping timeout: 272 seconds]
postmodern has quit [Quit: Leaving]
daikan has quit [Remote host closed the connection]
mnngfltg has joined #ruby-lang
Onixs_ has joined #ruby-lang
Onixs has quit [Read error: Connection reset by peer]
cyndis has quit [Quit: No Ping reply in 180 seconds.]
cyndis has joined #ruby-lang
mechanicles has quit [Remote host closed the connection]
<r0bgleeson>
yorickpeterse: how do you mean? that'd be a bug of fucked up proportions
<r0bgleeson>
you shouldnt be able to reach an object thats been GC'ed
<apeiros>
if you want a single method, you'll have to add it
<d4rkr4i>
apeiros: brilliant. that will do.
<d4rkr4i>
apeiros: I never thought to use #tap like that!
bjh13 has joined #ruby-lang
skade has joined #ruby-lang
<d4rkr4i>
apeiros: including Enumerable mixin in class add enumerable methods like map, select, find etc for that class (upon defining each method).
<d4rkr4i>
Any mixin available to mix method like 'shift' ?
<apeiros>
d4rkr4i: no
<apeiros>
mutating methods via mixin are difficult
<d4rkr4i>
apeiros: mm-hm. makes sense. thanks..
<d4rkr4i>
apeiros: in mixin like Enumerable, we are just yielding some part of that class to a block. It will be entirely different thing for method like shift.
<workmad3>
d4rkr4i: it's not really because of that
<apeiros>
d4rkr4i: actually the reason something like Enumerable works, is that it can be based on a single method: #each
havenwood has joined #ruby-lang
<workmad3>
d4rkr4i: it's that to mixin something like enumerable, it relies on an interface (e.g. .each). So in order to mixin mutating methods, you need to rely on a method that's definitely mutating... which is a heavy restriction for people using the mixin
<d4rkr4i>
workmad3: apeiros true true.
kfpratt has joined #ruby-lang
serroft has joined #ruby-lang
d4rkr4i has quit [Ping timeout: 248 seconds]
brettweavnet has joined #ruby-lang
heftig has quit [Quit: Quitting]
saarinen has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
ahmedelgabri has joined #ruby-lang
bjh13 has quit [Quit: leaving]
enebo has joined #ruby-lang
apeiros has quit [Ping timeout: 265 seconds]
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
skade has quit [Ping timeout: 252 seconds]
d4rkr4i has joined #ruby-lang
stonerfish has joined #ruby-lang
ivanskie has joined #ruby-lang
symm- has joined #ruby-lang
deception has joined #ruby-lang
senj has joined #ruby-lang
diegoviola has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
<rafeed>
hey guys, if I want to make a REST client, what are the best resources for that? Almost all the books I see are for designing REST services, but not from a client perspective.
zlogan has quit [Ping timeout: 245 seconds]
bjh13 has joined #ruby-lang
rue has joined #ruby-lang
MartynKeigher has quit [Read error: Connection reset by peer]
patriciomacadden has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ivanskie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has quit [Read error: Connection reset by peer]
vmoravec_ has quit [Quit: Leaving]
apeiros has joined #ruby-lang
VTLob has joined #ruby-lang
jtw has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MartynKeigher has joined #ruby-lang
thmzlt has quit [Remote host closed the connection]
skade has joined #ruby-lang
thmzlt has joined #ruby-lang
mistym has quit [Remote host closed the connection]
deception is now known as deception_away
chouhoulis has joined #ruby-lang
ender has quit [Ping timeout: 245 seconds]
brooks has joined #ruby-lang
thmzlt has quit [Ping timeout: 272 seconds]
arooni-mobile has joined #ruby-lang
patriciomacadden has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
momomomomo has joined #ruby-lang
brooks_ has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
brooks_ has quit [Client Quit]
paramg has quit [Ping timeout: 246 seconds]
paramg2 has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
achru has quit [Remote host closed the connection]
achru has joined #ruby-lang
jeff_r has joined #ruby-lang
imperator has joined #ruby-lang
ProfArithmetic has joined #ruby-lang
brooks has quit [Ping timeout: 272 seconds]
rahul_j has quit [Quit: rahul_j]
robmiller has quit [Quit: robmiller]
achru has quit [Ping timeout: 252 seconds]
saarinen has joined #ruby-lang
seanlinsley has joined #ruby-lang
brooks has joined #ruby-lang
bzalasky has joined #ruby-lang
mistym has joined #ruby-lang
elia has joined #ruby-lang
|jemc| has quit [Ping timeout: 272 seconds]
jeff_r has quit [Remote host closed the connection]
melter has joined #ruby-lang
skade has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 265 seconds]
phansch has joined #ruby-lang
dagobah has quit [Quit: Leaving...]
momomomomo has quit [Quit: momomomomo]
arooni-mobile has quit [Ping timeout: 272 seconds]
<joshsz>
Anyone know if it's a bad idea to build a Net::HTTPResponse on by own? I'm seeing this in the code: def initialize(httpv, code, msg) #:nodoc: internal use only
dwknoxy has joined #ruby-lang
<joshsz>
on my own*
dwknoxy has quit [Client Quit]
jeff_r has quit [Remote host closed the connection]
<joshsz>
zzak: I'm going to poke you about this because you might know ;)
bradcliffe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
deception_away is now known as deception
dwknoxy has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
tylersmith has joined #ruby-lang
cnivolle has quit [Ping timeout: 252 seconds]
brooks has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
<Lewix>
I have a piece of code where i do something like this method?(args).tap {} , method?(args) returns a number or a string
<Lewix>
or rather this: method?(arg1, arg2).tap {} , method?(args) returns a number or a string
senj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
Lewix: what's up?
|jemc| has joined #ruby-lang
<Lewix>
apeiros: that was some stupid stuff i fixed. however i have a real question this time
|jemc| has quit [Read error: Operation timed out]
<drbrain>
joshsz: I build them for testing purposes
coca_rails has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 265 seconds]
stonerfish has joined #ruby-lang
vlad_sta_ has quit [Remote host closed the connection]
|jemc| has joined #ruby-lang
vlad_starkov has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
coca_rails has quit [Remote host closed the connection]
jsrn has joined #ruby-lang
jsrn has quit [Client Quit]
breakingthings has quit []
danijoo_ has quit [Remote host closed the connection]
danijoo has joined #ruby-lang
testing_limechat has joined #ruby-lang
coca_rails has joined #ruby-lang
jtw has quit []
testing_limechat has left #ruby-lang [#ruby-lang]
testing_limechat has joined #ruby-lang
bottico has joined #ruby-lang
kirin` has quit [Ping timeout: 248 seconds]
kirin` has joined #ruby-lang
testing_limechat has left #ruby-lang [#ruby-lang]
kirin` has quit [Changing host]
kirin` has joined #ruby-lang
breakingthings has joined #ruby-lang
simi has quit [Read error: Operation timed out]
benlovell has quit [Ping timeout: 272 seconds]
dorei has joined #ruby-lang
wolfsoul has joined #ruby-lang
|jemc| has quit [Ping timeout: 265 seconds]
coca_rails has quit [Remote host closed the connection]
wolfsoul has quit [Client Quit]
thmzlt has quit []
coca_rails has joined #ruby-lang
|jemc| has joined #ruby-lang
phansch has quit [Ping timeout: 272 seconds]
jevs has joined #ruby-lang
serroft has joined #ruby-lang
phansch has joined #ruby-lang
|jemc| has quit [Ping timeout: 260 seconds]
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
bradcliffe has joined #ruby-lang
daikan has quit [Ping timeout: 246 seconds]
MrZYX|off is now known as MrZYX
Mon_Ouie has quit [Ping timeout: 245 seconds]
danijoo_ has joined #ruby-lang
relix has joined #ruby-lang
danijoo has quit [Read error: Operation timed out]
CaptainJet has quit [Ping timeout: 265 seconds]
coca_rails has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
mbj has joined #ruby-lang
DevDoo has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
vlad_sta_ has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
vlad_starkov has quit [Ping timeout: 246 seconds]
vlad_sta_ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
mehlah has joined #ruby-lang
fijimunkii has joined #ruby-lang
havenwood has joined #ruby-lang
daikan has joined #ruby-lang
daikan has quit [Read error: Connection reset by peer]
daikan has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
mrevd has quit [Quit: Leaving.]
chouhoulis has joined #ruby-lang
sandbags has joined #ruby-lang
mrevd has joined #ruby-lang
chouhoul_ has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby-lang
prc has joined #ruby-lang
postmodern has joined #ruby-lang
daikan has quit [Remote host closed the connection]
daikan has joined #ruby-lang
daikan_ has joined #ruby-lang
daikan has quit [Read error: Connection reset by peer]
shinnya has joined #ruby-lang
yalue has quit [Quit: Leaving]
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
deception has quit [Quit: Goodbye]
caral has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
ddd has quit [Quit: leaving]
ddd has joined #ruby-lang
yfeldblum has quit [Ping timeout: 272 seconds]
benlovell has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
patriciomacadden has quit [Quit: Textual IRC Client: www.textualapp.com]
yfeldblu_ has quit [Remote host closed the connection]
caral has quit [Quit: caral]
dragonkh has joined #ruby-lang
caral has joined #ruby-lang
elia has joined #ruby-lang
patriciomacadden has joined #ruby-lang
<yorickpeterse>
zzak: eh, that was a skype misclick
<yorickpeterse>
zzak: for some reason it keeps showing you called me months ago, so I figured "meh, double click it and it will be gone". Apparently that starts a call
<zzak>
yorickpeterse: np, i figured :D
<zzak>
i thought i sleep called you
<zzak>
sometimes i fall asleep with skype running D:
<yorickpeterse>
heh
DevDoo has quit [Remote host closed the connection]
<zzak>
ljarvis: wheres my inkjet :(
jtw has joined #ruby-lang
<yorickpeterse>
in the toner
DevDoo has joined #ruby-lang
x0f has quit [Ping timeout: 246 seconds]
benlovell has quit [Ping timeout: 260 seconds]
mistym has quit [Remote host closed the connection]
x0f has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
kurko__ has quit [Ping timeout: 272 seconds]
AKASkip has joined #ruby-lang
prc has left #ruby-lang [#ruby-lang]
kurko__ has joined #ruby-lang
achru has joined #ruby-lang
mucker has quit [Remote host closed the connection]
mucker has joined #ruby-lang
mucker has quit [Ping timeout: 265 seconds]
__butch__ has quit [Quit: Leaving.]
francisfish has quit [Remote host closed the connection]
patriciomacadden has quit [Quit: Textual IRC Client: www.textualapp.com]
kurko__ has quit [Quit: Computer has gone to sleep.]
<Lewix>
anyone has better eyes than i do
<Lewix>
?
achru has quit [Remote host closed the connection]
<yorickpeterse>
line 44
<yorickpeterse>
oh wait, there's none
<yorickpeterse>
lol wat
<Lewix>
lol
<ryanf>
Lewix: you have a line that's empty string
<ryanf>
split returns [], cust_id is nil
<yorickpeterse>
oh
<yorickpeterse>
you're missing an end
<yorickpeterse>
line 43 needs an `end`
<yorickpeterse>
(to close the method)
mistym has joined #ruby-lang
<ryanf>
he just didn't paste it. otherwise the exception would be a syntax error.
fijimunkii has joined #ruby-lang
<yorickpeterse>
eh?
<ryanf>
maybe we're talking about different things?
<ryanf>
w/e
<yorickpeterse>
oh wait, I missed the error at the top of the gist
<zenspider>
the more I dig in and profile this beast the more I realize it's "just faster" and there isn't any one thing that really accounts for it... but 50%?!?!? wtf
vlad_sta_ has quit [Remote host closed the connection]
deens has quit [Remote host closed the connection]
<Lewix>
ryanf: im hell of confused cause it used to work
<Lewix>
ryanf: and the output spit everything correctly then the error message
<drbrain>
Lewix: then the last line probably doesn't have one of those values set
<drbrain>
rather, has it set to nil which does not respond to #center
<Lewix>
drbrain: the last line is also outputed
<drbrain>
Lewix: add p data after line 12
yfeldblum has joined #ruby-lang
<drbrain>
Lewix: I bet you get a [] for the last line
<drbrain>
and that's the correct number of columns?
EngierkO has quit [Ping timeout: 252 seconds]
<Lewix>
yes sir
<drbrain>
then you should break the print line out with all the centers to figure out which one has nil
<Lewix>
drbrain: i spent about an hour on this. its such a pain
mykoweb has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 272 seconds]
kotk has joined #ruby-lang
mykoweb has joined #ruby-lang
smashwilson has quit [Quit: Leaving]
seanlinsley has quit [Quit: …]
brooks has quit [Quit: brooks]
ulisescab has quit [Ping timeout: 272 seconds]
<Lewix>
drbrain: thanks
<drbrain>
Lewix: this is separate from your bug, but I would write line 38 as:
<drbrain>
puts data.map { |item| item.center c }.join '|'
<Lewix>
drbrain: please feel free to give some suggestion
<drbrain>
or maybe join '| '
<Lewix>
drbrain: not as pretty and to fix the previous bug i had to check one of the data on that line
<drbrain>
Lewix: how is it not as pretty? all I did was roll up your loop
<Lewix>
drbrain: not really
<Lewix>
drbrain: it wasnt exactly the same thing
nisstyre has quit [Read error: Connection reset by peer]
deens has joined #ruby-lang
melter has joined #ruby-lang
<drbrain>
also, you should be checking data integrity when you're reading it in, not after you've completed all your work and and are printing it back out
<Lewix>
drbrain: you forgot '\n'. and thanks
<drbrain>
Lewix: puts adds the "\n" for you
wallerdev has quit [Quit: wallerdev]
rkroeker2 has left #ruby-lang [#ruby-lang]
saarinen has quit [Quit: saarinen]
workmad3 has joined #ruby-lang
tkuchiki has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
digs has joined #ruby-lang
digs is now known as Guest33976
<Lewix>
drbrain: data.each_with_index {|item, i| print "#{item.center c}| " ; print "\n" if i == data.length - 1}
<Lewix>
seems so cryptic
<drbrain>
that's why I used map and join
<drbrain>
and puts
nisstyre has joined #ruby-lang
jeff_r has quit [Remote host closed the connection]
Guest33976 has quit [Client Quit]
jsullivandigs has joined #ruby-lang
dik_dak has joined #ruby-lang
yfeldblum has joined #ruby-lang
serroft has quit [Quit: Leaving.]
brianpWi1s has joined #ruby-lang
<Lewix>
drbrain: your version is so much cleaner
brettweavnet has quit [Quit: Bye]
solars has quit [Ping timeout: 272 seconds]
<zenspider>
every time you use #each, question whether or not Enumerable already solves your problem
<Lewix>
zenspider: what do you mean, each and map can only be used with enumerable